open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

nvidia-open 610.57.04: suspend hangs with NV_ERR_NO_MEMORY in _memdescAllocInternal (RTX 2070 Super, GSP disabled)

Open uddivert opened this issue 3 months ago • 6 comments

NVIDIA Open GPU Kernel Modules Version

610.57.04-6

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.

  • [] I confirm that this does not happen with the proprietary driver package.

Operating System and Version

Arch Linux

Kernel Release

7.1.8-arch1-3

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • [x] I am running on a stable kernel release.

Hardware: GPU

NVIDIA GeForce RTX 2070 Super with Max-Q Design

Describe the bug

When suspending to RAM (S3, deep sleep) while a GPU-intensive Vulkan/OpenGL application (Cemu) is running, the NVIDIA kernel module fails to allocate memory during the suspend transition, logging NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1338 immediately after PM: suspend entry (deep).

Rather than failing gracefully, the entire system becomes unresponsive and does not complete the suspend/resume cycle. No further kernel or journal activity is logged until a forced power cycle. Host system RAM and swap were not under pressure at the time (15GB RAM with several GB free, swap nearly empty), and GSP firmware is explicitly disabled

To Reproduce

Preconditions:

  • Laptop with hybrid graphics (NVIDIA + integrated), nvidia-prime installed for PRIME/Optimus configuration
  • NVIDIA Turing GPU (tested on RTX 2070 Super Max-Q, 8GB VRAM)
  • nvidia-open 610.57.04 driver installed and loaded (kernel module, not proprietary)
  • /etc/modprobe.d/nvidia.conf sets NVreg_EnableGpuFirmware=0 (GSP firmware explicitly disabled)
  • NVreg_UseKernelSuspendNotifiers=1 in effect (package default via /usr/lib/modprobe.d/nvidia-sleep.conf)
  • KDE Plasma session on Wayland (kwin_wayland)
  • Kernel 7.1.8 (stable, non-rc)

Steps to reproduce:

  • Boot the system normally with the driver/config above.
  • Launch Cemu and start emulating a game, so it is actively rendering via Vulkan/OpenGL and holding non-trivial VRAM (shader cache, textures, framebuffers).
  • Leave Cemu running and actively rendering for an extended period (reproduced after ~45 minutes of continuous use).
  • Trigger a suspend while Cemu is still running and rendering — either by closing the laptop lid, or via systemctl suspend.
  • Observe the kernel log during the suspend transition: PM: suspend entry (deep) is immediately followed by NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1338.
  • The suspend/resume cycle never completes cleanly; the system becomes fully unresponsive (screen does not wake, no further kernel/journal activity), requiring a hard power cycle to recover.

Bug Incidence

Occasionally

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

No response

uddivert avatar Aug 20 '26 11:08 uddivert

Independent reproduction — same driver, same line, broader trigger window

Adding evidence from a different hybrid-Optimus laptop that hits the exact same _memdescAllocInternal check, same driver build, same source line as the original report.

System

  • Lenovo LOQ 15IAX9E, Intel (Alder Lake-HX, UHD 770 iGPU) + NVIDIA GeForce RTX 4050 Laptop GPU (Max-Q)
  • nvidia-open-dkms 610.57.04 (same build as OP)
  • Arch Linux (Omarchy), kernel 7.2.5-3-omarchy (stable, non-rc)
  • Hybrid graphics: internal panel on the Intel iGPU (eDP-1), external monitor on the NVIDIA dGPU via HDMI (HDMI-A-1) — i.e. the dGPU is actively driving a real display output, not just available via PRIME offload
  • GSP firmware state: default (not explicitly disabled)

What we see

Two outcomes from what looks like the same underlying allocator failure:

  1. Survivable (4 occurrences over ~2.5 days of normal desktop use, no suspend/resume nearby in 3 of the 4 cases): the kernel logs a WARN-style stack trace and keeps running.

    RIP: 0010:__nv_drm_handle_flip_event+0x1f8/0x210 [nvidia_drm]
    Call Trace:
     <TASK>
     ? __pfx__main_loop+0x10/0x10 [nvidia_modeset ...]
     nv_drm_event_callback+0x7f/0x90 [nvidia_drm ...]
     nvKmsKapiHandleEventQueueChange+0xdd/0x110 [nvidia_modeset ...]
     _main_loop+0x114/0x170 [nvidia_modeset ...]
     kthread+0xe4/0x120
     ret_from_fork+0x2bd/0x350
     ret_from_fork_asm+0x1a/0x30
    ---[ end trace 0000000000000000 ]---
    NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1338
    

    Same RIP and same mem_desc.c:1338 on all 4 occurrences, triggered from nvidia-modeset/'s flip-event kthread, not from a suspend transition.

  2. Fatal (multiple occurrences over the past 3 weeks): the system goes completely silent — no further kernel or journal activity at all, no coredump, /sys/fs/pstore/ empty every time, requires a hard power cycle. Matches the OP's description exactly. Unlike the OP's reproduction, these have not consistently been at the suspend transition itself:

    • Several did correlate with resume-from-suspend (sometimes immediately after resume, sometimes a few minutes into being back at the lock screen).
    • At least one happened during ordinary desktop use, ~2h50m after the last resume, with no suspend/resume anywhere nearby — just normal use (browser, terminal, multi-monitor Hyprland/Wayland session).

    None of the fatal occurrences logged an NV_ERR_NO_MEMORY line before going silent — same as the "silent even under a raw kmsg tap" sub-case reported on #1358 for the fatal wedges there. The survivable WARN above is the only direct evidence we have that this code path is being hit at all; the fatal case appears to not reach (or not manage to flush) the same logging.

Mitigations tried, not yet conclusive

  • options nvidia NVreg_DynamicPowerManagement=0x00 (modprobe.d) — already in place before this investigation started; does not appear to prevent the fatal case on its own.
  • acpi.ec_no_wakeup=1 kernel parameter — added recently to rule out an Embedded Controller angle we initially suspected before finding this driver-side signature. Too early to say whether it changes frequency.
  • kernel.hung_task_panic=1 / kernel.softlockup_panic=1 sysctls — added specifically hoping to convert a future silent wedge into a real panic with a pstore dump. Has not fired on any occurrence since being enabled, which is itself informative: whatever happens in the fatal case does not trip the kernel's own hung-task/softlockup/NMI watchdogs, consistent with the driver (or a GPU reset path) wedging in a way the generic kernel watchdogs don't observe.

Happy to attach full journalctl -k output from an affected boot, or a nvidia-bug-report.log.gz, if useful — didn't include raw logs inline to keep this focused, but can follow up.

edneymatias avatar Oct 16 '26 01:10 edneymatias

Same bug, no suspend involved (HP Pavilion Plus 14, RTX 2050)

Same driver and same failing allocation as above.

System: HP Pavilion Plus 14-eh1xxx, Intel Iris Xe + RTX 2050 (GA107M), nvidia-open-dkms 610.57.04, kernel 7.2.3-arch1-3, Hyprland/Wayland. All outputs go through the Intel iGPU; the NVIDIA GPU is only used on demand via prime-run.

What happened (2026-10-19)

  1. Two external monitors on the dock disconnected/reconnected repeatedly within ~10 s (hotplug flapping).
  2. NV_ERR_NO_MEMORY from _memdescAllocInternal (mem_desc.c:1338), with _kgmmuClientShadowFaultBufferPagesAllocate: Allocation failed with big page size. It's a host-memory allocation, not VRAM (3 MiB used); RAM was not under pressure.
  3. ~30 min later, every atomic modeset failed with Invalid argument on display wake, leaving the compositor without a display until reboot.

The same error also appeared on 2026-10-17 (4 times), again with no suspend/resume.

Takeaways: the trigger is not suspend-only. Here it follows display hotplug even though the dGPU drives no display, and the driver stays degraded until reboot.

Only workaround found: don't load the NVIDIA driver (Integrated mode via supergfxctl).

I can attach journalctl -k or a bug report if useful.

dedmu5 avatar Oct 19 '26 13:10 dedmu5

Still present on 615.78.08 — not fixed by the latest driver bump

Follow-up from the same system as my earlier comment. Omarchy shipped nvidia-open-dkms 610.57.04 → 615.78.08 on 2026-10-18 (unrelated distro update, not chasing this issue specifically). The bug is unchanged, same check, line number only shifted by the usual amount for a newer build:

NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1348

(was mem_desc.c:1338 on 610.57.04, same function/check, 10-line shift consistent with driver source changes between versions — not a different bug.)

This occurrence, in sequence (2026-10-24, local time):

18:39:03 — PM resume
18:39:08 — compositor's Qt/EGL client: "Could not create EGL surface (EGL error 0x3000)", "eglSwapBuffers failed with 0x300d" — triggers Hyprland's crashed-lockscreen fallback, client auto-respawns, session recovers
19:03:36 — suspend entry
19:03:38 — NVRM: NV_ERR_NO_MEMORY / _memdescAllocInternal @ mem_desc.c:1348
19:03:53 — PM resume
19:11:06 — journal ends abruptly, no further activity, /sys/fs/pstore/ empty — hard power cycle required

Same machine/config as before (Lenovo LOQ 15IAX9E, hybrid Intel+NVIDIA RTX 4050 Max-Q, external monitor on the NVIDIA-driven HDMI output). kernel.hung_task_panic=1 and kernel.softlockup_panic=1 have been active on this system since the earlier comment specifically to catch this as a real panic — neither has fired on any fatal occurrence since, including this one.

@dedmu5's hotplug-triggered reproduction (no suspend involved, dGPU driving no display at all) matches what I'm seeing operationally: my own 100%-reproducible trigger is connecting an external monitor, which in my daily routine happens to coincide with a resume (open the laptop at home, which wakes it, then plug in the monitor) — so "suspend-adjacent" and "hotplug-adjacent" may be the same underlying trigger class rather than two separate ones, at least on muxless hybrid laptops where a monitor's connect/disconnect also drives atomic modeset/memory-descriptor churn on the dGPU regardless of suspend state.

edneymatias avatar Oct 24 '26 22:10 edneymatias

Further narrowing: reproduces only with one specific external display mode, never another

More data from today that narrows this a lot. My daily routine alternates between two external monitors on the same port (HDMI-A-1), connected/disconnected on a resume each time:

  • Monitor A (gaming monitor, Samsung Odyssey G5): negotiates 2560x1440@120Hz, confirmed via hyprctl monitors all right now:
    Monitor HDMI-A-1: [email protected] ... vrr: false
    
  • Monitor B (office monitor, Dell E2222HS, 1080p60): much lower resolution/refresh.

Same laptop, same NVIDIA driver, same suspend/resume routine, same cable/port, several suspend→resume→hotplug cycles a day for weeks. Every single resume followed by connecting Monitor A has crashed. Not one resume followed by connecting Monitor B ever has. Today specifically: several successful suspend/resume cycles while away from any external display, then the crash occurred immediately upon resuming and connecting Monitor A.

VRR is off on both, so this isn't a FreeSync/VRR negotiation issue — the variable is plain resolution × refresh rate (and therefore required framebuffer size/bandwidth): Monitor A needs roughly 4x the pixel throughput of Monitor B.

This points pretty specifically at a framebuffer/memory-descriptor allocation sized to the new mode failing because of memory that should have been freed/restored across the suspend cycle but wasn't — i.e. the failure is latent after every resume, but only a large-enough post-resume modeset (like negotiating the higher-bandwidth mode) actually trips the NV_ERR_NO_MEMORY check. A small modeset (1080p60) apparently stays under whatever threshold is left available, while the larger one (1440p120) doesn't.

If anyone chasing this issue has two displays of very different pixel throughput to test with, forcing the smaller mode on an otherwise-reproducing setup (or forcing a larger mode on an otherwise-non-reproducing one) seems like a good way to confirm/refute this as the actual trigger mechanism, as opposed to suspend or hotplug in the abstract.

edneymatias avatar Oct 24 '26 22:10 edneymatias

Correction to my previous comment: the display-mode theory does not hold

I need to retract the "specific external display mode" hypothesis from my last comment. New data from the same machine (Lenovo LOQ 15IAX9E, RTX 4050 Max-Q, nvidia-open-dkms 615.78.08, kernel 7.2.8):

  • A fatal freeze happened with no external monitor connected, with the HDMI output pinned to the low-bandwidth 1080p60 mode for the test. The resume happened at a new location with no second screen, and the system froze silently about 3 minutes later. Same signature as before: journal just stops, no panic, no hung-task/softlockup trigger (both panics are enabled).
  • Another freeze came ~1 minute after a cold boot and login, with no suspend in that boot at all. So not every freeze is suspend-adjacent either.
  • The Odyssey G5 at 2560x1440@120 correlation I reported is real in my own history, but the mode is clearly not the cause. (Also, @dedmu5's log shows the failing allocation is host memory, _kgmmuClientShadowFaultBufferPagesAllocate, not framebuffer VRAM, which fits this.)

How common the error actually is. Across all my journals since August (172 suspend cycles), NV_ERR_NO_MEMORY in _memdescAllocInternal is logged within 30 s of 132 of them (77%): 92/120 on 610.57.04 and 40/52 on 615.78.08, so the driver bump changed nothing. The error is therefore common and survivable most of the time; it does not by itself distinguish the suspends that end in a freeze from the ones that don't.

One new, rarer signal. On the resume right before today's freeze the log has:

NVRM: RmHandleDNotifierEvent: Failed to handle ACPI D-Notifier event, status=0x11

This is rare on my system (15 occurrences since August) and I cannot yet tie it to the freezes, so I'm only flagging it as something that might be worth correlating if anyone else has fatal cases.

Already ruled out on my side: NVreg_PreserveVideoMemoryAllocations=1 with nvidia-suspend/resume/hibernate enabled, NVreg_DynamicPowerManagement=0, nvidia_drm modeset=1, acpi.ec_no_wakeup=1.

edneymatias avatar Oct 27 '26 23:10 edneymatias

Additional observation: RTX 5070 Ti unavailable after hybrid sleep

I saw the same _memdescAllocInternal error on an ASUS ROG Strix G16 with hybrid AMD/NVIDIA graphics.

  1. GPU: GeForce RTX 5070 Ti Laptop
  2. Driver: nvidia-open 615.78.08
  3. OS and kernel: Arch Linux, 7.2.9-arch1-1
  4. Desktop: X11 with xmonad, using the AMD GPU. The NVIDIA GPU was not configured as an X GPU at the time (AutoAddGPU was off).
  5. Power management: UseKernelSuspendNotifiers=1, PreserveVideoMemoryAllocations=2, DynamicPowerManagement=2. The NVIDIA suspend, hibernate and resume services were disabled.

UPower requested hybrid sleep. The desktop returned, but afterward nvidia-smi reported:

Unable to determine the device handle for GPU0: 0000:01:00.0: Unknown Error
No devices were found

Selected kernel messages follow. Times are approximate seconds relative to hibernation entry, based on the kernel's source monotonic timestamps:

[+0.0s]   PM: hibernation: hibernation entry
[+5.2s]   NVRM: nvCheckOkFailedNoLog: Check failed: Out of memory [NV_ERR_NO_MEMORY] (0x00000051) returned from _memdescAllocInternal(pMemDesc) @ mem_desc.c:1348
[+9.8s]   PM: hibernation: Preallocating image memory
[+30.4s]  kswapd0: page allocation failure: order:0, mode:0x40cc0(GFP_KERNEL|__GFP_COMP)
[+72.8s]  pcieport 0000:00:01.1:    [20] UnsupReq               (First)
[+72.8s]  nvidia 0000:01:00.0: AER: can't recover (no error_detected callback)
[+72.8s]  pcieport 0000:00:01.1: AER: device recovery failed
[+454.4s] WARNING: nvidia/nv.c:4688 at nv_restore_user_channels+0x4e/0x1f0 [nvidia]
[+454.4s] WARNING: nvidia/nv.c:4981 at nv_set_system_power_state.part.0+0x4fe/0x620 [nvidia]

The later kswapd0 failure occurred during hibernation image preallocation. Its memory dump shows virtually no free pages in the buddy lists, although approximately 35 GiB of swap remained free. I don't have a memory snapshot for the earlier NVIDIA error.

The PCIe UnsupReq and recovery failures had also appeared repeatedly before this sleep, so they may be unrelated. On October 23, a separate occurrence of the NVIDIA allocation error also logged failures at system_mem.c:448 and nv_gpu_ops.c:5071.

This is one observation, not a confirmed reproduction. I don't know whether the GPU was healthy immediately before sleep, or whether the matching error has the same root cause as the original report. I can provide a longer log if useful.

orium avatar Nov 12 '26 13:11 orium