Friday, March 1, 2013

How to enable hibernation: Ubuntu 12.04, 12.10+

ubuntu 12.04 power menu suspend hibernate
In Ubuntu 12.04 and newer software releases, hibernation has been disabled by default due to various bug issues. Hibernation is disabled by default only if the users hardware is not certified to work with hibernation. Only disabling this feature on known nonfunctional hardware may have been a better way to go, rather than disabling it for mostly all users.


Reasons for disabling Suspend/Hibernate:


One of the main reasons Suspend and Hibernate have been disabled by default in Ubuntu 12.04 and newer is because of the notion that Suspend and Hibernate often do not work on newer hardware models without extensive software fixes. This is to be argued with, as many Ubuntu users will say that they have never had a problem with the  Suspend and Hibernate features in previous releases, and still do not. Another reason given was that, "The nature of Suspend/Hibernate bugs is that while they can be fixed for individual machines, the only feasible way to prevent them from occurring, again and again with new hardware models, is for hardware to be certified (mpt)." This is also controversial because, many Ubuntu users would have rather had a "blacklist" than a "whitelist". Ubuntu developers also thought that for the Ubuntu OS to contain a Suspend feature that does not work is 'unprofessional', and having a hibernate function that does not work, and has the potential to destroy data, is even worse.


Enable Hibernate:

-->
It is possible to enable hibernation on Ubuntu 12.04 and later, but requires editing of the enable-hibernate file. Before attempting to enable hibernation it is highly recommended that you test whether it will work correctly on your machine. To do this, start a session of terminal and run the following command as a super user.

sudo pm-hibernate

terminal session test for Ubuntu 12.04 hibernate compatibility to enable hibernation

If your system starts again you are most likely safe to perform the override. To do so, start editing:

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

Fill the file with this:


[Re-enable hibernate by default] 

Identity=unix-user:* 

Action=org.freedesktop.upower.hibernate 

ResultActive=yes
Save by pressing Ctrl+O and exit nano by pressing Ctrl+X
Restart and hibernation should be enabled.

If the hibernate option is not yet available in the power menu run:

sudo update-grub


Disable Suspend Button:


For as many users that would like to enable the suspend/hibernate button, some of them may want to disable it. This is for them.

From terminal start an edit session:

sudoedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.disable-suspend.pkla

Fill it with this:


[Disable suspend by default] 

Identity=unix-user:* 

Action=org.freedesktop.upower.suspend 

ResultActive=no
Save by pressing Ctrl+O and exit nano by pressing Ctrl+X.
It should be gone as soon as you view the shutdown menu.

Related:
Sources:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...