#!/bin/bash ### FROM BOOT DISK # remove cryptswap entry vi /etc/crypttab # remove swap from fstab vi /etc/fstab # reboot into firmware, select one time boot and choose USB live installer systemctl reboot --firmware ### BOOT FROM USB LIVE INSTALLER POP!_OS # using gParted or GNOME Disks, remove your previous swap partition # using gParted or GNOME Disks, create a new swap partition at the end of your disk that is your total RAM + 2GB # I have 32GB of RAM, I created a 35GB swap partition # reboot back to boot disk systemctl reboot ### FROM BOOT DISK # add swap partition to fstab >> '/dev/nvme0n1p4 swap swap defaults 0 0' vi /etc/fstab # enable swap swapon --all --verbose # add boot option for kernel to know where hibernation needs to be resumed from. blkid | grep swap kernelstub -a 'resume=UUID=f44f6cb9-8bab-4ab8-99fb-c409ad6e9668' # enable a suspend then hibernate, defaults to two hours of suspend2ram followed by a hibernation ln -s /usr/lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service