You are not logged in.

#1 2019-06-15 11:09:50

arch1bald1
Member
Registered: 2019-06-15
Posts: 10

[solved] Sleep -> WOL -> Sleep(s) again only after user input

Hi,

I shedule my backup with dirvish and anacron. Therefore wake my workstation from my Raspberry Pi by Wake on LAN at 4am which is working to this point.

BUT: It stays awake until I move mouse or use keyboard. If I did this, it enters sleep mode after 15 minutes like it is configured to do so.

Desktop environment is Gnome with X11 radeon driver. Kernel version is 5.1.9

Would be grateful if you could give me some advice in which direction to poke around.

Thanks

Last edited by arch1bald1 (2019-06-21 11:47:37)

Offline

#2 2019-06-15 15:14:19

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [solved] Sleep -> WOL -> Sleep(s) again only after user input

man rtcwake # drop the WOL stuff altogether
man systemctl # search for "suspend"

Offline

#3 2019-06-21 09:59:12

arch1bald1
Member
Registered: 2019-06-15
Posts: 10

Re: [solved] Sleep -> WOL -> Sleep(s) again only after user input

seth wrote:
man rtcwake # drop the WOL stuff altogether
man systemctl # search for "suspend"

Thanks. Rtcwake was completely unknown to me. Use it in a cron job now.

For the records:
The problem with staying awake was due to the way Gnome handles sleep mode. It needs a mouse movement to enter sleep mode again. I simply send a mouse movement via xdotool by cron.

Here are the relevant and working crontab entries:

*/10 4-23 * * * root /usr/bin/rtcwake -m no -t $(date -d "3:58 tomorrow" +\%s) >/dev/null
*/10 0-3 * * * root /usr/bin/rtcwake -m no -t $(date -d "3:58 today" +\%s) >/dev/null
0 4 * * * mb DISPLAY=:0 xdotool mousemove_relative 1 0

Offline

#4 2019-06-21 11:30:48

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: [solved] Sleep -> WOL -> Sleep(s) again only after user input

I would have suggested to not rely on some autosleep feature in gnome at all but run the backup and then "systemctl sleep" the system.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2019-06-21 11:47:06

arch1bald1
Member
Registered: 2019-06-15
Posts: 10

Re: [solved] Sleep -> WOL -> Sleep(s) again only after user input

seth wrote:

I would have suggested to not rely on some autosleep feature in gnome at all but run the backup and then "systemctl sleep" the system.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Regarding autosleep: It could be the case the backup takes loner than usual (e.g. because a complete VM harddisk image is due to be backuped) and I'm working on the machine already. So sending "systemctl sleep" without effortly check if I'm actually using the system is not the preferred way ;-)

Will mark this topic as solved now as it is working the way I want (albeit somewhat crude) ;-)

Offline

Board footer

Powered by FluxBB