4

After upgrading from ubuntu 16.04 to 16.10 the hibernate function no longer works. When hibernate is invoked the machine hangs. Under 16.04 it worked perfectly. Trying "sudo pm-hibernate" also fails.

3 Answers3

2

I've come to the same issue very recently (this week or the previous). What has been working for me is combination of @richbl s answer somewhere just here around, @morhook answer in this thread and my own answer in this one. I post it all here to have it in one place.

What I did to make the hibernation work again on my ASUS U36SD running Xubuntu 16.10 "Yakkety Yak":

  1. Stop using sudo pm-hibernate - it is not working any more.

  2. Modify the /etc/default/grub so that the GRUB_CMDLINE_LINUX_DEFAULT variable contains also pci=nomsi resume=UUID=XXXXXXXX, where XXXXXXXX is the UUID of the swap partition. To determine the UUID of your swap, use:

    lsblk -o name,fstype,uuid
    

    Full example here:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi resume=UUID=d30170d7-b3a2-38c5-a386-541a6d0013c7"
    
  3. Update the new grub configuration:

    sudo update-grub
    
  4. Create a new file com.ubuntu.enable-hibernate.pkla in /etc/polkit-1/localauthority/50-local.d/:

    sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
    

    and fill it with this content:

    [Re-enable hibernate by default in upower]
    Identity=unix-user:*
    Action=org.freedesktop.upower.hibernate
    ResultActive=yes
    
    [Re-enable hibernate by default in logind]
    Identity=unix-user:*                            
    Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
    ResultActive=yes
    
  5. If you are using encryption, you must tweak it a little bit more - it is well described here.

  6. Reboot the computer.

  7. You should now be able to see the hibernate option in the poweroff menu and it should work.

crysman
  • 538
0

Hibernation does not work with UEFI Secure Boot enabled on new Ubuntu kernels for security reasons.

You need to disable Secure Boot if you want to use hibernation.

Pilot6
  • 92,041
0

Not sure if it's better to post a link that might solve your problem, or to repost that solution below:


Since you're running Ubuntu 16.04, you should consider running the native systemd suspend/hibernate services in lieu of the pm-utils tools.

In my own case, here's what I've done to configure my machine for hibernate/resume using systemd:

  1. In etc/default/grub, configure GRUB_CMDLINE_LINUX_DEFAULT to include the resume parameter, passing the UUID of the swap partition in question (i.e., resume=UUID=453f0121-505d-42d3-8dad-87f913e67ddc). My current GRUB_CMDLINE_LINUX_DEFAULT is

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi resume=UUID=453f0121-505d-42d3-8dad-87f913e67ddc"

  2. Run sudo update-grub

  3. Edit/confirm resume=UUID=453f0121-505d-42d3-8dad-87f913e67ddc entry in resume file located in /etc/initramfs
  4. Run sudo update-initramfs -u
  5. Edit /etc/systemd/logind.conf to set HandleLidSwitch=hibernate (optional: permits hibernate to start on lid close)
  6. Run sudo service systemd-logind restart
  7. Reboot for good measure

I've bold-faced the two parameters that--for my machine--are important: pci=nomsi and resume=UUID=[your swap partition]. While the latter parameter is pretty well understood and is often refenced when talking about enabling hibernate on a Debian system, it took a bit of discovery to find the need for the former.

Best of luck!

richbl
  • 2,373