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

**URL:** <https://community.frame.work/t/guide-framework-16-hibernate-w-swapfile-setup-on-fedora-40/53080>\
**Category:** Linux\
**Tags:** fedora\
**Created:** [June 17, 2024, 4:21am UTC](https://community.frame.work/t/guide-framework-16-hibernate-w-swapfile-setup-on-fedora-40/53080 "2024-06-17T04:21:39Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![underscoreDje](https://avatars.discourse-cdn.com/v4/letter/u/3bc359/32.png) [@underscoreDje](https://community.frame.work/u/underscoreDje)\
**Post date:** [August 11, 2024, 11:46am UTC](https://community.frame.work/t/guide-framework-16-hibernate-w-swapfile-setup-on-fedora-40/53080/10 "2024-08-11T11:46:57Z")

</div>

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:

```auto
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:

```auto
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

```auto
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

---

_[View the full topic](https://community.frame.work/t/guide-framework-16-hibernate-w-swapfile-setup-on-fedora-40/53080)._
