Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Insufficient memory for hibernation with kernel 6.17

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

Insufficient memory for hibernation with kernel 6.17

  • Quote

Post by acarstoiu » Thu Nov 06, 2025 2:11 pm

I believe it started after upgrading the gentoo-sources kernel from 6.17.6 to 6.17.7, but I'm sure it worked just fine with 6.16.12. In any case, before posting a bug on the kernel's Bugzilla, I want to check with you for possible explanations other than a bug.
Whether I try to hibernate by running

Code: Select all

echo disk > /sys/power/state
or by using the KDE Plasma menu (with elogind underneath), the result is just the same:
# dmesg | fgrep -C 2 "Not enough free"
[ 115.425467] PM: hibernation: Creating image:
[ 115.605272] PM: hibernation: Need to copy 1034086 pages
[ 115.605277] PM: hibernation: Not enough free memory
[ 115.425998] PM: hibernation: Error -12 creating image
[ 115.426009] ACPI: PM: Restoring platform NVS memory
--
[12969.416937] PM: hibernation: Creating image:
[12969.603243] PM: hibernation: Need to copy 1173639 pages
[12969.603248] PM: hibernation: Not enough free memory
[12969.417467] PM: hibernation: Error -12 creating image
[12969.417477] ACPI: PM: Restoring platform NVS memory
--
[15435.266025] PM: hibernation: Creating image:
[15435.268343] PM: hibernation: Need to copy 1135535 pages
[15435.268343] PM: hibernation: Not enough free memory
[15435.268343] PM: hibernation: Error -12 creating image
[15435.268343] ACPI: PM: Restoring platform NVS memory
--
[19313.907975] PM: hibernation: Creating image:
[19313.911060] PM: hibernation: Need to copy 1035412 pages
[19313.911060] PM: hibernation: Not enough free memory
[19313.911060] PM: hibernation: Error -12 creating image
[19313.911060] ACPI: PM: Restoring platform NVS memory
--
[22946.540965] PM: hibernation: Creating image:
[22946.543076] PM: hibernation: Need to copy 1046173 pages
[22946.543076] PM: hibernation: Not enough free memory
[22946.543076] PM: hibernation: Error -12 creating image
[22946.543076] ACPI: PM: Restoring platform NVS memory

# LANG=en_US.UTF-8 free -k
total used free shared buff/cache available
Mem: 7553808 3921892 3210932 733844 1165792 3631916
Swap: 16777212 7347720 9429492
The page size is 4KiB, as implied by dmesg messages such as
[15427.731732] PM: hibernation: Allocated 747345 pages for snapshot
[15427.731737] PM: hibernation: Allocated 2989380 kbytes in 6.70 seconds (446.17 MB/s)
and by /proc/1/smaps.
The question is why doesn't the kernel find enough room for those 4 GiB of image in the swap space as the available swap is more than the double of that quantity?

I also tried hibernating after changing /sys/power/image_size to 0 from the default 2/5 of physical memory size. It worked, because the image size way smaller this time:
[25074.727908] PM: hibernation: Creating image:
[25074.731043] PM: hibernation: Need to copy 562810 pages
Mind that the memory load of the machine was not changed during the last two attempts, as much as humanly possible.
Last edited by acarstoiu on Thu Nov 06, 2025 2:23 pm, edited 1 time in total.
Top
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

  • Quote

Post by acarstoiu » Thu Nov 06, 2025 2:20 pm

In case someone brings into discussion the quote from https://www.kernel.org/doc/Documentation/power/pci.rst
The freezing of devices is carried out after enough memory has been freed (at
the time of this writing the image creation requires at least 50% of system RAM
to be free) in the following three phases:

prepare, freeze, freeze_noirq
I answer this: there's enough room in swap to evict some pages from RAM in order to obtain the 50% free and still remains plenty of space for the hibernation image. Anyway, that vague statement from the said document is no explanation here, as hibernation works with a smaller image (probably obtained with a higher compression factor).
Top
Post Reply

2 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic