I’ve followed this guide https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/s2-swap-creating-file.html
Whenever I try to hibernate as root or as a non-root user, I get
Failed to hibernate system via logind: Not enough swap space for hibernation
and when I analyze systemd-logind, I see the error
Failed to open swap file /swapfile to determine on-disk offset: Permission denied
❯ ll /swapfile
-rw-r–r–. 1 root root 10G Jun 22 17:48 /swapfile
❯ cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt4)/boot/vmlinuz-5.6.19-300.fc32.x86_64 root=UUID=4f840e1e-09e1-4f90-8a6b-159a1c48b53a ro rhgb quiet loglevel=3 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 re
sume=UUID=4f840e1e-09e1-4f90-8a6b-159a1c48b53a resume_offset=11366400 intel_pstate=disable zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4
❯ cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 10485756 0 -2
❯ blkid /dev/sda4
/dev/sda4: LABEL=“Root” UUID=“4f840e1e-09e1-4f90-8a6b-159a1c48b53a” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“c5654dce-ac58-453b-b28f-f41ebef1167d”
❯ cat /sys/power/resume
8:4
❯ lsblk /dev/sda4
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda4 8:4 0 59.2G 0 part /