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?

  • I read somewhere that at least 50% RAM needs to be free for hibernation to work - sounds wrong, but read 2.4.3. System Hibernation in kernel.org/doc/Documentation/power/pci.rst - the free RAM is not required at the start of hibernation, but at some time during the hibernation process (read the doc, I can't explain in the confines of a comment) Sep 29 at 0:06
  • What does /sbin/swapon show after a hibernation attempt? Sep 29 at 4:36
  • @StephenKitt Before hibernate: /dev/nvme0n1p6 partition 19.5G 2.5G -2. After hibernate: /dev/nvme0n1p6 partition 19.5G 6.8G -2
    – ryoung10
    Oct 9 at 19:47


You must log in to answer this question.

Browse other questions tagged .