Ubuntu 17 hibernate

By default Ubuntu 17.10 has hibernate disabled since most of the time it does not really work.

I followed the instructions at How to enable hibernate and it works for me

First test it to make sure it works, keep in mind that you have to give this command some time (20-30 seconds) to complete.

Open a terminal and run the following.

1
sudo systemctl hibernate

If the system comes back after turning on the power again, you can proceed to the next step.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sudo vim /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

# Press i to enter insert mode

[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

# Press <esc> :wq to save the file

Now reboot the machine and open the power options, you will have a new option hibernate you can select.