Hi,
I’m a fairly new Fedora (and Linux in general) user and I’m trying to figure out how to enable hibernate on Fedora 42 (KDE Plasma). I’ve read every forum post and fedora magazine article I can find on the topic, but it’s still not working and I don’t know enough about coding or computers to understand why.
I have secure boot enabled, which some ppl say is an issue, but others say is fine.
The main thing seems to be creating a swap partition, but when i type swapon
in the terminal it shows that I do have one. Same when I check fastfetch
. But when I run systemctl hibernate
(as mentioned in Fedora Magazine) it tells me:
failed to write-firmware: failed to write (null): failed to write data to efivarsfs: Error writing to file descriptor: Invalid argument
So clearly it still needs to be configured. But all Fedora Magazine says is that you need to have a swap partition, which I seem to already have. I’m sure the answer is super obvious and I’m just too much of a noob, but if anyone could help me out that would be greatly appreciated!
For hibernation the user MUST have a physical swap space at least equal to the installed RAM size. Fedora by default uses zram for swap which is contained within RAM (and is volatile) so you would need to create the swap space and make some other changes to enable hibernation..
I wonder what you intend to gain by hibernation since most no longer use it with the speed of SSDs and booting on today’s hardware. Most systems also work well with suspend.
Ah, so does that mean the swap I have isn’t the right kind? I did find zram mentioned a couple times in posts, but I figured that would be clearly listed as zram rather than swap. Thanks for the tip!
As for why I want to set it up, mostly as a battery saving measure bc sometimes I don’t get back to my session for a day or two but I still want to keep it open. Sleep drains too much battery. I’m also on an 8,5 yo laptop (Dell xps 13 9360) with HDD so things are a bit slower.
The swapon command does show zram
$ swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 8G 0B 100
and by definition, zram is swap.
Can’t believe I read over that, good to know. I followed the instructions to enable swap file. Unfortunately the only way to get hibernate to work seems to be by disabling secure boot… I saw some posts mentioning that it could work with secure boot enabled, but ig not for my system.
Thank you for your help!