256 MiB is by far not enough swap space for hibernating the system. You need at least 150% the size of your RAM, because it’ll have to hold whatever you had in RAM plus whatever you already had in swap.
In your case, given that you’ve got 32 GiB of RAM, 100% should probably be enough, so you’ll need a swap file of 32 GiB in size — or use a dedicated swap partition, which is faster.
@Aragorn and @Fabby The Guide says: “It can create swap files dynamically based on memory needs.” I expected disk space will be dynamiclly taken. Is this sentence wrong or do I understand it wrong?
@Fabby I don’t use google and I know about the size of my RAM and the theoretical size of my swap file.
Sure I can setup a dedicated swap partition, but I would like to find a solution for the “dynamic systemd-swap”. It sounds interesting to me.
If I am totally on the wrong way, then say it and I will set up a dedicated partition.
It can create swap files dynamically in a running system, but that is a different thing to hibernating your system. For hibernation, the size of the swap device must be statically assigned first.
I didn’t know there is a difference between swap and swap for hibernation. Thank you for the information. I will set up a dedicated partition or a use a pre allocated swap file.
@Aragorn You said a dedicated partition is faster. Will I really feel the difference between swap partition and swap file in the SSD time?
Now I set up a dedicated swap partition, hibernation works but I have some issues.
My computer needs around 2:15 minutes to show me a login screen after hibernation. I think this is too long Any Ideas how to solve the problem or make it faster? Btw. When I hibernate it has been just Firefox opened and less than 2GB in RAM used.
If I shut down after hibernation, my display gets black at the normal time, but power led is still showing up for more than 3 minutes.
Every computer wakes up from suspend faster than from hibernation, because suspend does not put everything into its hard disk, but current working state remains in RAM.
I checked the power consumption of my PC: suspend vs. hibernation, the difference is only 2 - 3 watts. That’s when I use suspend the most.
If you leave your computer for more than 1 day without shutdown, then choose hibernation.
If online download is running, then you should not enable suspend or hibernation until complete download, otherwise both will abort the download.
Never use suspend or hibernation while kernel update is in progress of pacman.