I'm running Ubuntu Focal and I have 15gigs of Ram and 20G of swap space.
Partition: ID-1: / size: 437.52 GiB used: 47.14 GiB (10.8%) fs: ext4 dev: /dev/sda5
ID-2: swap-1 size: 19.53 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda6
I've tried adding acpi=noirq to my grub boot options but it didn't work and it ended up disabling my keyboard.
When I type sudo pm-hibernate and turn the computer back on it starts up normally.
Is there something else I could try?
To enable Hibernation in 20.04 using swapfile:
Confirm
swapfile
size matches RAM sizeCheck the swap that is in use:
If swap partition(s) are found:
Add
#
before theUUID
of the swap partition(s):Add a line for the
swapfile
, if one does not exist:Create the
swapfile
:where
X
isswapfile
's size in GB:Reboot:
Add
resume
location and offset togrub.cfg
:Edit
/etc/default/grub
:Use
UUID
from root.Use offset from:
Update GRUB:
Test hibernation:
A hibernate button can be added using GNOME extensions.
Note that there is a slight possibility of getting holes in a
swapfile
when creating it withfallocate
./var/log/syslog
can be searched for the phraseswapon: swapfile has holes
to ensure there will be no data loss.A swap file can alternatively be created using
dd
:An error when using
dd
may overwrite your HDD.