incorrect value of /sys/power/image_size

Started by lanig, 2024/07/13, 14:31:19

Previous topic - Next topic

lanig

Hi all,
After installation of a new kernel,  /sys/power/image_size was set to 2452201472 for a swap size of about 30 G but divided in two separated partitions.
This value makes hibernate to fail because there is not enough empty space to create the image though free was saying that most of the swap was available.

juil. 06 14:23:17 logodenn kernel: PM: hibernation: Preallocating image memory
juil. 06 14:23:17 logodenn kernel: PM: hibernation: Creating image:
juil. 06 14:23:17 logodenn kernel: PM: hibernation: Error -12 creating image


Setting  /sys/power/image_size to 0 makes hibernation possible again.
So, how is computed the value for /sys/power/image_size?


edlin

#2
Try this (not tested):
https://bbs.archlinux.org/viewtopic.php?id=229200

edlin

I have just tested it and it also survives a boot process.  8)


,,Ein kluger Mann macht nicht alle Fehler selber. Er lässt auch anderen eine Chance."

Winston Churchill

lanig

Thanks.
Tried it. Will see at next kernel update.