Hibernate not working in 18.04
Solution 1:
This instruction worked for my Ubuntu 18.04 installation.
-
sudo apt install hibernate
It will install hibernate and other dependencies which are needed to hibernate -
grep swap /etc/fstab
(find UUID) -
sudoedit /etc/default/grub
At the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" add UUID of swap.The line looks like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<UUID of swap>"
You can choose
`quiet splash` will hide the boot screen output `splash` will display the boot screen output
-
sudo update-grub
-
Restart, and after restart
sudo systemctl hibernate
. If everything works ok add menu entry's. -
sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
now paste 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
- Restart the computer
- Install https://extensions.gnome.org/extension/755/hibernate-status-button/