[RESPONDED] Fedora 39 Hibernate - Framework 13 Intel

I’m trying to set up hibernate on my Framework 13th generation with Intel CPU. It seems like this is maybe not recommended (at least, according to some links I found) but I never remember to shut down my laptop before long periods of not using it (nights, workdays, etc.) and it loses a lot of battery life in standby using both s2idle and deep.

I found a number of guides for enabling Hibernate on older versions of Fedora but haven’t found much for Fedora 39 written in 2023. The most complete guide I found was this post from the framework forums but that information was a little outdated apparently so I also followed this specific comment from a Fedora forum for the actual setup of Hibernation.

I think I’ve performed this setup correctly (after messing up an fstab edit and ending up in emergency mode lol) but I’m pretty new to linux/Fedora and have a few questions:

  1. Some of the time when I run systemctl hibernate the power button flashes then turns off. When I push it again the laptop shows the Fedora boot loader (as though it had shut down) but then also loads back my work (as though it had hibernated successfully). Is this right? It’s also inconsistent which is odd…

  2. Is there a way for me to tell whether my laptop is hibernating? When I open if after longer than HibernateDelaySec it allows me to login instantly and all my applications are as they were which doesn’t match with my understanding of hibernation

Thanks!

It seems like this is maybe not recommended (at least, according to some links I found)

What links exactly? I’m interested …

The most complete guide I found was this post from the framework forums but that information was a little outdated apparently so I also followed this specific comment from a Fedora forum for the actual setup of Hibernation.

I wrote that guide and for me it’s still working, event for Fedora 39. Btw, the actual step for hibernation is documented under step 3, apparently it’s the same thing as described in the Fedora forum.

Some of the time when I run systemctl hibernate the power button flashes then turns off. When I push it again the laptop shows the Fedora boot loader (as though it had shut down) but then also loads back my work (as though it had hibernated successfully). Is this right? It’s also inconsistent which is odd…

That is right. What inconsistency?

Is there a way for me to tell whether my laptop is hibernating? When I open if after longer than HibernateDelaySec it allows me to login instantly and all my applications are as they were which doesn’t match with my understanding of hibernation

Do you have plymouth enabled (graphical boot up)? If you skip plymouth (or push the ESC button) you should see how your computer is resuming (logs).

What links exactly? I’m interested …

Sorry I’m only allowed to post two links lol. This is where I saw that hibernation was not “recommended”. In retrospect I realize this is not exactly an official source…

https://www.reddit.com/r/Fedora/comments/r4a4so/interesting_fedora_does_not_support_hibernation/

That is right. What inconsistency?

Sorry should have elaborated. Some of the time after hibernation I see the boot loader briefly and sometimes I don’t see it although in either case hibernation seems to be working fine

Do you have plymouth enabled (graphical boot up)?

I ran sudo systemctl status plymouth-start.service and it shows “active”.

However, I think my issue is that my computer only suspends and never hibernates when I close the lid. If I run systemctl suspend-then-hibernate things work as-expected. However if I close the lid for the night when I open it in the morning it pops up the login screen immediately. It looks like there was a regression in this functionality in systemd version 252 ref but it sounds like this was reverted in version 253 and I have version 254. Is there a way for me to debug why my computer doesn’t transition from suspend to hibernate when I close the lid? Here are my relevant settings

I think the journal logs should be able to tell, given the invoked command is systemd based systemctl hibernate.

should show with

journalctl -b 0

Thank you. Looks like I had forgotten to chmod +x one of the scripts in the setup.

Also, should I be concerned if audit2allow is still trying to block sleep-related actions like this?

#============= systemd_sleep_t ==============
allow systemd_sleep_t efivarfs_t:file create;

I think I figured it out

Does your guide work for Fedora 40 (AMD) as well? I tried using the guide here and was stuck in a non-booting state after the reboot step.

I wouldn’t know why it shouldn’t?