#154 New quick-doc: Setting up hibernation using a swapfile
Closed: stale a year ago by pboy. Opened 4 years ago by pbokoc.

I was browsing r/linux on Reddit and saw this:

https://www.reddit.com/r/linux/comments/ds9w9e/straightforward_tutorial_on_how_to_set_up/

I think it could be a good addition to quick docs. If you decide to add it, then make sure to:

  • Check it actually works on Fedora
  • Update step 8 so it uses grubby instead of grub2-mkconfig

Metadata Update from @pbokoc:
- Issue tagged with: help wanted

4 years ago

This becomes particularly useful since Fedora 33, with swap on zram feature. It's easier to add a swapfile than alternatives, but there are still limitations for anyone who wants to document it, to also at least note the limitations.

Supporting hibernation in Workstation describes various issues generally, but in particular Secure Boot support.

The interface for hibernate is not pretty, or standardized. That leads to extra steps on Btrfs.

  • The workaround is completely non-obvious but could be straightforward if documented.
  • swapfile limitations in man 5 btrfs apply
  • probably needs a discussion on devel@ list to figure out where the swapfile should go to ensure it's never subject to snapshotting.
  • btrfs-map-physical finds the physical offset in bytes for the swapfile; but the resume_offset parameter needs to be in pages, which is arch specific. On x64 it's 4KiB.

Also reasonable to just recommend creating a swap partition when on Btrfs, until all of this improves.

No progress for 2 years. Closed.

Metadata Update from @pboy:
- Issue close_status updated to: stale
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata