Enabling Hibernate Support in Ubuntu 14.04 LTS

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!

Unity System Menu

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.

social