Ubuntu – How to enable hibernation on ubuntu 16.04

16.04hibernatepower-managementsecure-boot

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.

Best Answer

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.

Related Question