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 Answers
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":
Stop using
sudo pm-hibernate- it is not working any more.Modify the
/etc/default/grubso that theGRUB_CMDLINE_LINUX_DEFAULTvariable contains alsopci=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,uuidFull example here:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi resume=UUID=d30170d7-b3a2-38c5-a386-541a6d0013c7"Update the new grub configuration:
sudo update-grubCreate a new file
com.ubuntu.enable-hibernate.pklain/etc/polkit-1/localauthority/50-local.d/:sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pklaand 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=yesIf you are using encryption, you must tweak it a little bit more - it is well described here.
Reboot the computer.
You should now be able to see the hibernate option in the poweroff menu and it should work.
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.
- 92,041
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:
In
etc/default/grub, configureGRUB_CMDLINE_LINUX_DEFAULTto 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 isGRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi resume=UUID=453f0121-505d-42d3-8dad-87f913e67ddc"
Run sudo update-grub
- Edit/confirm resume=UUID=453f0121-505d-42d3-8dad-87f913e67ddc entry
in resume file located in
/etc/initramfs - Run sudo update-initramfs -u
- Edit
/etc/systemd/logind.confto set HandleLidSwitch=hibernate (optional: permits hibernate to start on lid close) - Run sudo service systemd-logind restart
- 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!