I believe the systemd integration is not thought out very well. I'll describe what I think should be there. An even better solution would be to rewrite uswsusp, but I have zero interest in that.
Disclaimer: I didn't test it, but in theory this configuration is sound.
- Create this executable script
#!/bin/sh [ x"$1" = x"hibernate" -o x"$1" = x"hybrid-sleep"] || exit 1 /usr/bin/run-parts --regex .\* -a pre -a "$1" -- /usr/lib/systemd/system-sleep if [ x"$1" = x"hibernate" ]; then /usr/bin/s2disk else /usr/bin/s2both fi result=$? # always run post scripts in order to possibly restore settings altered in pre script. /usr/bin/run-parts --regex .\* --reverse -a post -a "$1" -- /usr/lib/systemd/system-sleep exit $result
- Create these files with all missing directories:
[Service] ExecStart= ExecStart=/usr/local/lib/systemd-uswsusp.sh hibernate
[Service] ExecStart= ExecStart=/usr/local/lib/systemd-uswsusp.sh hybrid-sleep