Skip to content

nvidia-modeset kthread livelocks in nvDIFRPrefetchSurfaces/nvWriteGpEntry; KMS thread blocks forever, display stack unrecoverable (595.71.05 open, RTX 4080 Laptop) #1246

Open

Description

@otatop

prev-boot-kernel.log.gz

NVIDIA Open GPU Kernel Modules Version

595.71.05 (Ubuntu package nvidia-driver-595-open 595.71.05-0ubuntu0.26.04.1)

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

Ubuntu 26.04 LTS

Kernel Release

7.0.0-27-generic #27-Ubuntu (Ubuntu 26.04)

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

  • I am running on a stable kernel release.

Hardware: GPU

GPU 0: NVIDIA GeForce RTX 4080 Laptop GPU (UUID: GPU-2d959b1c-d3e9-a43f-a88d-1cab500438dc)

Describe the bug

After ~20 hours idle at the GNOME lock screen with an external display connected to the dGPU, the nvidia-modeset/ kernel thread entered a permanent busy-spin inside the DIFR prefetch path:

DifrPrefetchEventDeferredWork
  -> nvDIFRPrefetchSurfaces
    -> PrefetchHelperSurfaceEvo
      -> nvWriteGpEntry   <- spins here forever (state R, 100% of one core)

The thread remains runnable (state R) and never exits nvWriteGpEntry — successive hung-task reports over 20+ minutes show the same thread at nvWriteGpEntry+0xf7/+0x100, i.e. it is looping (presumably waiting for GPFIFO space that never becomes available), not making progress. There is no timeout or bail-out in this loop.

Because that kthread holds the nvkms lock (semaphore), the "KMS thread" blocks forever in nvkms_ioctl_from_kapi_try_pmlock and every subsequent modeset/flip/cursor operation queues behind it. The session is unrecoverable: displays cannot be lit (lid-open produced nothing), and only a hard power-off recovers the machine. The rest of the kernel stays alive.

To Reproduce

ot deterministic — it is a race that needs many DIFR engage/disengage cycles:

  1. Hybrid laptop, external monitor on the dGPU, GNOME Wayland session.
  2. Lock the session and leave it idle for many hours (AC power, no suspend).
  3. In this state the lock-screen clock repaints the dGPU-driven output once per minute; each repaint wakes the GPU from runtime D3, and each subsequent idle period re-engages DIFR. In my incident the machine went through ~1,250 such cycles (one per minute from 20:12 to 16:47 the next day) before one prefetch livelocked.

This machine has hit what appears to be the same deadlock at least once before (an older note in my modprobe config references a previous KMS-thread deadlock and attempts options nvidia-modeset NvModesetEnableDIFR=0 — which is not a valid parameter; as far as I can tell there is no user-accessible way to disable DIFR on the open driver).

Kernel log

First hung-task report (16:49:56; the blocked task and the spinning lock holder):

INFO: task KMS thread:8215 blocked for more than 122 seconds.
      Tainted: G           O        7.0.0-27-generic #27-Ubuntu
task:KMS thread      state:D stack:0     pid:8215  tgid:8112  ppid:7471   task_flags:0x400040 flags:0x00080000
Call Trace:
 <TASK>
 __schedule+0x2b2/0x630
 schedule+0x27/0x90
 schedule_timeout+0xcf/0x110
 ___down_common+0x108/0x1e0
 __down_common+0x5a/0x180
 __down+0x1d/0x30
 down+0x5e/0x80
 nvkms_ioctl_from_kapi_try_pmlock+0x55/0xc0 [nvidia_modeset]
 ApplyModeSetConfig+0x59e/0xba0 [nvidia_modeset]
 ? nv_drm_atomic_apply_modeset_config+0x80b/0x9c0 [nvidia_drm]
 ? nv_drm_plane_atomic_check+0xed/0x680 [nvidia_drm]
 ? nv_drm_atomic_check+0x12d/0x150 [nvidia_drm]
 ? drm_atomic_check_only+0x199/0x420
 ? drm_atomic_nonblocking_commit+0x18/0x70
 ? drm_mode_atomic_ioctl+0x57e/0x910
 ...
 </TASK>
INFO: task KMS thread:8215 blocked on a semaphore likely last held by task nvidia-modeset/:1974
task:nvidia-modeset/ state:R  running task     stack:0     pid:1974  tgid:1974  ppid:2      task_flags:0x208040 flags:0x00080020
Call Trace:
 <TASK>
 __schedule+0x2ba/0x630
 preempt_schedule_irq+0x38/0x70
 raw_irqentry_exit_cond_resched+0x31/0x40
 irqentry_exit+0x2e/0x5a0
 ? __update_idle_core+0x56/0x1c0
 sysvec_apic_timer_interrupt+0x54/0xd0
 asm_sysvec_apic_timer_interrupt+0x1b/0x20
RIP: 0010:nvWriteGpEntry+0xf7/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]
 ? _main_loop+0x99/0x160 [nvidia_modeset]
 ? kthread+0xf7/0x130
 ? ret_from_fork+0x195/0x2a0
 ? ret_from_fork_asm+0x1a/0x30
 </TASK>

The reports repeat with the same two stacks at 245s, 368s, ... 1228s blocked; the nvidia-modeset/ thread is still at nvWriteGpEntry+0x100 in the final report (17:08:22), 21 minutes into the spin. The hang began at 16:47 — the compositor logged Cursor update failed: drmModeAtomicCommit: Invalid argument at 16:47:18, immediately after the last runtime-D3 wake at 16:47:00.

Possibly relevant context

  • Every runtime-D3 wake during the idle period logged the known GSP: PFM_REQ_HNDLR_STATE_SYNC_CALLBACK missing from _kgspProcessRpcEvent bootup whitelist #1145 pair:
    NVRM: _kgspProcessRpcEvent: Attempted to process RPC event from GPU0: 0x101a (PFM_REQ_HNDLR_STATE_SYNC_CALLBACK) during bootup without API lock — ~2,190 of these accumulated before the hang, so the livelocked prefetch fired in close proximity to a D3 wake cycle.
  • This platform's Dynamic Boost SBIOS interface is broken (boot-time PlatformRequestHandler failed to get target temp from SBIOS @ platform_request_handler_ctrl.c:2171), in case the PFM/LPWR interaction is relevant.
  • nvidia-modeset: WARNING: GPU:0: Unable to read EDID for display device DP-0 is logged at boot (monitor connected through a dock).

Requests

  1. A bound/timeout or error path in the nvWriteGpEntry wait used by nvDIFRPrefetchSurfaces, so a stalled prefetch fails (NV2080_CTRL_LPWR_DIFR_PREFETCH_FAIL_CE_HW_ERROR) instead of livelocking the display stack.
  2. Failing that, a supported way to disable DIFR (module parameter or regkey) as a workaround — currently there appears to be none reachable from the OS.

Bug Incidence

Once

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

No response

Activity

  1. added
    bug
    on Jul 16, 2026
  2. genneth commented on Aug 1, 2026

    @genneth

    Same livelock on 610.43.03, the current latest release — not fixed in 6xx. All prior reports here are 580.x/595.x.

    System: Razer Blade 16, RTX 4090 Laptop [10de:2757] (Ada, AD103M), hybrid; Fedora Silverblue 44, kernel 7.1.5-201.fc44, open module 610.43.03. Open module only, so no proprietary comparison.

    Stack, via echo l > /proc/sysrq-trigger — the spinning thread is R, so no hung-task splat fires on it:

    RIP: 0010:nvWriteGpEntry+0xf0/0x370 [nvidia_modeset]
     nvPushKickoff+0x28/0x50
     PrefetchHelperSurfaceEvo+0x45c/0x650
     nvDIFRPrefetchSurfaces+0x186/0x1f0
     DifrPrefetchEventDeferredWork+0x16/0x30
     nvkms_kthread_q_callback+0xdb/0x160
     _main_loop+0x112/0x170
    

    100% of one core (303 jiffies/3s) for ~50 min until reboot. No Xid, no NVRM: error.

    Trigger: no suspend, no idle cycling

    This host keeps Mutter off the dGPU (TAG+="mutter-device-ignore"), so DP-4 is driven directly by a KMS client.

    • T−60min — DP-4 degrades: HPD fires but the sink won't stream, link training fails ~40% of attempts, and connector state survives both unplug and a change of physical port. Driver-side state appears latched. kthread still idle, zero CPU.
    • T−0 — gst-launch-1.0 … ! kmssink driver-name=nvidia-drm connector-id=837 force-modesetting=true modesets DP-4.
    • T+3s — kthread enters the spin (back-computed from stime).

    Several identical pipelines earlier the same afternoon were fine, one for 30 minutes. The distinguishing factor is that preceding hour of DP instability, so the precondition looks like DIFR prefetch onto a channel already in a bad state, not a modeset as such.

    Observed once, not reproduced. Still: seconds to livelock, without S3 or RTD3 cycling.

    Blast radius

    /dev/dri/card0 becomes unopenable — every later opener blocks in drm_open → drm_stub_open → chrdev_open, state D, SIGKILL-proof. Processes already holding /dev/nvidia0 block in-driver on exit and become unreapable zombies (gnome-software, xdg-desktop-portal, chrome, the gst client). After logout the GDM greeter wedged its own gst-plugin-scan identically. rmmod nvidia_modeset is impossible, reboot is the only recovery, and shutdown itself hangs.

    No DIFR off switch — third confirmation

    By string-scan of the shipped modules: nvidia_modeset exposes 15 parameters, none DIFR-related; nvidia.ko carries no DIFR regkey string, only subdeviceCtrlCmdLpwrDifrCtrl / …DifrPrefetchResponse. No workaround exists, which is what makes the unbounded wait expensive. Seconding both asks above.

    Same bug, several triggers

    Ada and Blackwell, mobile and desktop, 580.x through 610.43.03, reached via S3 resume, RTD3 idle cycling, and a KMS modeset onto a degraded connector. One unbounded wait, three routes in.

  3. marionzheng commented on Sep 11, 2026

    @marionzheng

    Same livelock on 610.57.04 (current latest release), on Blackwell mobile, kernel 7.1.11 — and with a variant that has not been reported here yet: the deadlock also strikes during system shutdown teardown, leaving filesystems unmounted.

    Topology matches this issue exactly: hybrid laptop, external display driven by the dGPU, GNOME Wayland.

    System

    Model Lenovo 83KY — Legion Y9000X IAX10, BIOS RXCN23WW (2025-07-22)
    dGPU NVIDIA GB206M [GeForce RTX 5060 Max-Q / Mobile] [10de:2d59] (rev a1) @ 0000:02:00.0
    iGPU Intel Arrow Lake-S [8086:7d67] (rev 06) @ 0000:00:02.0, i915 — drives the internal panel
    Driver nvidia-open-dkms 610.57.04-1, nvidia-utils 610.57.04-1 (open module only; no proprietary build for Blackwell)
    Kernel 7.1.11-arch1-1
    OS Arch Linux, GNOME Shell 50.4 / Mutter 50.4, Wayland
    Sleep mode S3 deep (/sys/power/mem_sleep = s2idle [deep])
    GSP active — nvidia-smi reports GSP Firmware Version: 610.57.04

    Display topology — the external monitor is on the dGPU, the internal panel on the iGPU:

    card0 (nvidia)  card0-HDMI-A-1  connected/enabled     <- external monitor
    card0 (nvidia)  card0-DP-3, card0-eDP-2  disconnected
    card1 (i915)    card1-eDP-1     connected/enabled     <- internal panel
    card1 (i915)    card1-DP-1, card1-DP-2  disconnected
    

    Power management configuration

    Unlike #1281, this host uses the kernel-suspend-notifier path, not the VRAM-preserve path — i.e. the deadlock is not tied to PreserveVideoMemoryAllocations or to nvidia-sleep.sh:

    # /usr/lib/modprobe.d/nvidia-sleep.conf (distro default, unmodified)
    options nvidia NVreg_UseKernelSuspendNotifiers=1
    options nvidia NVreg_TemporaryFilePath=/var/tmp
    
    # /etc/modprobe.d/nvidia.conf
    options nvidia_drm modeset=1
    

    nvidia-suspend.service, nvidia-resume.service and nvidia-hibernate.service are all disabled (correct for the notifier path).

    Both sides of the deadlock

    Captured automatically by the hung-task detector — the blocked-task report also dumps the spinning kthread, so no SysRq was needed.

    Holder — nvidia-modeset/ pid 615, state R, spinning in the DIFR prefetch path:

    task:nvidia-modeset/ state:R  running task     stack:0     pid:615   tgid:615   ppid:2
    Call Trace:
     <TASK>
     ? nvWriteGpEntry+0x107/0x3e0 [nvidia_modeset]          <- spins here
     ? nvPushSetObject+0xb1/0x170 [nvidia_modeset]
     ? nvPushKickoff+0x2c/0x50 [nvidia_modeset]
     ? PrefetchHelperSurfaceEvo+0x4df/0x6f0 [nvidia_modeset]
     ? nvDIFRPrefetchSurfaces+0x158/0x240 [nvidia_modeset]
     ? DifrPrefetchEventDeferredWork+0x16/0x30 [nvidia_modeset]
     ? nvkms_kthread_q_callback+0xe6/0x170 [nvidia_modeset]
     ? _main_loop+0x10e/0x160 [nvidia_modeset]
     ? kthread+0xe4/0x120
     ? ret_from_fork+0x2a7/0x330
     ? ret_from_fork_asm+0x1a/0x30
     </TASK>
    

    The hung-task detector re-dumped this thread every ~2 minutes for 18 minutes until the machine was powered off. It is inside nvWriteGpEntry in every single dump, and the offset moves around within the function rather than sitting at one instruction — so it is actively looping, not stalled at a single point:

    Sep 07 12:48:17  nvWriteGpEntry+0x107      Sep 07 12:58:31  nvWriteGpEntry+0x40
    Sep 07 12:50:20  nvWriteGpEntry+0x115      Sep 07 13:00:34  nvWriteGpEntry+0x115
    Sep 07 12:52:23  nvWriteGpEntry+0x115      Sep 07 13:02:37  nvWriteGpEntry+0xba
    Sep 07 12:54:25  nvWriteGpEntry+0xc6       Sep 07 13:04:40  nvWriteGpEntry+0xc6
    Sep 07 12:56:28  nvWriteGpEntry+0xc6       Sep 07 13:06:43  nvWriteGpEntry+0xc6
    

    (pid 615, state R throughout; no Xid and no NVRM: error at any point)

    Waiter — KMS thread, state D, blocked on the nvkms PM lock. Two different entry points were observed on different occurrences.

    Via connector probe (Sep 07):

    INFO: task KMS thread:4094 blocked for more than 122 seconds.
          Tainted: G           OE       7.1.11-arch1-1 #1
    task:KMS thread      state:D stack:0     pid:4094  tgid:4065  ppid:829
    Call Trace:
     <TASK>
     __schedule+0x459/0x1870
     schedule+0x27/0xa0
     schedule_timeout+0xdc/0x120
     __down_common+0xfe/0x340
     down+0x53/0x70
     nvkms_ioctl_from_kapi+0x58/0xe0 [nvidia_modeset]        <- STUCK HERE
     GetDisplayMode+0x87/0x210 [nvidia_modeset]
     nv_drm_connector_get_modes+0xd5/0x180 [nvidia_drm]
     drm_helper_probe_single_connector_modes+0x1f1/0x690
     drm_mode_getconnector+0x363/0x520
     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
     </TASK>
    

    Via atomic modeset (Sep 08) — matching the trace in #1281:

    task:KMS thread      state:D stack:0     pid:4235  tgid:4206  ppid:833
    Call Trace:
     <TASK>
     __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]   <- STUCK HERE
     ApplyModeSetConfig+0x5ed/0xda0 [nvidia_modeset]
     nv_drm_atomic_apply_modeset_config+0x7b0/0x890 [nvidia_drm]
     ? nv_drm_plane_atomic_check+0x109/0x5a0 [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
     </TASK>
    

    Triggers — four occurrences, all dGPU power transitions

    Every occurrence follows a dGPU power transition within 16–65 seconds. Idle display blanking was not involved in any of them (org.gnome.desktop.session idle-delay = 300, but the 5-minute timer never elapsed in any of the four cases) — so this appears to be a distinct trigger class from #1289.

    Date Trigger Interval to deadlock
    Aug 31 09:02:42 S3 deep resume ~65 s
    Sep 07 12:45:48 dGPU HDA function runtime-PM wake ~27 s
    Sep 08 16:31:49 S3 deep resume (lid open) ~23 s
    Sep 10 18:38:17 S3 deep resume, then shutdown ~16 s (hung during shutdown)

    Trigger not previously noted: dGPU HDA runtime-PM wake

    On Sep 07 there was no suspend/resume at all. The dGPU's HDA audio function (0000:02:00.1) runtime-suspends after 10 s idle (snd_hda_intel power_save=10, the distro default), and every wake of that function powers the parent GPU back up:

    Sep 07 12:45:12  nvidia 0000:02:00.0: Enabling HDA controller
    Sep 07 12:45:48  nvidia 0000:02:00.0: Enabling HDA controller
    Sep 07 12:48:17  INFO: task KMS thread:4094 blocked for more than 122 seconds.
    

    These wakes occurred every few minutes throughout the session. So a purely audio-driven PM transition on the dGPU is sufficient to trigger the deadlock — no display idle, no system sleep. Setting snd_hda_intel power_save=0 removes this trigger class locally.

    New variant: deadlock during system shutdown teardown

    On Sep 10 the deadlock hit during shutdown rather than during a session. The consequence is worse than a display freeze — the filesystems are never unmounted:

    18:38:02  systemd-logind: suspend requested from client PID 4172 ('gnome-session-s')
    18:38:02  gnome-shell: Cursor update failed: drmModeAtomicCommit: Invalid argument
    18:38:03  PM: suspend entry (deep)
    18:38:17  ACPI: PM: Waking up from system sleep state S3
    18:38:17  nvidia 0000:02:00.0: Enabling HDA controller
    18:38:18  PM: suspend exit
    18:38:33  systemd: Stopping nvidia-powerd service...
    18:38:34  systemd: Stopping GNOME Shell...
    18:38:34  gnome-shell: Connection to xwayland lost
    18:38:34  gnome-shell: Shutting down GNOME Shell
    18:38:34  systemd: gdm.service: Deactivated successfully.
    18:38:35  systemd: Unmounted /var/lib/docker/rootfs/overlayfs/...
              <journal ends here — hard power-off required>
    

    There is no Reached target Unmount All Filesystems, no systemd-shutdown, and no Journal stopped. For comparison, a clean shutdown on the same machine ends:

    Sep 07 17:50:32  systemd: Reached target Unmount All Filesystems.
    Sep 07 17:50:32  systemd-shutdown[1]: Syncing filesystems and block devices.
    Sep 07 17:50:32  systemd-shutdown[1]: Sending SIGTERM to remaining processes...
    Sep 07 17:50:32  systemd-journald[435]: Journal stopped
    

    The hang therefore occurs while GNOME Shell / gdm tear down the display, i.e. at the final modeset, and it happens before the unmount phase. The drmModeAtomicCommit: Invalid argument at 18:38:02 suggests the nvidia DRM device was already in a bad state going into the suspend.

    Because hung_task_timeout_secs is 120 s and journald had already stopped, no blocked-task splat was recorded for this occurrence — the journal simply ends. The two stacks above come from the Sep 07 and Sep 08 occurrences, where the session stayed alive long enough to log them.

    Summary of what this adds

    1. Not fixed in 610.57.04, the current latest release (this issue previously had 595.71.05 and 610.43.03 in the comments).
    2. Reproduces on Blackwell mobile (GB206M), kernel 7.1.11, not only Ada.
    3. Independent of the PM path — this host uses NVreg_UseKernelSuspendNotifiers=1 with the sleep services disabled, whereas RTX 5070 (GB205): nvkms PM lock deadlock after S3 deep resume — GSP state corruption (intermittent) #1281 used PreserveVideoMemoryAllocations=1 with them enabled.
    4. A dGPU HDA runtime-PM wake alone is enough to trigger it, with no suspend and no display idle.
    5. The deadlock also occurs during shutdown teardown, hanging before filesystems are unmounted and so forcing an unclean power-off — a data-integrity consequence, not just a lost session.

    This is consistent with the bound-the-wait approach in #1286 / #1192: with a deadline in nvWriteGpEntry(), the holder would release the nvkms PM lock and the waiter would proceed. In the shutdown case specifically, even a failed prefetch would be preferable to an unclean unmount.

    Happy to attach nvidia-bug-report.log.gz or full journals for any of the four occurrences on request.

  4. sewi-cpan commented on Oct 3, 2026

    @sewi-cpan

    Same livelock on Ada mobile workstation (RTX 3500 Ada Generation Laptop, AD104GLM [10de:27bb]), with a regression window within the 580 branch that may help narrow this down.

    System: Lenovo ThinkPad P16 Gen 2 (21FA, BIOS N3TET64W 2.00), hybrid (Intel Raptor Lake-S UHD drives eDP only; all external outputs are wired to the dGPU). Ubuntu 25.10, kernel 6.17.0-41-generic, GNOME 49 Wayland. External monitor on DP via a USB-C dock. NVreg_PreserveVideoMemoryAllocations=1, nvidia-suspend/resume services enabled, runtime D3 fine-grained.

    Regression window: 580.126.09 → 580.159.03

    The kernel was the same (6.17.0-41) throughout. The only relevant change was the Ubuntu package update from 580.126.09 to 580.159.03 (proprietary kernel module, DKMS):

    Driver Boots in journal S3/s2idle resumes Soft lockups in nvidia-modeset
    580.126.09 2 (Jul 29 – Aug 6) 12 0
    580.159.03 9 (Aug 6 – Sep 23) 91 every boot affected (1–20 splats per boot)
    595.71.05 open Sep 23 – today — still occurs, ~daily

    Older journals have rotated away, so the 580.126.09 sample is small. Still, every single boot on 580.159.03 hit it, and none on 580.126.09 did. On 580.159.03 the stack was obfuscated (_nv003283kms ← nvkms_kthread_q_callback). With 595.71.05 open it resolves to the known nvWriteGpEntry ← nvPushKickoff ← PrefetchHelperSurfaceEvo ← nvDIFRPrefetchSurfaces ← DifrPrefetchEventDeferredWork.

    Trigger: every occurrence follows a runtime-D3 exit

    This agrees with what was reported above. On 595.71.05, each of the last four occurrences came 27–30 s after a dGPU runtime-D3 exit, marked by the known pair (plus an assertion):

    NVRM: GPU0 _kgspProcessRpcEvent: Attempted to process RPC event from GPU0: 0x101a (PFM_REQ_HNDLR_STATE_SYNC_CALLBACK) during bootup without API lock
    NVRM: GPU0 nvAssertFailedNoLog: Assertion failed: 0 @ kernel_gsp.c:1447
    watchdog: BUG: soft lockup - CPU#19 stuck for 26s! [nvidia-modeset/:1577]   (+28 s)
    

    In each case the wake was GNOME waking the screen (org.gnome.ScreenSaver.WakeUpScreen) after the screen had been locked or blanked. During that time the dGPU had dropped into runtime D3, even though the external monitor stayed connected. Blocking idle blanking with a GNOME idle inhibitor (the Caffeine approach from #1289) did not prevent it: the dGPU still entered runtime D3 while the screen was locked. Most runtime-D3 exits pass harmlessly (dozens per day), so the exit is necessary but not sufficient.

    Workaround under test

    This keeps the dGPU out of runtime D3 only while it drives a display, so battery savings without an external monitor are kept:

    GPU=/sys/bus/pci/devices/0000:01:00.0
    while true; do
        if grep -qx connected "$GPU"/drm/card*/card*-*/status 2>/dev/null; then want=on; else want=auto; fi
        [ "$(cat $GPU/power/control)" != "$want" ] && echo $want > $GPU/power/control
        sleep 5
    done

    (Run it as root, for example as a systemd service. Ubuntu's 71-nvidia.rules sets auto on bind, so a static udev rule would have to override that.) S3 resume still reinitialises the GPU, so this cannot cover the suspend route, and per the comment above it does not cover a modeset onto a degraded connector either. I'll report back whether it holds. +1 for bounding the wait (#1286).

  5. akynte commented on Oct 12, 2026

    @akynte

    Same livelock on 615.71.09 (open, Debian nvidia-kernel-open-dkms 615.71.09-2 from the CUDA repo), the newest branch so far. It's also the first KDE Plasma / KWin report here, so this isn't GNOME-specific.

    System: Lenovo LOQ 15IRH8 (82XV, BIOS LZCN41WW), RTX 4060 Laptop (AD107M), hybrid: Intel Raptor Lake-P i915 drives eDP, external 3440x1440 HDMI monitor on the dGPU. Debian 13, kernel 7.1.13+deb13-amd64, Plasma/KWin 6.3.6 Wayland. NVreg_UseKernelSuspendNotifiers=1, NVreg_PreserveVideoMemoryAllocations=1, NVreg_EnableS0ixPowerManagement=1, DynamicPowerManagement=3.

    Trigger: screens blanked/locked while idle (no system suspend in that boot). Shortly after waking and unlocking, the desktop freezes and the fans ramp up. The only way out is a hard reboot.

    INFO: task kwin_wayland:1298 blocked on a semaphore likely last held by task nvidia-modeset/:729
    task:nvidia-modeset/ state:R  running task
     ? nvWriteGpEntry+0xba/0x3b0 [nvidia_modeset]
     ? nvPushKickoff+0x28/0x50 [nvidia_modeset]
     ? PrefetchHelperSurfaceEvo+0x45a/0x640 [nvidia_modeset]
     ? nvDIFRPrefetchSurfaces+0x12a/0x1f0 [nvidia_modeset]
     ? DifrPrefetchEventDeferredWork+0x16/0x30 [nvidia_modeset]
    
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions