systemd integrationΒΆ
Even though it is possible to run autosuspend manually (cf. the manpage), in production use cases, the daemon will usually be run from systemd. For this purpose, the package ships with service definition files for systemd, so that you should be able to manage autosuspend via systemd. These files need to be installed in the appropriate locations for such service files, which depend on the Linux distribution. Some common locations are:
/usr/lib/systemd/system
(e.g. Archlinux packaged service files)/lib/systemd/system
(e.g. Debian packaged service files)/etc/systemd/system
(e.g. Archlinux manually added service files)
Binary installation packages for Linux distributions should have installed the service files at the appropriate locations already.
To start autosuspend via systemd, execute:
systemctl enable autosuspend.service
systemctl enable autosuspend-detect-suspend.service
Note
Do not forget the second enable
call to ensure that wake ups are configured even if the system is manually placed into suspend.
To start autosuspend automatically at system start, execute:
systemctl start autosuspend.service