In Ubuntu 12.04 and newer, hibernation has been disabled by default in policykit. How can I enable this back?
|
First you need to test your machine supports hibernation. Test it with the command:
Ubuntu 16.04 and aboveFor enabling in the interface you'll need to run
Ubuntu 14.04 and 15.04For enabling in the interface you'll need to run
It has several stanzas as you might have multiple users (so that is doesn´t depend of multiple-users or upower as manager instead of login1) p.s.: official latest documentation https://help.ubuntu.com/stable/ubuntu-help/power-hibernate.html |
|||||||||||||||||||||
|
|
I have Ubuntu Gnome 17.04 amd64 on my notebook. I did the following to enable hibernation: $ This installed also Then I could successfully hibernate with $ Inserted: (source)
Installed https://extensions.gnome.org/extension/755/hibernate-status-button/ |
||||
|
|
Enabling hibernation with a scriptI have translated above answers to Script
Script
Note: Do not forget to |
||||
|
|
|
If this answer does not work in Ubuntu 13.10, see here for an alternative answer You can follow official documentation here. Hibernation was disabled on 12.04 for machines that are not certified with Ubuntu. In order to enable hibernation you need to test whether it works correctly by running To do so, start editing:
Fill it with this:
Or in 14.04 and later:
Save by pressing Ctrl-O then enter and then exit nano by pressing Ctrl-X. Restart and hibernation is back! Or run Some users will then need to run |
|||||||||||||||||||||
|
|
A simple command which does the exact same thing as the accepted answer except non-interactively:
|
||||
|
|
|
If the response with
And try to use TuxOnIce. First ensure you have enough of swap. It should be the same size or bigger as the amount of your RAM. Use command
rule Swap > Mem. If this is not the case, enlarge your swap size. Then install TuxOnIce by
Then you can try to do a hibernate test run by:
Do not forget to save your work before you do it. If all went fine, your computer will switch off. After switching it on, you will get your desktop in the state you left in it before hibernation. |
|||||
|
|
First, I do recommend that you test if your laptop supports hibernation, because the reason why hibernation is disabled by default is because it sometimes has fatal results on some machines. Test your machine by Ctrl+Alt+T and then Your machine should hibernate. Wake your machine up after hibernation and observe if it misbehaves or if it acts normally. If you experience any abnormality after the hibernation, then I advise you don't continue with the following procedure. However, if it works just fine, continue to activate hibernation by
Edit the opened file and add this lines:
After this, restart your machine, and upon login, you should see a hibernation option on the top right settings corner. |
|||||||||
|
|
Additionally, for those who want to disable the suspend button (for various reasons), proceed analogously... Choose any file name, but this is one is verbose/convention:
Fill it with this:
Ctrl+O, Enter, Ctrl+X No need to restart, it should be gone as soon as you go into the shutdown menu. |
|||||||||
|
|
One more thing: When you want to add the hibernation option to XFCE's panel, you have to right-click your name (topright) and select After that a screen pops up:
Make sure, you check Hibernate like I did. |
|||
|
|
|
In 12.04, I successfully enabled hibernate option in the indicator menu to hibernate. But Still I wasn't able to successfully resume from hibernate. I did follow these steps to fix this problem: Enable Hibernate in 12.04To enable Hibernate, I followed this answer from Dima. After enabling hibernate, I could hibernate. But the problem is, I can't successfully resume from hibernate. Any time I start my PC from hibernate, it boots like a normal boot. So, I had to do these things to be able to resume from hibernate. The fixes to be able to resume from hibernateThere is two way to fix this. 1. Editing the
|
|
|
file this as a seperate question & answer. As people may search for "fail to resume from suspend" and not find your excellent write up.
– Dima
Oct 4 '12 at 8:44
|
||
|
|
After your suggestion, I created this self-answered question askubuntu.com/questions/196364/…
– Anwar
Sep 11 '16 at 8:19
|
protected by Community♦ Apr 29 '12 at 10:22
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

btrfspartition is used. See here askubuntu.com/questions/768136/… – Anwar Sep 11 '16 at 8:31