6

I know there are lots of threads about this already, but none of them works for me. I tried the solution mentioned here:

This is what I tried:

1) sudo pm-hibernate doesn't do anything.

2) sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

That file now looks like this:

[Re-enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes

[Re-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

[Re-enable hibernate by default for login1] Identity=unix-user:*
Action=org.freedesktop.login1.hibernate ResultActive=yes

[Re-enable hibernate for multiple users by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=yes

I also changed the file to this:

[Re-enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes

[Re-enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions ResultActive=yes

... but still, it doesn't work.

3) sudo update-grub still no hibernate option in the menu

4) Installed tuxonice

sudo add-apt-repository ppa:tuxonice/ppa
sudo apt-get update
sudo apt-get install tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice

Then sudo pm-hibernate. No results

5) sudo apt-get install hibernate then sudo systemctl hibernate I get this error message:

Failed to hibernate system via logind: Sleep verb not supported

6) sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla then looked for

[Disable hibernate by default in upower] 
[Disable hibernate by default in logind]

...and changed ResultActive=no to ResultActive=yes

Additional information:

  • After executing the steps above and restarting my PC for every steps I mentioned above, hibernate still doesn't show up.
  • Ubuntu 16.04; Intel® Kabylake GT2
  • I'm using an SSD
  • My swap is larger than my mem (tested with free).
  • sudo locate pm-suspend.log doesn't result in anything after executing sudo pm-hibernate
  • I executed dmesg before and after executing sudo pm-hibernate and compared the two outputs of dmesg. Both outputs are identical

EDIT:

I think I found the reason: You have to disable the secure boot option in the BIOS. To do that, interrupt the normal boot process and it is in the option secure boot.

1
  • 3
    This is correct. Secure Boot disables hibernation. Write it as an answer.
    – Pilot6
    Jun 11, 2017 at 10:27

2 Answers 2

2

I think I found the reason: You have to disable the secure boot option in the BIOS. To do that, interrupt the normal boot process and it is in the option secure boot.

2

Open the Terminal by pressing Ctrl+Alt+T or by searching for terminal in the Dash.

Type sudo systemctl hibernate into the terminal and press Enter. Enter your password when prompted.

After you computer turns off, switch it back on. Did your open applications re-open?

If the hibernate test works, you can continue to use the sudo systemctl hibernate command when you want to hibernate.

You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-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

Source

2
  • 1
    I wonder why was this downvoted, as it may seem elegant to just need a single command :-)
    – matanster
    Jun 17, 2018 at 12:18
  • As @matt states, sudo systemctl hibernate works well, though it requires a password entry (not necessarily a bad thing, since PW entry serves as a reminder that your caching, perhaps unencrypted, the current system state). Jun 19, 2018 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .