Schedule ALL the things for the night

https://swg-empire.de/post/3428403

Linux newb here. What does this mean? My knowledge of systemd is that it is responsible for things like mounting disks and running networking. So does this mean I can ask systemd to grab a new IP address every x hours, even if the machine is asleep?

Systemd at its core starts stuff when your Linux system boots and during normal operation. It can also start stuff at specific times. That was traditionally done by cron.

But of course when you set up to run something at midnight it cannot run if the system is in standby. But with the WakeSystem=true option you can tell it to basically set an alarm for the computer to turn itself back on and do whatever you want it to do.

It does not turn your computer back to sleep, though. That’s something you have to script yourself.

I hope they add the ability to turn the computer on even if it is completely shut off. That would make keeping my family’s computers updated much easier.

I hope they add the ability to turn the computer on even if it is completely shut off. That would make keeping my family’s computers updated much easier.

That’s probably not possible, but you could do it with a microcontroller and a relay bridging the power switch.

If you read the corresponding feature request it actually seems to be pretty easy. They were just arguing about implementation details.

Windows has supposedly also done this for a while now.

Of course it depends on hardware capabilities. But I guess it’s common enough now.

Edit: This is actually trivial to implement with the rtcwake command. Usually available in linux-utils or similar packages. rtcwake --list-modes shows you what modes your system supports.

Edit 2: Like, this is beyond trivial. Just echo the desired waketime as a Unix timestamp to /sys/class/rtc/*/wakealarm and you’re set. Doesn’t matter if the system is just sleeping or turned off entirely.

Edit 3: But waking from power down seems not to be supported on the Steam Deck. Only from suspend.

.timer units that cause the system to start up if powered off (i.e. unlike WakeSystem= which is just abour resuming from suspend) · Issue #8705 · systemd/systemd

Submission type Bug report systemd version the issue has been seen with 236 Used distribution Gentoo In case of bug report: Expected behaviour you didn't see After the power failure, I expect the t...

GitHub