I'm trying to diagnose an issue related to hibernation. I'm on a Lenovo Ideapad (AMD) running Manjaro and kernel 6.1.53-1-MANJARO. When I attempt a hibernate, I'm constantly getting errors about not enough free memory being available despite my RAM sitting around 2/3 usage and swap at nearly 100% free.
Here's the state of my memory before hibernating:
free -h
total used free shared buff/cache available
Mem: 9.7Gi 6.4Gi 549Mi 69Mi 3.1Gi 3.3Gi
Swap: 19Gi 6.2Mi 19Gi
I then attempt a sudo systemctl hibernate
and get this error from systemd in the journal:
systemd-sleep[4570]: Failed to put system to sleep. System resumed again: Cannot allocate memory
Scrolling further down, I see this:
Sep 26 17:25:10 keylimepie kernel: PM: hibernation: Error -12 creating image
Sep 26 17:25:10 keylimepie kernel: PM: hibernation: Not enough free memory
Sep 26 17:25:10 keylimepie kernel: PM: hibernation: Normal pages needed: 1376113 + 1024, available pages: 1228684
Sep 26 17:25:10 keylimepie kernel: PM: hibernation: Need to copy 1376113 pages
Sep 26 17:25:10 keylimepie kernel: PM: hibernation: Creating image:
And free -h
shows the following:
total used free shared buff/cache available
Mem: 9.7Gi 5.4Gi 3.6Gi 40Mi 932Mi 4.2Gi
Swap: 19Gi 4.5Gi 15Gi
I tried changing the /sys/power/image_size
to zero, but it didn't make a difference. I've update my swappiness from 60 to 10, though I don't think that necessarily affects the actual hibernation process.
I'm at a loss now as to what's going on here. I have nearly 19GB of my swap partition free, but the kernel is still saying there's not enough free memory to create an image. Am I missing something fundamental, or is there anything I can try to fix this?
/sbin/swapon
show after a hibernation attempt?/dev/nvme0n1p6 partition 19.5G 2.5G -2
. After hibernate:/dev/nvme0n1p6 partition 19.5G 6.8G -2