On Sun, Sep 30, 2018 at 09:00:43PM +0200, Hans de Goede wrote:
We will need a new commandline option to re-enable it, but yes otherwise I think that will be enough, setting this will make "cat /sys/power/disk" return "[disabled]".
Lennart, Zbyszek, does systemd handle this return value correctly and will CanHibernate and CanSuspendThenHibernate return false then ?
Hi, [sorry for the late reply, I didn't notice this mail until now].
Yes, [disabled] causes systemd to think hibernation is not possible.
(Systemd only looks for "platform" and "shutdown" as verbs in that file when checking if hibernation is possible. This is easy enough to test: $ echo '[disabled]' > /tmp/disk $ sudo mount --bind /tmp/disk /sys/power/disk $ sudo SYSTEMD_LOG_LEVEL=debug build/test-sleep ... /= running system =/ Suspend configured and possible: yes Hibernation configured and possible: no Hybrid-sleep configured and possible: no Unable to hibernate system. Suspend-then-Hibernate configured and possible: no ... )
Zbyszek