Activate Hibernate in Ubuntu 12.04

From Thomas-Krenn-Wiki
Jump to: navigation, search

The Hibernate feature is not active by default under Ubuntu 12.04 (Precise Pangolin). This set of instructions will describe how it can be activated from the command line.

Ubuntu 12.04

The Hibernate feature has been deactivated since this version of Ubuntu, as the feature does not work properly on many computers.

Unfortunately at this time, there is no way to activate it from the GUI (see [1]).

Before activating the Hibernate feature, it should be tested from the command line. Open a console to do this and execute the following command:

sudo pm-hibernate

The computer should then switch to hibernate mode and shutdown. After a re-start, all of the applications that were open before Hibernate was executed should be available again. If this does not work, check the prerequisites for the Hibernate feature (see #Prerequisites for Hibernate).

In order to activate this feature in the GUI, you must create the following file: /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

After re-booting, the Hibernate feature should be able to be activated from the Power menu.

Prerequisites for Hibernate

The Hibernate mode uses the Linux swap partition to store the contents of the main memory (RAM). For that reason, the swap partition should be at least as large as the amount of RAM in use.

You will find additional information regarding the Swap and Hibernate features here: https://help.ubuntu.com/community/SwapFaq#line-56

If the swap partition has been encrypted, this can be problematic for Hibernate (see [2]).

Additional Information

Related articles

Current version information for Ubuntu
Installation of Ubuntu 12.04 LTS Server
Thomas-Krenn Ubuntu Repository