Enable Hibernate in Ubuntu
In Ubuntu machine, we have hibernate option as in windows. But on desktop menu there is no hibernate option displayed which could make it possible.In this post we will see HowTo Enable Hibernate in Ubuntu 188.8.131.52
We have one command for hibernation on Ubuntu machines “systemctl hibernate” , but what if we like to make enable hibernate in Desktop menu. For same we have to edit one system files below mentioned in post.
We are using Ubuntu 16.04.3 latest as of now Oct 2017
root@jarvis:~# uname -r 4.4.0-97-generic root@jarvis:~# lsb_release -d Description: Ubuntu 16.04.3 LTS
By Default Ubuntu machine has menu like displayed in below image, this doesn’t have any hibernate option which could use for Machine hibernation.
For enabling hibernation we have to create a file “/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla” and put some content.
cat > /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla [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
Now we need either reboot machine or kill all menu items with below command.
Now we could see we have hibernate option in system menus which could use to hibernate Ubuntu 16.04.3 machine.