Featured Post

Linux daemon using Python daemon with PID file and logging

The python-daemon package ( PyPI listing , Pagure repo ) is very useful. However, I feel it has suffered a bit from sparse documentation, an...

2012-05-22

Laptop hibernate in Ubuntu 12.04 LTS Precise Pangolin

Having switched back to Ubuntu Unity/GNOME from KDE on my laptop, I discovered that the option to hibernate (i.e. suspend to disk) was disabled.
This is due to a bug in policykit-desktop-privileges. To reënable, here are instructions. You have to create (use sudo) a local policykit authority file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla and add the following stanza:
[Re-enable hibernate by default]
Identity=unix.user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
 You will probably have to log off and then back on again for it to take effect.

UPDATE: In addition, for "suspend" (i.e. suspend to RAM), you will need the apmd package. The upower and pm-utils packages are also required, but those should have been installed by default.