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

Bastien Nocera bnocera at redhat.com
Wed Apr 15 14:26:14 UTC 2015



----- Original Message -----
> On Tue, Apr 14, 2015 at 09:30:31AM -0600, Chris Murphy wrote:
> > On Tue, Apr 14, 2015 at 3:07 AM, Bastien Nocera <bnocera at redhat.com> wrote:
> > >
> > >
> > > ----- Original Message -----
> > >> OK not everyone is on the same page, apparently. This bug was just
> > >> closed by Anaconda as WONTFIX.
> > >>
> > >> suggested swap for laptop seems low
> > >> https://bugzilla.redhat.com/show_bug.cgi?id=1037472
> > >>
> > >> I don't see how hibernation works reliably with such a low default swap
> > >> size.
> > >
> > > This isn't the way to fix it. The hibernation file/partition should
> > > really be independent
> > > of swap, because 1) you can't be sure how much swap will actually be used
> > > by the applications
> > > so you can't be sure you'll ever have enough swap to save the RAM 2) Too
> > > much swap and the
> > > (lack of) interactivity will make you want to advocate physical violence
> > > when your machine
> > > is unusable for an hour because of a hungry Javascript in your 50th
> > > Firefox tab.
> > 
> > Windows and OS X both use swapfiles rather than swap partition, and a
> > sleep image file rather than a partition. OS X's swapfiles are
> > dynamically created on demand in variable size increments.
> 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. Because we don't have
> really-read-only fs mounting, we need to support swap-as-partition, so
> we might just as well use it by default.
> 
> > 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.
> 
> Systemd supports hybrid-sleep as another option analogous to suspend
> and hibernation, so for anything using systemd to suspend swithing to
> hybrid should be trivial. Maybe we should make this an F23 goal:
> - use hybrid-sleep from Gnome and other DE by default

Hybrid sleep as offered in systemd still is just suspend + hibernation, and
the way we do hibernation is broken.

Hybrid sleep is already the default on low battery with newer versions of UPower.


More information about the devel mailing list