[systemd-devel] systemd hibernator generator does not function on default Fedora install

Chris Murphy lists at colorremedies.com
Wed Apr 20 17:57:07 UTC 2016


On Wed, Apr 20, 2016 at 3:20 AM, Lennart Poettering
<lennart at poettering.net> wrote:

> I am still open to add searching for the resume swap partition to the
> generator, but only where this may be done reliably, i.e. GPT, but not
> MBR. And we should either define a new GPT partition type UUID for
> "hibernation swap", or reuse the swap GPT partition type UUID but then
> set a flag in it which marks it for use in resume= usage.
>
> Given that Windows mandates EFI in modern laptops (and thus GPT), I am
> pretty sure you can cover large majority of systems with that. But
> again, it won't be a 100% solution, since there are of course people
> who still use MBR.

Windows mandates Secure Boot by default too. And Fedora's kernels
disable linux hibernation on Secure Boot enabled systems. So... a
large majority can't use linux hibernation right there, if they have a
kernel that disables it when Secure Boot is enabled.

[root at f23s ~]# mokutil --sb-state
SecureBoot enabled
[root at f23s ~]# cat /sys/power/state
freeze mem
[root at f23s ~]# cat /sys/power/disk
[disabled]

And then GNU parted doesn't support arbitrary partition type GUIDs.
Anaconda, and many other installers, use parted for partitioning. My
impression is upstream would accept patches to enable arbitrary
partition type GUIDs, but no one upstream cares to do this themselves.
https://bugzilla.redhat.com/show_bug.cgi?id=1201814#c1

So at this point, I think hibernation is in the realm of expert users
and the best advise is to encourage the DE's to disable hibernation by
default, and hide hibernation related GUI elements. The emphasis
should be on making applications capable of self-saving their state so
that if poweroff is called for in low battery cases, it's possible to
power off quickly, cleanly, while saving user data. *shrug*

-- 
Chris Murphy


More information about the systemd-devel mailing list