Bug 2263936 - Hibernate is still broken out of the box on fedora based laptops
Summary: Hibernate is still broken out of the box on fedora based laptops
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: distribution
Version: 42
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Aoife Moloney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-12 21:36 UTC by Jeremy Linton
Modified: 2025-02-26 12:57 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeremy Linton 2024-02-12 21:36:59 UTC
This results in a lot of laptops with drained batteries and users losing their work/etc when the machine is rebooted. 

There was a workstation issue, opened as https://pagure.io/fedora-workstation/issue/121 but closed due to the lack of progress with upstream linux's secure boot vs unencrypted swap issues.

This shouldn't be sufficient reason not to assure the feature works when secure boot is disabled.

For this to work, workstation images should assure an encrypted swap (it works on LUKS) or configure a file on btrfs/etc as swap. Trigger a zram disable before hybrid-sleep or hibernate, add the "resume" module to dracut and assure the kernel "resume=" line is set. The decision about whether to enable this probably should also be dependent on whether the machine advertises S4, but pretty much all x86 laptops/etc do as its been part of the "modern standby" s2idle design where the machines hibernate after X hours or Y% battery drain (usually about 10% IIRC).




Reproducible: Always

Steps to Reproduce:
1. Using fedora on a laptop, close lid
2. Return 1-2 days later
3. Power on machine.

Actual Results:  
Machine fails to boot to previous state, and the battery is 100% discharged

Expected Results:  
Machine resumes from disk properly, like every other desktop/laptop based OS (ex windows/macos)

Comment 1 Kevin Fenzi 2024-02-14 23:46:38 UTC
So, I am not sure where to route this, but I am pretty sure nothing at all will happen to it just sitting here in 'distribution' component. ;) 

Perhaps you could open a discussion on devel list/discussion instead and find people who are interested in making this work?

Comment 2 cornel panceac 2024-03-23 07:36:23 UTC
If you don't mind i would change component to systemd. Here's my use case:

$ systemctl hibernate
Call to Hibernate failed: Not enough swap space for hibernation

So maybe all we need is to increase the default swap space size, or change the 'Hibernate' logic, if actually the swap space is enough.

$ free -m
...
Mem: 15893 ...
Swap: 8191 ...

(pasted by hand from my laptop).

Comment 3 Jeremy Linton 2024-11-04 20:56:13 UTC
Part of it is anaconda as well, which should be adding the needed dracut-resume modules, assuring the swapfile/partition is created, and adding the resume line.

Comment 4 Aoife Moloney 2025-02-26 12:57:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


Note You need to log in before you can comment on or make changes to this bug.