Bug 57882

Summary: Hibernate: 'echo reboot > /sys/power/disk' no longer has any effect
Product: systemd Reporter: bugzilla
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: tekrotzen+bugzilla
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=58679
Whiteboard:
i915 platform: i915 features:

Description bugzilla 2012-12-04 15:32:15 UTC
Before updating to systemd 196 a few days ago, it was possible to reboot immediately after hibernating, by setting /sys/power/disk to 'reboot'. This is useful if you want to, for example, boot up a different Linux distro.

However after upgrading to 196, the system powers down instead.


Carried out by doing the following -
    echo reboot > /sys/power/disk
    systemctl hibernate

Checking /sys/power/disk after doing the 'echo' shows as expected - 
    platform shutdown [reboot] suspend

Checking /sys/power/disk after powering back on and thawing - 
    [platform] shutdown reboot suspend


Journalctl | grep "Hibernation mode" used to produce a single line for the hibernation -
Nov 30 17:42:17 <hostname> kernel: PM: Hibernation mode set to 'reboot'

Now it gives 2 lines -
Dec 04 11:44:30 <hostname> kernel: PM: Hibernation mode set to 'reboot'
Dec 04 11:44:30 <hostname> kernel: PM: Hibernation mode set to 'platform'


So it looks like the original contents of /sys/power/disk ('reboot') are being overwritten ('platform') by the 'systemctl hibernate' command.
Comment 1 Lennart Poettering 2013-02-04 21:14:19 UTC
I figure if we fix this we should do this together with

https://bugzilla.freedesktop.org/show_bug.cgi?id=57793

Sounds like both issues could have the same fix.
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-05-15 02:15:28 UTC
Should be possible again after http://cgit.freedesktop.org/systemd/systemd/commit/?id=19adb8a320. The strings written to /sys/power/state and /sys/power/disk can be freely configured (see http://www.freedesktop.org/software/systemd/man/systemd-sleep.conf.html).
Comment 3 bugzilla 2013-05-16 09:37:16 UTC
Yes, in systemd 203 -
    specify your requirements in file /etc/systemd/sleep.conf
    call systemctl hibernate

Many thanks for the fix.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.