You are not logged in.
Hibernation fails with the following:
% systemctl hibernate
Failed to hibernate system via logind: Not enough swap space for hibernationBut swapon says that both of my swap partitions are enabled (for 10GB of swap space in total, compared to 8GB of RAM of which only 5GB used), and according to free I should have plenty available:
% swapon
NAME TYPE SIZE USED PRIO
/dev/sdb4 partition 4G 8.5M 2
/dev/sda3 partition 6.1G 0B 1
% free
total used free shared buff/cache available
Mem: 7714052 5120060 286076 523048 2307916 1781120
Swap: 10513400 8704 10504696Any idea what could be causing this?
Thanks in advance.
Offline
Although hibernation uses swap partition as storage, it is not swap. So unlike swap which can be distributed any which way across multiple partitions, files, etc. the hibernation is only capable of using a single partition.
So for hibernation it is better to have one, large partition than several smaller ones.
https://www.kernel.org/doc/Documentatio … swsusp.txt
Q: Does swsusp (to disk) use only one swap partition or can it use
multiple swap partitions (aggregate them into one logical space)?A: Only one swap partition, sorry.
Last edited by frostschutz (2019-11-07 09:47:26)
Offline
I recently upgraded the system (I don't do this too often, so maybe previous upgrade was a couple of months ago) and started to experience same problem. That started to happen on the machine where two swap partitions, both of which are close in size to the amount of RAM. Before that upgrade system was able to hibernate, but after upgrade it does not.
I solved the problem by slightly expanding one of swap partitions, now it bigger than amount of RAM and machine can hibernate again.
I suppose there was some changes in system that started to prevent hibernating in case if no swap partition present that have size of RAM?
The hibernation image size set to ~1/3 of RAM (machine has 32G):
└> cat /sys/power/image_size
13233283072
Offline