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
#!/bin/bash
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:
#!/bin/bash
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?
Thanks!