You are not logged in.

#1 2024-10-21 08:42:44

ItsFireStorm
Member
Registered: 2024-10-07
Posts: 39

[SOLVED] systemctl hibernate doesn't work despite having 4GB of swap

Long-story short, I'm using wlogout to hibernate my system using the command 'systemctl hibernate', this unfortunately doesn't work. When typing it to the console it prints the following error:

[itsfirestorm@ARCHUS ~]$ systemctl hibernate
Call to Hibernate failed: Not enough suitable swap space for hibernation available on compatible block devices and file systems

The issue is that I have 4GB allocated to swap, as shown below with the following commands.

[itsfirestorm@ARCHUS ~]$ free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       3.1Gi       8.6Gi       619Mi       4.6Gi        12Gi
Swap:          4.0Gi          0B       4.0Gi
[itsfirestorm@ARCHUS ~]$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   4G   0B  100

As far as it goes, I've used 4GB of swap in all of my machines, and the hibernate command functioned correctly.
So unless I actually need more swap memory, how would I be able to solve this without allocating more memory to swap?

Last edited by ItsFireStorm (2024-10-25 11:54:55)

Offline

#2 2024-10-21 14:19:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,790

Re: [SOLVED] systemctl hibernate doesn't work despite having 4GB of swap

You cannot hibernate to zram, it's RAM. The entire point about hibernation is to not have to refresh the RAM.

Edit:
https://wiki.archlinux.org/title/Swap#Swap_file
https://wiki.archlinux.org/title/Power_ … /file_size

Last edited by seth (2024-10-21 14:20:44)

Offline

#3 2024-10-21 15:27:32

ItsFireStorm
Member
Registered: 2024-10-07
Posts: 39

Re: [SOLVED] systemctl hibernate doesn't work despite having 4GB of swap

Already fixed it, turns out my swap file was not defined in /etc/fstab.

I created a new swap file then removed the zram one. It is now working correctly.

Offline

#4 2024-10-21 18:24:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,790

Re: [SOLVED] systemctl hibernate doesn't work despite having 4GB of swap

You do not have to enable the swap device you're using as hibernation image (but you of course can)

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB