Fix Ubuntu / Lubuntu ‘Hypernation Button Does Nothing’ Problem

# Step 0: find swap

# Option A:
root@kimlinux:/home/kim# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/dm-0                               partition       16777212        0       -2

# Option B:
root@kimlinux:/home/kim# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-0                               partition       16777212        0       -2

# Option C
ls -l /dev/disk/by-uuid

root@kimlinux:/home/kim# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Aug 26 08:25 4061-23B6 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug 26 08:25 a7e20382-d8f0-4d64-82ad-f161fc45610e -> ../../sdb2
lrwxrwxrwx 1 root root 10 Aug 26 22:21 c7d5f77d-29d6-4ac7-bcf6-cf32b691ce48 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 26 22:21 d7623939-d093-4461-bcd9-deef3e22427c -> ../../dm-0

# Step 1:
Edit /etc/default/grub

replace this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with this line (add swapfile location):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/dm-0"
or
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/d7623939-d093-4461-bcd9-deef3e22427c"

# Step 2: update grub & initramfs
sudo update-grub
sudo update-initramfs -u

# Step 3: test
sudo systemctl hibernate
Posted on Categories Linux

Leave a Reply

Your email address will not be published. Required fields are marked *