Desktop/setup/tweaks/enable-hibernation.sh

17 lines
587 B
Bash

# Run this to get required swap size in KiB and create swap partition
# echo $(($(cat /proc/meminfo | awk '/MemTotal/ {print $2}')+5000))
# Disable Fedora's ZRAM
sudo dnf remove zram-generator-defaults
sudo swapoff -a
# Get UUID using sudo blkid /dev/sda3
echo 'UUID=56a260a8-5a66-40db-bcb6-701f72a890bb none swap sw 0 0' | sudo tee -a /etc/fstab
sudo swapon -a
# Get UUID and physical offset and edit /etc/default/grub
# To GRUB_CMDLINE_LINUX_DEFAULT add "resume=UUID=56a260a8-5a66-40db-bcb6-701f72a890bb"
# Regenerate grub
# sudo grub2-mkconfig -o "$(readlink -e /etc/grub2.conf)"