Ubuntu 16.04 doesn't hibernate
I'm using Ubuntu 16.04 and am having trouble hibernating.
I have a 16 GB swap file (size of my ram) that is enabled and working,
but what sudo pm-hibernate
does is turn my screen off for a moment then back on, freeze the whole thing for another moment or two and then put me on a new line in terminal like nothing ever happened. Hibernating from the menu in Unity shuts off the screen for like 5 seconds and then puts me at the log-in screen. My session is still active though. Any help would be appreciated as I pretty much can't live without hibernation. This feature worked flawlessly under Windows 10.
PC is a HP Pavilion 17-F211NG with a Core i7 5500U and 16 GB of RAM.
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_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 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.conf
to 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!