Skip to content

RTX 5070 (GB205): nvkms PM lock deadlock after S3 deep resume — GSP state corruption (intermittent) #1281

Open

Description

@villa1337

NVIDIA Open GPU Kernel Modules Version

610.43.03

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.

Cannot test — proprietary driver does not support RTX 5070 (Blackwell). The open kernel module is mandatory.

Operating System and Version

Fedora 44

Kernel Release

7.1.5-201.fc44.x86_64 (also building 7.1.7 to test)

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

Confirmed — running Fedora 44 stable kernel 7.1.5-201.

Hardware: GPU

NVIDIA GeForce RTX 5070 (GB205, Blackwell, desktop)

Describe the bug

Summary: After S3 deep suspend/resume, the nvidia_modeset PM lock becomes permanently held, causing any subsequent DRM atomic commit (page flip, wallpaper change, window open) to deadlock the entire compositor and freeze the system. The freeze is intermittent — it does not occur on every resume. In the latest occurrence, the system survived 8 consecutive suspend/resume cycles over 2+ days before deadlocking on the 9th.

Key difference from #1117: This is S3 deep (not s2idle), on a desktop (not laptop), with nvidia-suspend.service running successfully — VRAM is saved and restored. The GSP firmware still enters a degraded state that eventually deadlocks on a DRM commit.

Likely related: NVIDIA Forum: post-resume DIFR prefetch deadlock on RTX 5070 Ti — same symptom, same GPU generation, poster identified DIFR (Display Idle Frame Refresh) as the culprit path where GSP fires a prefetch event into stale pushbuffer state post-resume.


System Details

Component Value
GPU RTX 5070 (GB205, Blackwell, PCI 01:00.0)
Driver 610.43.03 (Open Kernel Module, RPMFusion akmod)
Motherboard Gigabyte B650 AORUS ELITE AX V2, BIOS F36
CPU AMD Ryzen 7000 (Raphael, AM5)
iGPU AMD Raphael (renderD128)
OS Fedora 44, GNOME 50.3 / Mutter 50.3, Wayland
Kernel 7.1.5-201.fc44.x86_64
Sleep mode S3 deep (mem_sleep_default=deep)
S0ix NOT supported on this platform (desktop AM5)

Power Management Configuration

# /etc/modprobe.d/nvidia-power-management.conf
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_TemporaryFilePath=/var/lib/nvidia
options nvidia NVreg_UseKernelSuspendNotifiers=0

Kernel cmdline: mem_sleep_default=deep nvidia.NVreg_UseKernelSuspendNotifiers=0

SELinux policy module installed to allow systemd_sleep_t writes to /var/lib/nvidia (var_lib_t).

Deadlock Trace (SysRq+W, Aug 9 2026 16:53:54 CST)

task:KMS thread      state:D stack:0     pid:3401  tgid:3379  ppid:3077
Call Trace:
 <TASK>
 __schedule+0x2c2/0x710
 schedule+0x27/0xa0
 schedule_timeout+0xdc/0x120
 ___down_common+0xd2/0x1f0
 __down+0x26/0xe0
 down+0x47/0x60
 nvkms_ioctl_from_kapi_try_pmlock+0x4a/0xa0 [nvidia_modeset]    ← STUCK HERE
 ApplyModeSetConfig+0x60a/0xc70 [nvidia_modeset]
 nv_drm_atomic_apply_modeset_config+0x57d/0x640 [nvidia_drm]
 nv_drm_plane_atomic_check+0x42d/0x590 [nvidia_drm]
 drm_atomic_check_only+0x197/0x400
 drm_atomic_nonblocking_commit+0x17/0x70
 drm_mode_atomic_ioctl+0x571/0x8b0
 drm_ioctl_kernel+0xae/0x100
 drm_ioctl+0x2d9/0x560
 __x64_sys_ioctl+0xb9/0x100
 do_syscall_64+0xe2/0x560
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
 </TASK>

The Mutter KMS thread (pid 3401) tries to do a DRM atomic commit → enters nvidia_drm → calls nvkms_ioctl_from_kapi_try_pmlock → blocks forever on a semaphore that is never released. This is the nvidia_modeset PM lock that should have been released during resume, but the GSP firmware left it in a held state.

Suspend/Resume History (single boot, Aug 7–9)

The system completed 8 successful S3 deep cycles over 2+ days before deadlocking:

# Suspend Resume nvidia-suspend nvidia-resume Result
1 Aug 07 20:04 Aug 07 21:10 ✅ Ran ✅ Ran OK
2 Aug 07 22:56 Aug 08 07:42 ✅ Ran ✅ Ran OK
3 Aug 08 10:32 Aug 08 14:55 ✅ Ran ✅ Ran OK
4 Aug 08 17:27 Aug 08 19:04 ✅ Ran ✅ Ran OK
5 Aug 08 22:24 Aug 09 08:08 ✅ Ran ✅ Ran OK
6 Aug 09 10:42 Aug 09 12:54 ✅ Ran ✅ Ran OK
7 Aug 09 13:35 Aug 09 14:22 ✅ Ran ✅ Ran OK → FROZE 2h31m later
  • No SELinux denials (ausearch -m avc clean)
  • No additional suspend between last resume and freeze
  • Chrome was active at the time (negative frame latency errors just before freeze, indicating GPU becoming unresponsive)

What was already eliminated

  1. nvidia-suspend skipping — Fixed by NVreg_UseKernelSuspendNotifiers=0. Services run every time now.
  2. SELinux blocking VRAM writes — Fixed by custom policy module + moved to /var/lib/nvidia.
  3. s2idle — Platform doesn't support S0ix. GPU stays in D0, fans spin. Not viable.
  4. VRAM not being saved — Services report success, consume 1-2s CPU, ~1-2GB peak memory (VRAM being written).

Crash History (this system)

Date Trigger Post-resume? Time after resume nvidia-suspend
Jul 30 mpv pause + wallpaper Unknown Unknown Unknown (old config)
Aug 01 YouTube + wallpaper cron Yes ~27 min SKIPPED
Aug 05 4chan image in Chrome Yes <1 min SKIPPED
Aug 07 s2idle testing (multiple) Yes Various RAN (but s2idle)
Aug 09 Normal use (Chrome) Yes ~2h 31min RAN (S3 deep)

The fix applied on Aug 7 (VRAM path + S3 deep + services enabled) made it much more reliable — survived 2+ days and 8 cycles — but did not eliminate the underlying GSP firmware state corruption.

To Reproduce

  1. Desktop with RTX 5070 (GB205 Blackwell) as primary display GPU, Wayland session (GNOME/Mutter)
  2. Configure S3 deep sleep with nvidia-suspend.service / nvidia-resume.service
  3. Use the system normally with suspend/resume cycles
  4. Eventually (probabilistically, after N cycles) the nvidia_modeset PM lock becomes stuck after resume
  5. The next DRM atomic commit (page flip, wallpaper change, etc.) deadlocks the compositor

Expected behavior

The nvidia_modeset PM lock should always be released after resume, regardless of how many suspend/resume cycles have occurred.

Possible root cause

Based on the NVIDIA Forum analysis, this appears to be the DIFR (Display Idle Frame Refresh) prefetch path where GSP fires a post-resume event into stale pushbuffer state. The variable delay (sometimes <1min, sometimes hours) matches DIFR's idle-triggered engagement — it fires when the display first goes idle after resume.

Bug Incidence

Intermittent — approximately 1 in 5-10 resume cycles on S3 deep (with proper VRAM save). Was nearly every resume when nvidia-suspend was being skipped (VRAM not saved).

nvidia-bug-report.log.gz

Attached.

Activity

  1. villa1337 commented on Aug 9, 2026

    @villa1337
    Author

    Note: nvidia-bug-report.log.gz (488KB) needs to be attached manually via the GitHub web UI — the CLI doesn't support binary attachments. File location: ~/nvidia-bug-report.log.gz

  2. villa1337 commented on Aug 10, 2026

    @villa1337
    Author
  3. villa1337 commented on Aug 14, 2026

    @villa1337
    Author

    Update — Aug 14, 2026: GSP disable (NVreg_EnableGpuFirmware=0) does NOT fix this.

    Froze again today, ~19 minutes after resume from S3 deep. GSP was confirmed disabled (EnableGpuFirmware: 0 in /proc/driver/nvidia/params). The SysRq+L trace is identical:

    CPU: 8 PID: 879 Comm: nvidia-modeset/
    RIP: nvWriteGpEntry+0xb9/0x370 [nvidia_modeset]
    Call Trace:
      nvPushKickoff
      PrefetchHelperSurfaceEvo
      nvDIFRPrefetchSurfaces
      DifrPrefetchEventDeferredWork
      nvkms_kthread_q_callback
      _main_loop
    

    This confirms the DIFR prefetch deadlock is in the nvidia_modeset display engine code, not in GSP firmware. Running RM on CPU instead of GSP makes no difference.


    Related report with identical stack trace on RTX 5070 Ti (same Blackwell generation, same AM5 platform):

    https://forums.developer.nvidia.com/t/ubuntu-24-04-suspend-display-power-transition-causes-soft-lockup-in-nvidia-modeset-nvwritegpentry-system-requires-hard-power-off/372254/3

    That poster also confirmed that the DIFR idle-threshold regkeys (RMLpwrMsDifrCgIdleThresholdUs=0xFFFFFFFF, RMLpwrMsDifrSwAsrIdleThresholdUs=0xFFFFFFFF) do not prevent the post-resume prefetch, and that there is no user-facing way to disable DIFR in the current driver.

    At this point the only viable workaround appears to be building from source with nvDIFRAllocate() stubbed out in src/nvidia-modeset/src/nvkms-difr.c, or avoiding suspend entirely.

  4. mabster commented on Aug 25, 2026

    @mabster

    Reproduced on nvidia-open 610.57.04 — confirming this is not fixed in the newer driver.

    Setup:

    • GPU: RTX 5070 (GB205, Blackwell, desktop)
    • Driver: nvidia-open-dkms 610.57.04
    • Kernel: 7.1.8-arch1-3 (Arch Linux, PREEMPT_DYNAMIC)
    • Compositor: Hyprland 0.56.2 (Wayland)
    • Sleep: S3 deep
    • Mainboard: ASUS TUF B860M-PLUS WIFI, BIOS 3011
    • NVreg_UseKernelSuspendNotifiers=1 (works around a separate DKMS/objtool suspend bug, but does not affect this deadlock)
    • nvidia-suspend.service / nvidia-resume.service enabled, VRAM save/restore confirmed working

    Deadlock trace (Aug 25 16:46:44):

    task:Hyprland        state:D stack:0     pid:1607  tgid:1607
    Call Trace:
     __schedule+0x459/0x1870
     schedule+0x27/0xa0
     schedule_timeout+0xdc/0x120
     __down_common+0xfe/0x340
     down+0x53/0x70
     nvkms_ioctl_from_kapi_try_pmlock+0x4a/0xa0 [nvidia_modeset]
     ApplyModeSetConfig+0x5ed/0xda0 [nvidia_modeset]
     nv_drm_atomic_apply_modeset_config+0x7b0/0x890 [nvidia_drm]
     drm_atomic_check_only+0x5c4/0x9f0
     drm_atomic_nonblocking_commit+0x17/0x70
     drm_mode_atomic_ioctl+0xb58/0xdb0
     drm_ioctl_kernel+0xae/0x100
     drm_ioctl+0x2d8/0x570
     __x64_sys_ioctl+0xb9/0x100
     do_syscall_64+0xaa/0x660
     entry_SYSCALL_64_after_hwframe+0x76/0x7e
    

    Same nvkms_ioctl_from_kapi_try_pmlock deadlock path as reported. The nvidia-modeset/ kernel thread holds the PM semaphore and never releases it. Hyprland DRM atomic commit blocks indefinitely → display freezes, compositor unresponsive, hard reset required.

    Timeline:

    • 16:37:08 — S3 suspend, clean resume (kernel logs normal: CPUs up, USB reset, nvidia HDA enabled, i915 GuC loaded)
    • ~16:42 — Display freezes during normal desktop use (no specific trigger — no fullscreen video, no GPU-intensive app)
    • 16:46:44 — Kernel detects Hyprland blocked for 122s on the nvidia_modeset PM lock
    • 16:47:53 — Hard reboot

    Bug incidence: Intermittent. On this system, prior to the Aug 15 driver upgrade (610.43.03 → 610.57.04), the freeze manifested as a different failure mode (hard system lock ~7 min post-resume — the DKMS objtool/JMP-to-NOP bug, now fixed by UseKernelSuspendNotifiers=1). This PM lock deadlock is a distinct issue observed on both driver versions.

  5. HarisShakoor commented on Aug 31, 2026

    @HarisShakoor

    Same deadlock here on desktop Blackwell, adding a full capture since this report matches my system exactly.

    Hardware/software:

    • GPU: RTX 5060 Ti 16 GB (desktop), two displays attached (monitor + LG C1 OLED TV)
    • CPU/board: Ryzen 9 7900X, MSI PRO B850-S WIFI6E (AM5), BIOS 2.A30
    • OS: Ubuntu 26.04, GNOME Wayland, kernel 7.0.0-30-generic
    • Driver: 595.84 open (Ubuntu package nvidia-driver-595-open 595.84-0ubuntu0.26.04.1)
    • PreserveVideoMemoryAllocations=1, UseKernelSuspendNotifiers=1, nvidia-suspend/resume/hibernate services disabled
    • Sleep mode: deep (ACPI S3)

    Incident: 4th occurrence since July (kernels 7.0.0-28/-29/-30, drivers 595.71.05 and 595.84, and with both suspend orchestration variants — systemd services and kernel notifiers). Intermittent: many S3 cycles work, then one deadlocks shortly after resume.

    This capture: S3 resume completed normally (PM: suspend exit at 17:08:47). ~65 seconds later the KMS thread blocked. Machine observed frozen for 14+ minutes with 6 consecutive hung-task reports — the holder thread never progresses:

    INFO: task KMS thread:8503 blocked for more than 122 seconds.  (… 245, 368, 491, 614, 737 …)
    task:KMS thread   state:D  …
     nvkms_ioctl_from_kapi_try_pmlock+0x55/0xc0 [nvidia_modeset]
     ApplyModeSetConfig+0x59e/0xba0 [nvidia_modeset]
     nv_drm_atomic_apply_modeset_config / drm_mode_atomic_ioctl
    
    INFO: task KMS thread:8503 blocked on a semaphore likely last held by task nvidia-modeset/:1148
    task:nvidia-modeset/  state:R  running task   (spinning the whole time in:)
     nvWriteGpEntry+0xfc/0x370 [nvidia_modeset]
     nvPushKickoff+0x28/0x50 [nvidia_modeset]
     PrefetchHelperSurfaceEvo+0x45c/0x650 [nvidia_modeset]
     nvDIFRPrefetchSurfaces+0xb1/0x1f0 [nvidia_modeset]
     DifrPrefetchEventDeferredWork+0x16/0x30 [nvidia_modeset]
     nvkms_kthread_q_callback+0xe9/0x190 [nvidia_modeset]
    

    Kernel otherwise alive (SSH fine, SysRq w/l/t captured — full log attached). Disabling GNOME display auto-blank (idle-delay 0) did not prevent it, consistent with this being the post-resume DIFR prefetch path rather than the blank/unblank path from #1289. s2idle avoids it entirely on this machine (2+ weeks clean).

    freeze-20260830-1709-kernel_U.log

  6. villa1337 commented on Oct 2, 2026

    @villa1337
    Author

    Appears resolved in 615.71.09

    Reporting back: this DIFR post-S3-resume deadlock appears to be fixed as of driver 615.71.09 (Open Kernel Module, build dated 2026-09-04) on kernel 7.2.7.

    Previously (610.43.03, kernel 7.1.x): compositor froze 1–150 min after every S3 deep resume, with nvidia-modeset spinning in nvWriteGpEntry → nvPushKickoff → nvDIFRPrefetchSurfaces and holding the PM lock while Mutter's KMS thread deadlocked waiting for it. Required SysRq REISUB to recover. Reproduced across multiple kernels, with GSP firmware disabled, and on an idle login screen — confirming it was in nvidia_modeset, not GSP-specific.

    Now (615.71.09, kernel 7.2.7-200.fc44): 1 week+ uptime with 13 S3 deep suspend/resume cycles, zero freezes, zero hung-task/nvWriteGpEntry traces in the journal, zero Xid errors.

    System: RTX 5070 (GB205, Blackwell) · Fedora 44 · GNOME/Wayland (Mutter 50.3) · AMD Ryzen 7000 · B650 AORUS ELITE AX V2.

    Will reopen/comment if it recurs, but 13 clean S3 cycles over a week is a strong signal the fix is in. Thanks.

  7. HarisShakoor commented on Oct 2, 2026

    @HarisShakoor

    Thank you for the update @villa1337

    Upgraded from 595.91.07 → 615.71.09 using NVIDIA's official Ubuntu 26.04 repository and the open DKMS kernel module.

    Current setup:

    • GPU: RTX 5060 Ti 16 GB (desktop, Blackwell/GB206)
    • OS: Ubuntu 26.04
    • Kernel: 7.0.0-34-generic — intentionally unchanged so the driver is the main variable
    • Driver: 615.71.09, Open Kernel Module
    • Desktop: GNOME / Wayland
    • Secure Boot: enabled, DKMS module signed via enrolled MOK
    • Displays:
      • Primary monitor via DisplayPort
      • LG OLED TV via HDMI
    • NVreg_PreserveVideoMemoryAllocations=1
    • NVreg_UseKernelSuspendNotifiers=1
    • nvidia-suspend.service / nvidia-resume.service / nvidia-hibernate.service: not used
    • Sleep mode: S3 deep
    • systemd configured with MemorySleepMode=deep

    After upgrading, both DisplayPort and HDMI outputs are working normally and the journal is currently clean — no nvWriteGpEntry, nvDIFRPrefetchSurfaces, hung-task, or Xid errors.

    I’m going to run this configuration normally for approximately one week, including repeated S3 deep suspend/resume cycles, and will report back with the results.

    If the old DIFR deadlock returns, I’ll capture the same kernel/SysRq traces as before.

  8. JurniS-dev commented on Nov 12, 2026

    @JurniS-dev

    Reporting a corroborating "PM lock left held" observation on an RTX 5070 + 615.71.09
    (Ubuntu 26.04, kernel 7.0.0-43, GNOME Wayland, S3 deep):

    After a successful FBSR save via nvidia-suspend.service (writes
    /proc/driver/nvidia/suspend, service completed in ~700 ms), the deferred fbcon
    takeover kworker blocked in GetDynamicDisplayInfo → down_read on the
    nvidia-modeset rwsem 16 minutes later, with no D-state writer anywhere in the
    hung-task reports or the SysRq-T show-state dump — the lock appears to have been
    left held by the suspend-side path. While blocked, the kworker holds
    console_lock, which then wedges pm_restore_console (the suspend abort path)
    and everything console-related — unrecoverable AB-BA, recovery only via SysRq+B.

    The same takeover kworker completes instantly on cycles where the lock is free,
    so the lock state is the only variable.

    I've reproduced the deadlock family 6× across kernel-suspend-notifiers on/off ×
    session-freeze on/off — every combination wedges
    . Full stack traces and the
    config sweep are documented here:

    Given #1281 describes the PM lock as left held after S3 — this looks like the
    same mechanism, with the fbcon deferred takeover as the reader that trips over it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions