hibernation support - lack of distro-wide coordination between systemd, dracut, anaconda, pm-utils and maybe more?

Chris Murphy lists at colorremedies.com
Wed Apr 15 16:49:11 UTC 2015


On Wed, Apr 15, 2015 at 7:03 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:

> I think the problem is in the ways filesystems are implemented.  The
> fs has to be mounted to access the swap file, and this can change the
> fs, even with a read-only mount.

At least on Linux I'm pretty sure the way swapfile works is it only
asks the fs at mkswap time what the contiguous blocks are for that
file. From that point on swapping to the swap file directly accesses
those blocks, not via the fs. And that's why swapfiles don't work with
either LVM thinp LVs or Btrfs or NFS since there's zero assurance the
swapfile will be where it was at mkswap time, let alone contiguous.
There's an NFS related patch to make this work that the Btrfs folks
were going to leverage, which I think works now as long as no
snapshots of the fs tree the swapfile is in are made. As soon as
there's a snapshot, both the original and the snapshot become subject
to COW.


>> Both OS's have a feature that I find invaluable on a laptop which is
>> the automatic switch from suspend-to-RAM to suspend-to-disk.
> Yes, integrating with firmware would be great. So far this hasn't been hapenning...
> What we can do instead is use hybrid sleep. It's not smart at all,
> and doesn't prevent your battery from draining completely, but it does protect
> your data.

Great. I assume though that this requires some minimum swap
(partition) size though? So the installer bug needs to be reopened,
and set it to depend on kernel hibernation working correctly.

-- 
Chris Murphy


More information about the devel mailing list