Enable Hibernation in Linux Mint 16 "Petra" XFCE
Recently I decided to do my ears a favour and bought a new fan for my old Sony 13" laptop. After exchanging the fan, I found the hard disk being too noisy, so I replaced it with a shiny 240 GB SSD as well. I should have done that earlier ...
Nevertheless: time to try a fresh Linux distribution. I installed Linux Mint 16 (based on Ubuntu Saucy 13.10) in the XFCE flavour. Last time I have tried XFCE was in Xubuntu Dapper 6.06 in 2006 -- and its minimalistic UI without any eye candy didn't please me well that time ... But today, I found a very nice UI with a lot of eye candy and none of the annoying stuff that just slows my computer down. Wow!
After a short testing time, I decided that XFCE was a good decision. However, I missed a critical feature: hibernation or suspend to disk. No idea why, but this is no longer enabled by default in Ubuntu and derivates.
After successfully shutting down my laptop with
sudo pm-hibernate, it did not wake up properly, but just rebooted into the standard login. The first lession I learned was that Mint crypted my swap space using a random password, because I enabled encryption for my home directory during the installation. Not good.
Digging through a plethora of tutorials and descriptions, I found the right one:
I followed the steps as described, except for step 10, which is useless on XFCE.
After rebooting, Mint asks for a password, decrypts swap, restores the recovery image or continues booting. Nice.
But one final thing was missing: hibernation was missing in the log out dialogue.
On a terminal, type:
sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
and add the second block as described below:
[Re-enable hibernate by default] 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
After saving the changes, the log out dialogue shows the hibernation button again.