Run rtcwake as script in /etc/profile.d

So I tried to write a script that runs directly after login and suspends my laptop, just to wake it up again immediately.
I created a script in /etc/profile.d just with the content

systemctl suspend

and it does exactly what you would expect: The laptop suspends after I type in my password. But I have to wake it up manually…
So I tried this:

rtcwake -d/dev/rtc0 -m mem -s 1

before you ask: things like sudo rtcwake -m disk -s 1 did not work, not even if I run the command in terminal.

The script as shown in the box above works perfectly when I run it via terminal, but not after login. What could be the reason and are there some fixes/alternatives you can think of?

:+1: Welcome to Manjaro! :+1:

  1. Please read this:
    How to provide good information
    and press the three dots below your post and press the :pencil2: to give us more information so we can see what’s really going on.
    Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:
  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.
  3. This sounds suspiciously like an XY Problem. Can you tell in plain :uk: what you’re trying to accomplish here without using any technical terms like systemctl and rtcwake???


P.S. If you want to notify me that you did provide this information, please :heart: this message and I’ll come back and have another look.