In Ubuntu 12.04 and newer, hibernation has been disabled by default in policykit. How can I enable this back?
If this answer does not work in Ubuntu 13.10, see here for an alternative answer
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!
Some users will then need to run
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.
For Ubuntu 14.04 with multiple users you´ll have to add this tags (so that is doesn´t depend of multiple-users or upower as manager instead of login1)
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.
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.
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.
A simple command which does the exact same thing as the accepted answer except non-interactively:
I have translated above answers to
Note: Do not forget to
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.
Would you like to answer one of these unanswered questions instead?