I want my laptop to hibernate when I close the lid. I can only choose between suspend and nothing, and both do nothing actually when I close the lid and open it nothing's changed.

I also tried sudo pm-hibernate and nothing happed. I tried dconf tools and tweak tool, I set it to hibernate but no change. Also tried HandleLidSwitch=hibernate still no success, and I also tried enabling hibernation in polkit.

  • Which Ubuntu release are you running? – Mitch Jul 31 '14 at 13:13
  • I am sorry I forgot to mention that, I'll edit the question right now... It's Ubuntu 14.04 x64 – Horațiu Mlendea Jul 31 '14 at 13:14
  • What is the exact file that you tried enabling hibernation in? – Mitch Jul 31 '14 at 13:22
  • /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla – Horațiu Mlendea Jul 31 '14 at 21:38
  • Try steps here askubuntu.com/questions/462472/… – Mitch Aug 1 '14 at 6:31

How big is your swap partition/file? You need 1.5 times the amount of your system RAM to be able to hibernate. Less than this means hibernation will not work.

Eg: If you have 8GB RAM, then you will need 12GB of swap space to be able to hibernate.

Why is this? Well, hibernation physically turns your PC off, which means the contents of RAM which cannot survive a lack of power, must be dumped somewhere before switching off. When you come out of hibernate, the data is re-copied back into RAM before "resuming" the system.

Since PC's now come with gargantuan amounts of RAM as standard, hibernation is not really very practical anymore, particularly when you consider that going in and out of hibernation on a modern PC takes longer than shutting down and booting it from SSD.

With improvements in power management such as offered by Intel's Haswell chipset, you're far better off suspending rather than hibernating because it could happily sit there for a week in suspend mode while using one-tenth of bugger-all power.

| improve this answer | |
  • I have 8 gigs and my swap is the same size... Well, what can I do as a workaround. When I used Windows I used hybrid sleep, so my laptop will save battery and when I open the lid it will not take long to be ready to use. Can I do that in Linux too? When I choose 'Suspend' it did nothing other than turning off the screen and when I got back the battery was almost completly drained. – Horațiu Mlendea Jul 31 '14 at 14:53
  • You could boot a Live DVD and then resize your partitions to make extra space, or alternatively lose the swap partition and replace it with a swap file on a partition with sufficient space. Simply use dd to create a swap file of so many gigabytes in size and then use the swapon command to turn it into a swapfile. Note that swap files have lower performance than a swap partition, though. – Jeff Sereno Aug 1 '14 at 14:45
  • Was the working laptop the same model or different to the non-working laptop? EDIT: I take it it's working now? – Jeff Sereno Aug 4 '14 at 12:21
  • I removed that comment because it's kind off-topic for the original question I am going to make another question ( askubuntu.com/questions/506692/suspend-does-not-work ) – Horațiu Mlendea Aug 4 '14 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.