[GUIDE] Framework 16 Hibernate (w/ swapfile) Setup on Fedora 40

I also have Framework 13/Fedora 40/AMD Ryzen, with gnome

I followed this guide but had some more/different steps.

First, It seems that with systemd 255, there is no more need to set resume and resume_offset in grub.

So from Tarian’s guide, I follow step 1 to 3 then 7 to 11.

At this step, I had the Call to Hibernate failed: Invalid argument message when trying to hibernate.
In journalctl, I had Failed to find location to hibernate to: Invalid argument message.
This is due to /sys/power/resume file containing 0:0 instead of ID of the partition hosting the swapfile.
Mine is on /dev/nvme0n1p3:

root@arcadia:~# ls -l /dev/nvme0n1p3
brw-rw----. 1 root disk 259, 3 11 août  10:11 /dev/nvme0n1p3

So I need to use 259:3

Next, I follow what @tail_Head said:

  • create /etc/dracut.conf.d/resume.conf but with some modifications to make /sys/power/resume modifications consistent:
cat <<EOF >/etc/dracut.conf.d/resume.conf
add_dracutmodules+=" resume "
install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service "
EOF
dracut -f
  • set selinux to permissive to use audit2allow
cd /tmp
sudo audit2allow -b -M systemd_hibernate
sudo semodule -i systemd_hibernate.pp
sudo audit2allow -b -M systemd_sleep
sudo semodule -i systemd_sleep.pp

Then, I finished with step 17 from Tarian’s guide

And for now, all seems to work

1 Like