Enable hibernation

Phillip Susi psusi at ubuntu.com
Mon Jan 6 21:40:51 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/6/2014 3:35 PM, Steve Langasek wrote:
> As far back as the Maverick (i.e., 10.10) release notes[1], we
> prominently documented the fact that the hibernate option was not
> reliable:
> 
> Hibernation may be unavailable with automatic partitioning. The
> default partitioning recipe in the installer will in some cases
> allocate a swap partition that is smaller than the physical memory
> in the system.  This will prevent the use of hibernation
> (suspend-to-disk) because the system image will not fit in the swap
> partition.  If you intend to use hibernation with your system, you
> should ensure that the swap partition's size is at least as large
> as the system's physical RAM.  (345126) 
> https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/345126

Most of the time you don't actually need swap >= physical ram.  If you
only have 1 GB of ram in use at the time you try to hibernate, you
only need 1 GB of swap, even if you have 4 GB of ram.  If you install
uswsusp, you might even need less as it compresses the pages as it
writes them out.

> - if a newer kernel package has been installed (which happens
> frequently), resume from hibernation will fail.

Now that's a good technical problem.  Probably could be simply worked
around by having the menu disable the hibernate option after a kernel
upgrade.  Of course, we do already put up the big red flag telling
people they need to reboot, so that should be almost as good.

> - if there is insufficient memory, hibernation will fail.

I don't think that's anywhere near serious enough to disable it.  As
long as it doesn't fail by hanging, or failing to resume properly I
don't see this as a problem.  Probably would be nice to get a pop up
telling you that you to free up some ram and try again though.

> There was also the design issue:
> 
> - the difference between suspend and hibernate is opaque to the
> average user; the user should not have to guess between them.

A lot of users understand and care about the difference.  I would go
so far as to say *most* of Ubuntu's users, which tend to be more savvy
than the average Windows user, understands the difference.  Even most
Windows users understand the difference since they have been using
both under Windows for years.  The ignorant group should not run rough
shod over the educated users.  At best, this is a reason to hide the
hibernate option behind either a modifier key, or a setting that is
easily found, say in the power settings.

> If you were to fix these bugs, I'm sure no one would be unhappy
> with that. It doesn't sound like you're volunteering to fix them,
> though, but instead insisting that some unspecified other should be
> required to do the work to make this reliable.

No, I'm saying that just because hibernate doesn't work with dm-crypt
isn't a reason to disable it for everyone ( and not provide a simple
way to turn it back on ).  It would be nice to get hibernation over
dm-crypt working, but I think it's also perfectly acceptable to simply
document that it doesn't work over dm-crypt ( which most people don't
use or know about ).

> As far as I can see, what's needed here is for someone to do the
> work to expose the option in the UI only when we can know that
> hibernate will succeed.  I think we should also still have design
> team input regarding which of suspend and hibernate should be
> exposed in the UI by default.

That would be good sense if it failed catastrophically much of the
time.  As far as I can see, it is quite rare that it fails, and when
it does, there's no harm done, so there's no reason to disable it.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSyyLjAAoJEI5FoCIzSKrw+pgH/AjWKq1ZvmXjSW3NhmQQgVoP
UgswFGasDF4ZdIK5oVLLeBAbovIXMOOO40omhGOOeZw83AxkGVdikrcT2hdl0WOL
gcxvgWiCUuSZtW9t/ieATME6RQxOdKyYyXX2JQGB3JCzItFYA+A4JuUylLoScMYM
Jagv7A4wPE3faAWK2NIjVxk8JjTyUXcu3umoFIJnsPvGcXspoouoSync5CqPrJpA
MvR1hkETfQy1CwNPeJJv9YQKewiRFvtCToHavkr6x2SthJm2Km2gSYmYldsGdd5y
iV2txGmgG5OU0e5UqeotcS6kWxvLmUpJtBj/BqZFGU+xYUt3ahybDAmwu0FBkdE=
=DcvB
-----END PGP SIGNATURE-----




More information about the kernel-team mailing list