I’ve written a post about how to enable hibernate option in previous Ubuntu releases. Ubuntu 13.10 is a little different, so I write this tutorial to teach how to enable this feature in Saucy Salamander. Hope it helps!
Hibernate is disabled by default in Ubuntu, when the computer hibernates, all of your applications and documents are stored and the computer completely switches off so it does not use any power, but the applications and documents will still be open when you switch on the computer again.
Test if hibernate works
Before getting started, press Ctrl+ALt+T on your keyboard to open terminal. When it opens, run:
After you computer turns off, switch it back on. Did your open applications re-open? If hibernate doesn’t work, check if your swap partition is at least as large as your available RAM.
The indicator-session was updated to use logind instead of upower. Hibernate is disabled by default in both upower and logind.
To re-enable hibernate, run below command to edit the config file:
sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Copy and paste below lines into the file and save it.
[Re-enable hibernate by default in upower]
[Re-enable hibernate by default in logind]
After reboot, the login screen session menu should have a Hibernate option.
After logged in, the desktop session menu still doesn’t have the Hibernate option. Run
killall indicator-session-service and the menu will be updated with Hibernate. This is a little buggy, because you need to run this command everytime you login to get the option. If you know how to fix it, tell me and thanks!
UPDATE: Thanks to MoonShadow, here’s the method to kill indicator services at startup:
1. Go to Startup Application from Unity Dash.
2. Click Add and type in:
Name: restart indicator services
Command: sleep 60 && killall indicator-session-service
Thank you. I really missed the hibernate function after I upgraded from 13.04.
nothing works, tried all why?
Try create and edit the config file at:
I wonder why in http://askubuntu.com/questions/361734/hibernation-is-still-missing-from-menu-in-13-10-after-enabling-via-polkit-how-t but on /etc/ instead of /var/lib/
I’m not sure. The configuration under “/etc/polkit-1/” doesn’t work for all people, including me. The “/var/lib/polkit-1/” works in my case.
In this case, I just open gnome-session-properties and put the killall indicator-session-service command in there so I don’t have to remember to run it every time.
Correction. I put “sleep 60 && killall indicator-session-service” in gnoe-session-properties. For some reason, it needs that little bit of time before it takes on startup.
Thanks. It works perfectly. But do you know why it is disabled by default?!
Hibernate doesn’t work in many cases, which can cause you to lose data if you expect your documents and applications to re-open when you switch your computer back on. Therefore, hibernate is disabled by default.
You must check out that hibernate works in your case, then re-enable it with this guide.
Somewhat odd that some systems work with the /etc-file and some with the /var/lib-file. I had the same problem as you others and couldn’t get a hang of it modifying the /etc-file. So instead I changed the flags from “no” to “yes” in /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla and ta-da, problem solved. Hibernation now works like a charm (And it did before too, only just via the terminal. I deleted the /etc-file since I didn’t see any use for it.). Thanks for all your help!
to enable the hibernate menu option all what you need to do is add “killall indicator-session-service”, without “”, to the stratup applications. and all is done automaticly evey time you start Ubuntu.
i tried “sudo pm-hibernate” but my computer doesn’t do anything,instead the lights go off and on again…No hibernation,any help please?
Really worked, my menu has now an hibernate-option (Ruhezustand in german language). But i have an other question. Is there a way to get this hibernation into the engery-options as well? I really would apreciate that my computer hibernates when i close my laptop, any hints?
Thanks a lot
1.Edit “/etc/systemd/logind.conf” via command:
2. Change the line #HandleLidSwitch=suspend to HandleLidSwitch=hibernate and save the file.
3. Run command below or just restart your computer:
I found a workaround on ubuntu gnome 13.10 x64: just install hibernate:
sudo apt-get install hibernate
The only problem is that apport will issue three errors when starting up after normal Power Off. For this you can disable apport:
sudo gedit /etc/default/apport
Then change enabled=0.
To change settings from hibernate edit files in /etc/hibernate. In hibernate.conf you can comment “TryMethod tuxonice.conf” and “TryMethod ram.conf” and leave uncommented “TryMethod disk.conf” as for hibernate you only need to use the disk, like this:
I’ve been struggling with Hibernate since installing Ubuntu – your fix worked finally for me! Thank you so much. Who knew it was as simple as installing a package..
Thanks… worked well for me.
But, my wifi is not working on starting from hibernate.
I need to restart my laptop to make wifi working again.
Laptop: Acer aspire x timeline 4820T
I can’t understand why such very basic thing as hibernation must be established by a complicated manual procedure. Why is this not enabled as default, like in Windows? Why is there not a script or a small application?
My windows 8 has hibernate disabled by default.
sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla works for me in ubuntu 13.10 gnome edition. I’ve got a working hibernate menu entry (with the alternate shutdown menu gnome shell extension installed), without even having to restart. The problem is that I’d like the laptop to enter hibernation when power is critically low, but I still can’t select the hibernate option in System Settings > Power at the appropriate entry. The option appears there (as it did even before properly enabling hibernation), but it is greyed out.
Comments are closed.