Certainly! Here is what I’ve tried (can be not in a professional or even correct way)
Initially, there’s no swapfile. So, I used btrfs subvolume create
and btrfs filesystem mkswapfile
to create one. However, no matter how big the size I set to the swapfile, I received the “not enough swap space” message when trying to hibernate. Then I switch to swap partition with:
-
use gnome-disk-utility to reduce the size of my filesystem partition. Then, create a partition and set its type to Linux swap.
-
add the line to /etc/fstab:
/dev/nvme0n1p6 swap swap defaults 0 0
-
mkswap /dev/nvme0n1p6
then activate it withswapon /dev/nvme0n1p6
-
edit /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p6"
-
update GRUB with
update-grub
-
test with
systemctl hibernate
and it worked.