Support for hibernation 1/2: background and summary

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



Hi,

Fedora Workstation WG is tracking the following issue:

Support for hibernation?
https://pagure.io/fedora-workstation/issue/121

ACPI power states decoder ring [1]
S0 normal powered on state, S0 low power idle, freeze, s2idle,
connected/modern standby, power nap
S1 standby, power-on suspend, shallow
S2 not used on linux
S3 suspend, suspend to RAM, S2RAM, sleep, deep
S4 soft off, used for hibernate/suspend to disk and implies firmware
coordination
S5 power off, used for hibernate/suspend to disk

Summary of the issues:

- Hibernation image and swap (paging) share the swap device. There's
no kernel support to separate them. With a shared swap partition,
there's no guarantee there will be enough contiguous free space (this
is a requirement) to write out the hibernation image.

- A swap device sized at 1:1 with RAM, and any appreciable use of
swap, will thwart the creation of a hibernation image. This is
discovered at hibernation image creation time.

- A swap device sized at 2:1 with RAM might be quite a lot more
reliable, but it's still not a guarantee. And already the swap
partition is considered too big.[2] And we're considering dropping it
by default in Fedora 33 in favor of swap-on-ZRAM. [3]

- Hibernation is getting very little attention by hardware vendors and
Microsoft.

- For 5+ years the emphasis has been on S0 low power idle (a.k.a.
freeze, standby, s2idle, S2I, modern standby, and power nap), and
faster boots. Hibernation is intended as a last resort fallback when
the battery charge becomes low.

- Microsoft's hardware certification mandates UEFI Secure Boot by
default since Windows 8 (2012). It's reasonable to estimate this is
the vast majority of present and future hardware.

- Linux kernel enforces hibernation lockdown (among other things), on
UEFI systems with Secure Boot enabled.

- S3 (a.k.a. suspend, suspend-to-RAM, S2RAM, STR, sleep, deep) is
widely available hardware and linux support wise; but the gotcha has
always been wake from suspend and device reactivation, including
graphics. There are lots of firmware, ACPI, and kernel bugs, and
regressions, and it's make/model/version specific.

- Lately, since ~2018 [4], linux is catching up, with more effort
being put into S0 low power idle (called s2idle on linux and either
connected standby or modern standby on Windows, and power nap on
macOS). It's all done in software, and ostensibly has no firmware or
ACPI dependencies, so it can be done on any platform.[4]

- uswsusp: I can't find any recent upstream information on it. [6]
It's not packaged in Fedora. I see no evidence of image signing
capability. If it could work around kernel Secure Boot lockdown, I
think most any reasonable person would consider that a security
vulnerability.

- Fedora kernel team has said resource constraints means hibernation
is not a priority, i.e. it's best effort, and can't practically be
release blocking. There's prior, Fedora specific, kernel, systemd, and
GNOME discussion in these threads. [7]

I'll start a separate thread for questions and discussion.



[1]
https://www.kernel.org/doc/Documentation/power/states.txt
https://www.kernel.org/doc/html/v4.19/admin-guide/pm/sleep-states.html
[2]
https://pagure.io/fedora-workstation/issue/120
[3]
https://pagure.io/fedora-workstation/issue/127
[4]
https://lwn.net/Articles/762132/
[5]
https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/platform-design-for-modern-standby
[6]
http://suspend.sourceforge.net/
https://wiki.archlinux.org/index.php/Uswsusp
[7]
https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx/message/EWYAXHJRCT6FLA7D2G3TLTPDV2OXHPHF/
https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx/message/TLTA6HAYJWQYHV3ZHFXUIXM4IJVWBEJJ/
https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx/message/DHBBPY2PGAJRW2PINXVWNAFSZY2WDI7Q/


-- 
Chris Murphy
_______________________________________________
desktop mailing list -- desktop@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to desktop-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/desktop@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora KDE]     [Fedora Announce]     [Fedora Docs]     [Fedora Config]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux