I did a clean install of 15.04, tried to enable hibernation per instruction from http://ubuntuhandbook.org/index.php/2014/10/enable-hibernate-option-in-ubuntu-14-10-unity/

but it works only if I boot with upstart and not with systemd.

How can I get it to work with systemd?

EDIT>After installing hibernate package I can run it from the terminal, but still it is not available in the shutdown menu.

up vote 17 down vote accepted
  1. Create the following file: /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

  2. Copy / paste the following content into it:

    [Enable hibernate by default in upower]
    Identity=unix-user:*
    Action=org.freedesktop.upower.hibernate
    ResultActive=yes
    
    [Enable hibernate by default in logind]
    Identity=unix-user:*
    Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
    ResultActive=yes
    
  3. Log out and check that you can see the hibernate menu item on the login screen, do the same once you logged in.

The reason the above manual step needs to be done is that they seem to have disabled hibernate by default in Ubuntu 15.04.

  • First it didn't change anything; after I logged in this file was gone, so I re-created this file, and tried again with the same result: just like normal shutdown except the nuisance of switching the screen on and off a couple of times before shutdown, and reporting a system problem on login. No wonder they disabled this feature by default ;-) I have only sudo pm-suspend-hybrid working though. – Sadi Oct 3 '15 at 8:49
  • 2
    Wov, got it! I worked like a charm after adding the resume parameter to kernel boot options as per: help.ubuntu.com/community/PowerManagement/Hibernate – Sadi Oct 3 '15 at 9:07
  • 1
    What about the simple solution at tipsonubuntu.com/2015/04/30/… ? I admit I haven't tried it yet but the comments suggest it works. – Carl Witthoft Oct 13 '15 at 23:01
  • Are the 3 steps of this answer all that needs to be done on a vanilla 15.04 install? (or are they, what needs to be done on top of the instructions the OP has followed?) – Frank Nocke Oct 18 '16 at 23:57
  • Still helps in 17.04 (zesty)! Thx! – midenok Jan 26 '17 at 1:04

The answer given by Jinesh Choksi to create the file /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla doesn't seem to work for me, when I resume hibernation, it just performs a normal boot. The best option I've found is the classic pm-hibernate, which works with no issues:

sudo pm-hibernate

You also have the option of a hybrid suspend/hibernate. From the man pages:

pm-suspend-hybrid
    Hybrid-suspend is the process where the system does everything it needs to hibernate, but suspends instead of shutting down. This means
    that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run
    out of power. s2both(8) is an hybrid-suspend implementation.
  • What is the version you're using? – tomchiukc Mar 10 '17 at 2:34

protected by Community Sep 16 '15 at 6:47

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?

Not the answer you're looking for? Browse other questions tagged or ask your own question.