Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 969 Bytes

Enabling_Hibernation_in_Arch_Linux.md

File metadata and controls

59 lines (40 loc) · 969 Bytes

Author: Keyitdev
Source: Keyitdev/notes
Last edited on: 30 Mar 2024

Enabling Hibernation in Arch Linux (using swap partition, hibernation to disk)

Find swap UUID

sudo lsblk -o FSTYPE,UUID | awk '/swap/ {print $2}'

Edit /etc/default/grub and generate grub config

GRUB_CMDLINE_LINUX_DEFAULT='quiet resume=UUID=YourSwapPartitionUUID'
sudo grub-mkconfig -o /boot/grub/grub.cfg

Edit /etc/mkinitcpio.conf and generate initramfs

Add resume AFTER udev.

HOOKS=(base udev resume ...)
mkinitcpio -p linux

Hibernate

systemctl hibernate

Other useful commands

cat /etc/fstab | grep swap
sudo blkid | awk '/swap/ {print $2}'
swapon

Sources

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation

https://www.baeldung.com/linux/swap-uuid