Re: Disabling kernel's hibernate support by default, allow re-enabling it with a kernel cmdline option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 30, 2018 at 1:52 PM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> 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.
>

No,  that is not what systemd is doing. The kernel provides a
mechanism, it does absolutely nothing with that mechanism unless told
to do so. What systemd is actually doing is creating a policy around
that mechanism.

> 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.
>

"We have decided that the policy created is not desirable, so we want
to disable the mechanism"

> 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:
>
> Pro:
>
> 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,
> good.
>
> Against:
>
> 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?
>

While this change would "solve" the problem, I do not believe it is
the correct place to do so. As mentioned above, the mechanism is not
flawed.  Some hardware does not support the mechanism, and has no way
of reporting as such, which is why policy has always been leave it off
unless the user knowingly triggers it.   Now we have changed the
policy, in a way that seems pretty much universally undesirable, the
solution is the revert the policy, not cripple the mechanism.

Justin
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux