Repository navigation
Description
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:
- Hybrid laptop, external monitor on the dGPU, GNOME Wayland session.
- Lock the session and leave it idle for many hours (AC power, no suspend).
- 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-0is logged at boot (monitor connected through a dock).
Requests
- A bound/timeout or error path in the
nvWriteGpEntrywait used bynvDIFRPrefetchSurfaces, so a stalled prefetch fails (NV2080_CTRL_LPWR_DIFR_PREFETCH_FAIL_CE_HW_ERROR) instead of livelocking the display stack. - 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
More Info
No response
Activity
genneth commentedon Aug 1, 2026
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 isR, so no hung-task splat fires on it: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.gst-launch-1.0 … ! kmssink driver-name=nvidia-drm connector-id=837 force-modesetting=truemodesets DP-4.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/card0becomes unopenable — every later opener blocks indrm_open→drm_stub_open→chrdev_open, stateD,SIGKILL-proof. Processes already holding/dev/nvidia0block in-driver on exit and become unreapable zombies (gnome-software, xdg-desktop-portal, chrome, the gst client). After logout the GDM greeter wedged its owngst-plugin-scanidentically.rmmod nvidia_modesetis impossible, reboot is the only recovery, and shutdown itself hangs.No DIFR off switch — third confirmation
By string-scan of the shipped modules:
nvidia_modesetexposes 15 parameters, none DIFR-related;nvidia.kocarries no DIFR regkey string, onlysubdeviceCtrlCmdLpwrDifrCtrl/…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.
marionzheng commentedon Sep 11, 2026
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
83KY— Legion Y9000X IAX10, BIOSRXCN23WW(2025-07-22)[10de:2d59](rev a1) @0000:02:00.0[8086:7d67](rev 06) @0000:00:02.0,i915— drives the internal panelnvidia-open-dkms610.57.04-1,nvidia-utils610.57.04-1 (open module only; no proprietary build for Blackwell)7.1.11-arch1-1/sys/power/mem_sleep=s2idle [deep])nvidia-smireportsGSP Firmware Version: 610.57.04Display topology — the external monitor is on the dGPU, the internal panel on the iGPU:
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
PreserveVideoMemoryAllocationsor tonvidia-sleep.sh:nvidia-suspend.service,nvidia-resume.serviceandnvidia-hibernate.serviceare 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:The hung-task detector re-dumped this thread every ~2 minutes for 18 minutes until the machine was powered off. It is inside
nvWriteGpEntryin 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:(pid 615, state
Rthroughout; no Xid and noNVRM: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):
Via atomic modeset (Sep 08) — matching the trace in #1281:
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.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: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=0removes 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:
There is no
Reached target Unmount All Filesystems, nosystemd-shutdown, and noJournal stopped. For comparison, a clean shutdown on the same machine ends: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 argumentat 18:38:02 suggests the nvidia DRM device was already in a bad state going into the suspend.Because
hung_task_timeout_secsis 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
NVreg_UseKernelSuspendNotifiers=1with the sleep services disabled, whereas RTX 5070 (GB205): nvkms PM lock deadlock after S3 deep resume — GSP state corruption (intermittent) #1281 usedPreserveVideoMemoryAllocations=1with them enabled.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.gzor full journals for any of the four occurrences on request.sewi-cpan commentedon Oct 3, 2026
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):
nvidia-modesetOlder 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 knownnvWriteGpEntry←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):
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:
(Run it as root, for example as a systemd service. Ubuntu's
71-nvidia.rulessetsautoon 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).akynte commentedon Oct 12, 2026
Same livelock on 615.71.09 (open, Debian
nvidia-kernel-open-dkms615.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.