Monday, April 30, 2012

How to get hibernate working in Ubuntu 12.04 LTS

When I installed Ubuntu 12.04 two days ago, I was a bit surprised to see there is no hibernate entry in Unity system menu. Hibernation is disabled by default because it is not working here and there... As most people have notebooks these days, they will prefer to hibernate their laptops over suspend. I personally prefer both and use hibernate in most cases. So, I missed Hibernate.

Here is how I get it back.


First I try the command line:

sudo pm-hibernate 

yes, yes. it is working. My notebook HP Pavilion G6-1206su hibernated and went back smoothly. So, it is working, but I have no menu entry in Unity.

Damned Unity !@!@##@@#**#&#& !

After some investigation I see there is a solution. Create new file calling gedit through gksu

gksu gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

place this

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


and save. After you logout and login again you will have the Hibernate entry in Unity system menu. Check yourself.



2 comments:

  1. Great! It worked on Thinkpad T61 as well.
    Thank you!
    regards
    Thomas

    ReplyDelete
  2. Worked like a charm on an HP Mini 5102.

    ReplyDelete