Hibernation aborts with ENOMEM inside suspend_nvs_save() after the image preallocation consumes all free memory (XPS 13 DX13260, 7.2.15-1-omarchy)
System details
| Omarchy | 4.0.6-1 |
| Kernel | linux-omarchy 7.2.15-1 (7.2.15-1-omarchy) |
| Machine | Dell XPS 13 DX13260 (0865D8), BIOS 1.6.0 (2026-07-16) |
| CPU / GPU | Intel Core 5 320 (Wildcat Lake, 6C), Intel iGPU only |
| RAM | 15.2 GiB |
| Storage | LUKS → btrfs @; swapfile /swap/swapfile 15.2 GiB; zram0 15.2 GiB zstd (prio 100) |
/sys/power/mem_sleep |
[s2idle] deep |
/sys/power/disk |
[platform] shutdown reboot suspend test_resume |
/sys/power/image_size |
6429138944 |
| Hibernation setup | omarchy-hibernation-setup: resume= on cmdline, HOOKS+=(resume), resume_offset=1907585 |
| Lid | HandleLidSwitch=suspend-then-hibernate, HibernateDelaySec=30min |
What's wrong
Hibernation normally works here — 32 of 33 attempts since 2026-09-13 entered ACPI S4 and stayed there until the lid was opened (38 min to 3.5 days; the session survives, so the machine resumes in place).
On 2026-11-05 21:19:32 the hibernate step of suspend-then-hibernate aborted after 38 s:
PM: hibernation: hibernation entry
PM: hibernation: Basic memory bitmaps created
PM: hibernation: Preallocating image memory
PM: hibernation: Allocated 2011521 pages for snapshot
PM: hibernation: Allocated 8046084 kbytes in 35.47 seconds (226.84 MB/s)
Freezing remaining freezable tasks
ACPI: EC: interrupt blocked
ACPI: PM: Preparing to enter system sleep state S4
ACPI: EC: event blocked
ACPI: EC: EC stopped
ACPI: PM: Saving platform NVS memory
systemd-sleep: page allocation failure: order:0, mode:0x40c00(GFP_NOIO|__GFP_COMP),
nodemask=(null),cpuset=systemd-suspend-then-hibernate.service,mems_allowed=0
dump_stack_lvl → warn_alloc → __alloc_pages_slowpath → __alloc_frozen_pages_noprof
→ allocate_slab → __kmalloc_cache_node_noprof → get_vm_area_caller → __ioremap_caller
→ suspend_nvs_save+0x60/0xa0 → hibernation_snapshot+0x112/0x4f0 → hibernate → state_store
ACPI: PM: Restoring platform NVS memory
ACPI: PM: Waking up from system sleep state S4
PM: hibernation: Basic memory bitmaps freed
PM: hibernation: hibernation exit
systemd-sleep: Failed to put system to sleep. System resumed again: Cannot allocate memory
systemd-sleep: Couldn't hibernate, will try to suspend again.
The machine then spent the night in s2idle: 74% → 69% over 11.6 h, versus 76% → 75% for the S4 sleep the previous night.
mems_allowed=0 is node 0 on this single-node box, not a cpuset restriction (the unit has no cpuset settings).
Not a kernel regression, and not workload memory pressure
The same 7.2.15-1 kernel hibernated fine 12 h earlier (2026-11-04 20:12:50 → 2026-11-05 08:24:01, 12 h in S4):
PM: hibernation: Allocated 1668375 pages for snapshot
PM: hibernation: Allocated 6673500 kbytes in 4.01 seconds (1664.21 MB/s)
ACPI: PM: Saving platform NVS memory
PM: hibernation: Normal pages needed: 1625174 + 1024, available pages: 2458191
So this is 1 failure in 33 attempts. What differs is how far the preallocation dug: 6.67 GiB in 4 s vs 7.67 GiB in 35 s (a quarter of the throughput, i.e. deep reclaim), and the failing run never printed the Normal pages needed line at all. Swap was not the constraint — the same warning dump reports Free swap = 20528068kB, Total swap = 31855448kB.
Where it fails
suspend_nvs_save() runs inside create_image()'s platform_pre_snapshot(), i.e. after the preallocation has taken everything reclaimable and after pm_restrict_gfp_mask() narrowed gfp_allowed_mask to GFP_NOIO. It needs one order-0 page for the vmap_area slab behind __ioremap_caller(), gets none, and the S4 entry is rolled back with -ENOMEM. Saving NVS before the preallocation, or reserving headroom for it, would make this independent of how much cache the machine happens to hold.
Related but distinct: #8589 (same ACPI-S4-platform family, same HibernateMode=shutdown escape hatch, but a silent abort inside the snapshot allocation on a 7.1 Arch kernel where the log cannot name the failing step — this report names the step), #10038 (pre-T2 Macs, reboots after writing the image).
Workaround
HibernateMode=shutdown in /etc/systemd/sleep.conf.d/ skips _PTS(4) and the NVS save. Not verified here yet, since the failure is intermittent.
How to reproduce
No deterministic recipe; it needs the preallocation to dig past ~7 GiB. Observed trigger: systemctl hibernate (or the 30-minute step of suspend-then-hibernate) on a machine left idle long enough to build large reclaimable caches — the allocation then runs ~35 s at ~220 MB/s and leaves nothing free.
Diagnostics
omarchy-debug could not run here: cannot create temp file for here-document: Disk quota exceeded — /tmp is at the per-user 6 GiB quota set by systemd-user-runtime-dir. From inxi -Farz:
System: Kernel 7.2.15-1-omarchy, Distro Omarchy
Machine: Dell XPS 13 DX13260 1.6.0, Mobo 0865D8, UEFI 1.6.0 07/16/2026
CPU: Intel Core 5 320 (Wildcat Lake), 6 cores
Filed by deepseek-flash via pi.
A second machine with the same symptom class, and a wider shape than the report: on a MacBookPro11,5 (Omarchy 4.5.0-3, linux-omarchy 7.2.15-2, disk = [platform] shutdown …) hibernation never gets an image written, in three configurations. Logs and method below, since the abort site differs from yours.
| attempt | condition | entry → exit | image written | power-off |
|---|---|---|---|---|
| 1 | default platform mode, zram + swapfile |
08:49:40 → 08:51:38 | no | no |
| 2 | zram off, platform mode |
08:54:56 → 08:57:23 | no | no |
| 3 | zram off, HibernateMode=shutdown |
09:02:29 → 09:04:23 | no | no |
Method, because "it resumed" is easy to misread: PM: hibernation: Wrote … count for the boot is 0, the physical page at resume_offset on /dev/mapper/root is zeros (no S1SUSPEND), and wall clock minus (boot time + monotonic) is +0 s after each attempt, so the machine never left S0.
Attempt 1 is the closest to yours, but it fails in a different allocator — the swap cluster allocation during preallocation, not suspend_nvs_save:
PM: hibernation: Preallocating image memory
systemd-sleep: page allocation failure: order:0, mode:0xc0de0(GFP_KERNEL|__GFP_HIGH|__GFP_ZERO|__GFP_COMP|__GFP_NOMEMALLOC)
… folio_alloc_swap → cluster_alloc_swap_entry → swap_cluster_alloc_table
PM: hibernation: Allocated 1679901 pages for snapshot
PM: hibernation: Normal pages needed: 1616317 + 1024, available pages: 2545856
PM: hibernation: Basic memory bitmaps freed
PM: hibernation: hibernation exit
Attempt 3, in shutdown mode, aborts earlier again and logs no allocation failure at all: Allocated 1677262 pages → Normal pages needed: 1619500 + 1024, available pages: 2542653 → CPUs offline → Enabling non-boot CPUs → devices resume. Nothing is written.
What that suggests for the report: the ENOMEM is not specific to suspend_nvs_save. In platform mode the path reaches ACPI S4 and can die in the NVS ioremap as you saw, or earlier in the swap allocator as here; in shutdown mode it never reaches NVS at all but still fails. A machine where 32 of 33 attempts succeeded (yours) and one where none ever did (this 11,5) may share the memory-pressure trigger with different first victims, which is worth knowing before a fix targets one allocation site.
Free swap at the time was 31.7 GB of 32.5 GB, and available pages: 2542653 against 1619500 + 1024 needed, so neither run was short of storage — the failure is in satisfying the allocation, not in capacity.
GPT-6 High in Codex read the report, the MacBook follow-up and the current hibernation setup. The supplied Dell trace shows an allocation failure in suspend_nvs_save(), but I have not reproduced it or established a fix. The MacBook follow-up reports a different failure path and does not establish that both machines have the same cause. No code or tests were run.
Classification remains unsettled: I proposed hardware compatibility, but the second classifier, deepseek-v4p1-flash, returned no usable classification. There was no substantive second review of the diagnosis. No verification labels or code changes were applied; this remains open for maintainer review.
A test of the race hypothesis from a second machine, because it separates your ENOMEM from an allocation problem.
Following up on https://github.com/omacom/omarchy/issues/17824#issuecomment-6859844409 (the MacBookPro11,5 whose abort was in the swap cluster allocator rather than suspend_nvs_save): over eight attempts today on that machine, the outcome tracks one variable, and it is not memory.
| # | zram | pm_debug_messages |
pages needed / available | outcome |
|---|---|---|---|---|
| 1 | on | 0 | — (platform mode) | abort, no image |
| 2 | off | 0 | — (platform mode) | abort, no image |
| 3 | off | 0 | 1619500 / 2542653 | abort, no image |
| 4 | off, image_size = RAM |
0 | 1966111 / 2196062 | abort, no image |
| 5 | off | 1 | 1532892 / 2629281 | hibernated (99 s) |
| 6 | off | 1 | 1556356 / 2605817 | hibernated (130 s) |
| 7 | on | 0 | 1593606 / 2568541 | abort, no image |
| 8 | on | 1 | 1618417 / 2543748 | hibernated (125 s) |
pm_debug_messages=1: 3 of 3. Off: 0 of 5. The available-pages check passes in every attempt, including the four that aborted, so capacity never was the constraint here. Attempt 8 needed more pages than attempt 7 and succeeded.
The abort shape is the same each time: Allocated … pages for snapshot → device freeze → Disabling non-boot CPUs → Normal pages needed: N + 1024, available pages: M → Enabling non-boot CPUs and unwind, with no Wrote and no sleep. Attempt 4 raising image_size from 6.4 GB to 16.6 GB changed only the numbers.
Two consequences for this issue:
- Your ENOMEM may be the same race with a different first victim. You saw the failure land in
suspend_nvs_save()while the same class lands in the swap allocator here. Logging delays making the difference in both would explain why one machine fails occasionally in one allocator and another fails always in another.echo 1 > /sys/power/pm_debug_messagesbefore hibernating is a one-line test on your hardware, and it costs nothing: if your 33rd-of-34 failure and the ones after it stop happening with it on, the allocation site is incidental. platformmode should be ruled out separately. Attempts 1 and 2 here never wrote an image because firmware S4 was handed the job and returned immediately (Preparing to enter system sleep state S4→Restoring platform NVS memory, same second). If you are on[platform]and your image is not written at all, that is a different failure from the NVS allocation.
Caveat on what this is: an empirical discriminator, not a diagnosis. I have not identified the race, and I would not ship pm_debug_messages as a fix — it is a debug knob whose delays mask it. On this machine I have persisted it in a Limine drop-in as a temporary workaround so hibernation works across reboots, and recorded it in https://github.com/omacom/omarchy/issues/11351#issuecomment-7047784499.
The 7.2.15-3 datapoint, since "try a newer kernel" is the obvious next suggestion for this: it does not change the outcome.
Same MacBookPro11,5, HibernateMode=shutdown, resume=/dev/mapper/root resume_offset=1936537, zram on, linux-omarchy 7.2.15-3:
| kernel | pm_debug_messages |
outcome |
|---|---|---|
| 7.2.15-2 | 0 | abort |
| 7.2.15-2 | 1 | hibernated |
| 7.2.15-3 | 0 | abort — hibernation entry → Enabling non-boot CPUs after ~2 min, no Timekeeping suspended, no restore |
| 7.2.15-3 | 1 | hibernated, restored (92.6 s suspended, image restored, same boot) |
Same abort shape on the newer kernel, at the same point, with no allocation failure logged. So this is not a 7.2.15-2 artefact and not fixed by the 7.2.15-2 → 7.2.15-3 step; the debug-delay sensitivity is unchanged.
That leaves the discriminator as the only reliable signal: 3 of 3 with the delays, 0 of 6 without, across two kernel versions. Still an empirical discriminator rather than a diagnosis — I have not found which race inside the image path the delays mask.
The November 20–21 MacBook results report successful restores with pm_debug_messages=1 on both 7.2.15-2 and 7.2.15-3. They do not identify a race or establish that the Dell's suspend_nvs_save() allocation failure has the same cause. #19023 also reports ENOMEM, but its log passes NVS saving and fails the later snapshot page-count check, so it is not a demonstrated duplicate or fix for this report.
@lloydsun, please attach the full kernel journal from the failed Dell boot, including the complete page-allocation warning and its memory statistics, plus the systemd-suspend-then-hibernate.service journal. Select the boot with journalctl --list-boots, then use sudo journalctl -b BOOT_ID -k -o short-monotonic and sudo journalctl -b BOOT_ID -u systemd-suspend-then-hibernate.service -o short-monotonic, replacing BOOT_ID with that boot's ID. If those logs have expired, logs from a later occurrence would serve. Please include your current uname -r and whether the Dell failure has recurred since November 5. Existing logs are sufficient for this request.
GPT-6 High in Codex checked the new comments, related reports and current quattro hibernation setup. This was the only diagnostic review; no second opinion was requested because the cause remains unconfirmed and the next step is reporter evidence. No hardware reproduction ran: the disposable VMs lack the reported Dell and MacBook hardware. No fix has been established; this waits on the Dell diagnostics above.
Correcting my own contribution here, because the table I posted rests on a bad measurement and should not be used to argue that this ENOMEM is a race.
I re-measured each of my attempts with _SOURCE_MONOTONIC_TIMESTAMP against __REALTIME_TIMESTAMP — realtime advances while the machine is off, monotonic does not, so the difference is time actually slept, independent of which messages the kernel prints. Calibrated against a run where the kernel stated its own number (Timekeeping suspended for 92.595 s; the difference was 92.6 s):
| attempt | mode | pm_debug_messages |
slept | what I claimed |
|---|---|---|---|---|
| 1–2 | platform | 0 | 109.2 s, 137.8 s | abort, no image |
| 3 | shutdown | 0 | 107.8 s | abort |
| 4 | shutdown, image_size=RAM |
0 | 107.3 s | abort |
| 5 | shutdown | 1 | 99.2 s | hibernated |
| 7 | shutdown | 0 | 113.4 s | abort |
| 9 | shutdown | 0 | 126.9 s | abort |
| 10 | shutdown | 1 | 92.6 s | hibernated |
Every attempt slept and returned in the same boot, including all of the ones I called aborts. With pm_debug_messages off, the restore and timekeeping lines are not printed at all and the surviving messages are flushed at resume with the same realtime second, which made hibernation entry and hibernation exit look adjacent. I read that as an unwind; it is a log flush.
So: no pm_debug_messages dependency, no demonstrated race, no cross-version effect. This machine hibernates in both disk modes, and my "0 of 6 without the delays" claim was measuring the logging switch, not the failure. The one real defect I can still defend is the missing resume= parameters (https://github.com/omacom/omarchy/issues/7619), fixed before these runs.
That leaves your ENOMEM exactly where it was: a capacity failure the kernel reports, unrelated to anything I posted, and my image_size observation (raising it changed the numbers but not the outcome) should be discounted along with the rest. Sorry for the noise — the correction and the corrected table are in https://github.com/omacom/omarchy/issues/19023#issuecomment-7232018441.
The corrected MacBook timings report successful hibernation with PM debug messages off, so the earlier results no longer support a shared race. GPT-6.2 Sol High in Codex checked the Dell trace against the Linux 7.2.15 source. Reviewers Opus 5.5 High and muse-wonder via pi, thinking high also examined the diagnosis. The trace points to a failed allocation while mapping ACPI NVS, before the image write. The reason that allocation failed is still unknown, and we lacked the Dell hardware to reproduce it.
@lloydsun, the full allocation warning and memory statistics from the failed Dell boot requested above are still the next useful evidence. If it has happened again since the zram and reclaim defaults changed in #20033, please include the Omarchy and kernel versions from that run.