Hybrid suspend with systemd

· by Artem Sidorenko · Read in about 1 min · (130 words)

Hybrid suspend is a suspend mode, where suspend-to-disk and suspend-to-ram are executed together in the same time. Its a quite usefull mode for notebooks:

  • fast wake up because of suspend-to-ram
  • no data loss in case of empty battery during the suspend

Last weekend I updated my laptop to Mint 18 (Ubuntu 16.04 is the base) and noticed the pm-utils configuration from Mint 17 (Ubuntu 14.04) doesn’t work anymore. The reason is the change towards systemd: systemd is taking care about suspending and hibernating and pm-utils are not used anymore.

In order to get a similar behaviour with systemd and to have hybrid suspend, you should override the suspend target configuration:

$ cat > /etc/systemd/system/suspend.target << EOF
[Unit]
Description=Hybrid suspend
DefaultDependencies=no
BindsTo=systemd-hybrid-sleep.service
After=systemd-hybrid-sleep.service
Documentation=man:systemd.special(7)
EOF
$ systemctl daemon-reload

Thats all :-)