Ubuntu – Can’t get hibernate to work on Ubuntu 18.04

18.04hibernateswap

I can't get Hibernate to work on Ubuntu 18.04, I tried following these tutorials and after all the steps below hibernate still acts as a normal reboot.:

Github – gnome-shell-extension-hibernate-status

Askubuntu: Hibernation in 18.04

System:

ASUS N580VD with 16GB of ram and 20GB swap

Partition table:

sda     238,5G  
├─sda1    499M  Windows recovery 
├─sda2    100M  EFI System
├─sda3     16M  Microsoft reserved
├─sda4  117,9G  Microsoft basic data
├─sda5     20G  Linux swap
└─sda6    100G  Linux filesystem

Swap partition UUID:

sudo blkid | grep sda5
/dev/sda5: TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="8d0c9f85-0436-48b5-8973-6aec3b8e3445"

Content of /etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

# / was on /dev/sda6 during installation
UUID=27ed4a93-0aa1-d401-206c-4a930aa1d401 /               ext4    errors=remount-ro 0       1

# /boot/efi was on /dev/sda2 during installation
/dev/sda5       none            swap    sw              0       0
/dev/disk/by-uuid/01D4A10A933D25B0 /mnt/01D4A10A933D25B0 auto nosuid,nodev,nofail,noauto 0 0
/dev/disk/by-uuid/864A-6441 /mnt/864A-6441 auto nosuid,nodev,nofail 0 0

# Entry for Swap (added for hibernate): 
UUID=8d0c9f85-0436-48b5-8973-6aec3b8e3445 none  swap    sw              0       0

Contents of /etc/default/grub:

GRUB_DEFAULT="saved"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="2"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=8d0c9f85-0436-48b5-8973-6aec3b8e3445"
GRUB_CMDLINE_LINUX=""

export GRUB_COLOR_NORMAL="white/black"
export GRUB_COLOR_HIGHLIGHT="light-blue/black"
GRUB_SAVEDEFAULT="true"

Contents of /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

[Enable hibernate to be run via cron]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=yes

Content of /etc/initramfs-tools/conf.d/resume:

resume=UUID=8d0c9f85-0436-48b5-8973-6aec3b8e3445

Did these commands:

sudo update-initramfs -u -k all
sudo update-grub

I also installed gnome-shell-extension-hibernate-status. Any help would really be apreciated!

EDIT 1: Not only doesn't hibernate work, also my boot time from cold boot became incredibly slow!!

Best Answer

there is a package that you can use easily to hibernate,
open the terminal and write sudo apt install hibernate , it will ask you some questions and then you can hibernate using sudo hibernate

Related Question