2 minutes
autosuspend 2.0: Additions for Waking Up a System
Since a few years I am maintaining autosuspend, a small daemon that automatically suspends a Linux system in case no activity is detected. With version 2.0 I have added support for scheduled wake ups based on configurable checks for pending activities.
So far, autosuspend
has been pretty useful to suspend a server in case it was not in use.
However, what was missing was to wake up the system again to perform some schedule actions.
This was a long-standing user request and with version 2.0 I finally implemented this feature.
In addition to the existing configurable checks for currently ongoing activities that should prevent suspending the system, there are now additional checks for scheduled future activities.
Common examples include backups, planned TV recordings with software such as Tvheadend, or general times at which the system should be usable without delays.
These requested cases have now been implemented.
Thus, the autosuspend
logic has been changed to first periodically check for current activities.
If no activity exists for a specified time and the system is going to suspend, the new checks for scheduled activities are used to determine the closest time in the future at which the system is needed again.
If this time is far enough in the future, so that it’s worth suspending, a wake up shortly before the pending activity is scheduled (using an RTC alarm) and the system is suspended.
Otherwise, if the pending activity is close enough, the system will just wait for it while staying awake.
All timeouts are configurable, of course.
In addition to this new feature, many small details have been improved and new checks have been added.
The changelog gives an overview on the noteworthy changes.
With the addition of scheduled wake ups, autosuspend
is probably “the most versatile solution” for suspending and waking up a system.
A new package for Archlinux has been pushed to AUR and for Debian the updated package is currently going through unstable. In case someone would be willing to contribute packages for other distributions, I’d be glad to hear about that. In case of issues or feature requests, please use the issue tracking in the Github project.
autosuspend linux Python server NAS software
360 Words
2018-07-29 00:00 (Last updated: 2021-04-30 20:40)