Hello Fedora kernel team,
On the Fedora desktop list there has been a discussion about
systemd now offering a new suspend-then-hibernate option and
gnome-settings-daemon's media-keys plugin using this when
the power-button gets pressed and systemd saying this is
available on the system.
What this does is suspend the system normally and set
a RTC wakeup 3 hours in the future, then when the RTC wake
happens it hibernates the system.
As discussed on the desktop list this is not really desirable
as default behavior for F29 (and later) since the hibernate
code is not really something which gets used enough to be
well tested and is really not something which we can support.
So after that the discussion has gone in the direction of
how to disable the new suspend-then-hibernate behavior.
Lennart made a really interesting observation here, systemd
is just proxying if "cat /sys/power/disk" indicates that
hibernate is supported.
So if we really don't want to support hibernation as a normal
option, while still allowing adventurous user to use it, what
really should happen is for the kernel to stop advertising
hibernate support. Thinking about this I agree, if we say
that we cannot support it, the kernel really should not be
advertising support for it by default.
So Bastien suggested to change the nohibernate setting in
kernel/power/hibernate.c which can be set from the kernel
commandline to default to 1, and allow setting it back
to 0 by adding "hibernate=yes" to the kernel commandline.
I kinda like this idea and I'm willing to spend some time
to write a patch for this and submit it upstream, which allows
selecting nohibernate=1 as the default through Kconfig.
But before I spend (some) time on this, I wonder what the
kernel team's opinion on this is ?
My own 2 cents on this are:
Not advertising hibernate by default means users will not
accidentally try to use it (through e.g gnome-tweaks) and if
they do use it by specifying the kernel commandline option
we can easily explain that using that commandline option is
not supported by Fedora and kindly request them to file bugs
upstream. TL;DR: less kernel issues for Fedora to deal with,
Currently we do have some users using hibernation without
adding any options to the kernel commandline. These users
will have to now add "hibernate=yes" to their kernel commandline.
I'm thinking that yes we want this, but maybe this needs to
go through the change process for proper communication, so for
F29 we need another fix, and we can do this for F30?