Björn Tantau@swg-empire.de to linuxmemes@lemmy.world · 2 days agoSchedule ALL the things for the nightswg-empire.deimagemessage-square23fedilinkarrow-up1209arrow-down15file-text
arrow-up1204arrow-down1imageSchedule ALL the things for the nightswg-empire.deBjörn Tantau@swg-empire.de to linuxmemes@lemmy.world · 2 days agomessage-square23fedilinkfile-text
cross-posted from: https://swg-empire.de/post/3428368 Though you still have to suspend by yourself when you’re done.
minus-squareLucy :3@feddit.orglinkfedilinkarrow-up33·2 days agoThough you still have to suspend by yourself when you’re done. Does ExecPost=systemctl suspend work ?
minus-squareBjörn Tantau@swg-empire.deOPlinkfedilinkarrow-up35·2 days agoProbably. But what if the timer triggered during normal operation? Then your computer would suddenly suspend on its own and you wouldn’t know why. I’ve already made a feature request to only run when the system is suspended. Until then I’ll look at when the system woke up and if that was less than a minute ago turn off the display and suspend after everything is done.
minus-squarenesc@lemmy.cafelinkfedilinkEnglisharrow-up8·2 days agoCan’t you just suspend with another timer that calls Unit=suspend.target?
minus-squareBjörn Tantau@swg-empire.deOPlinkfedilinkarrow-up4·1 day agoYes, do that a minute after everything else started but run the services themselves with systemd-inhibit (another nice thing I didn’t know exists) so that it only goes back to sleep when the last service is done.
Though you still have to suspend by yourself when you’re done.
Does
ExecPost=systemctl suspend
work ?
Probably.
But what if the timer triggered during normal operation? Then your computer would suddenly suspend on its own and you wouldn’t know why.
I’ve already made a feature request to only run when the system is suspended.
Until then I’ll look at when the system woke up and if that was less than a minute ago turn off the display and suspend after everything is done.
Doing God’s work …
Can’t you just suspend with another timer that calls
Unit=suspend.target
?Yes, do that a minute after everything else started but run the services themselves with
systemd-inhibit
(another nice thing I didn’t know exists) so that it only goes back to sleep when the last service is done.