In this article, I’ll show you how to enable hibernate support in Ubuntu 14.04 (“Trusty Tahr”) by making a “Hibernate” menu entry appear in Unity’s global system pulldown menu. The Ubuntu developers disabled this a couple of years ago because hibernate didn’t work reliably on all systems – proceed at your own risk!
Before changing any configuration, save your work, backup your data, then check if hibernation works on your system:
$ sudo pm-hibernate
The system should go to sleep and wake up when you power it on again. If it doesn’t, you first have to fix it before proceeding. When I encountered hibernation problems in the past, it was due to bugs in graphics or network device drivers. Sometimes I was able to work around it by selecting a different driver, but there have been cases where I had to wait for a new kernel release.
If pm-hibernate
worked, you can enable hibernate support by changing the configuration of the PolKit authorization framework. After a bit of searching, the following solution worked for me (note that the solution for Ubuntu versions before 13.10 is different!). As user root, create a file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
with the following 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 ResultActive=yes
Then run the following command to restart the session (or simply reboot):
$ killall indicator-session-service
You should then see the Hibernate system menu item.
Darn, the
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
-part disables my wireless upon wakeup from hibernate (or at least that’s the pracitcal effect). Also, “hibernate” only pops up in the shut down-menu in the top right corner but not in the menu called for when the power button is pressed. Any ideas on this?
Thanks and god morning!
/Erik
Hi Erik,
yes, I’ve experienced the disabled network effect *sometimes*. Does a manual “nmcli nm sleep false” after wakeup re-enable the network? This should bring NetworkManager back from sleep mode.
i am using dell inspiron 1525 recently i upgraded ubuntu13.10 to 14.10LTS. Hibernate option is not there and system not Suspend some times they are getting Black screen but laptop is working…….Please tell me the answers how to solve this problems and they are having many problems in this version……
In my machine it also appeared and disappeared. This is produced because my machine has multiple users created. You´ll need to also add this to the file:
[Re-enable hibernate for multiple users by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=yes
Hi,
I did this!!
check if ur hav a swap
sudo gedit /etc/fstab -> check ur swap uuid and /dev/sdaX
sudo blkid
cat /proc/swaps
sudo swapon -s
if u dont hav 1 create1
sudo swapoff -a
sudo /sbin/mkswap /dev/sdaX example xda6,4,5……
sudo swapon -a
sudo swapon –all –verbose
mountall -v
sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX=”acpi_sleep=nonvs resume=UUID=your uuid(swap)”
sudo update-grub
sudo gedit /etc/initramfs-tools/conf.d/resume
RESUME=UUID=your uuid(swap)
sudo update-initramfs -u
sudo mountall
Reboot
Good luck
Great, thank you!
On my system, for some reason the
echo disk > /sys/power/state
works fine in hibernating the laptop, butpm-hibernate
does not. I implemented the polkit edit to enable the hibernation option on the drop down menu, but it doesn’t work either. That is, the option is there now, but the behavior is like when evoking pm-hibernate.I have tried looking for solutions for that but coudn’t find yet. Do you have any suggestions?
Cheers,
Marcelo.
I had similar problem with hibernation in Ubuntu 14.04. I was missing swap space. Here is short tutorial how to solve this problem: http://www.jasom.net/how-to-enable-hibernation-in-lubuntu-14-04
Hope it helps somebody!
thanks man . it’s working fine in ubuntu 14.04.1 LTS
Found this useful, thanks :) Alternatively, you could also use
to restart just the top-panel.
Good to know, thank you!
Reblogged this on integralistul.
worked flawlessly in the first attempt…great post.
thanks it worked!
It really worked!!!
If you can’t, maybe you should consider increasing your SWAP space to be high as your current RAM installed. https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04