Display freeze: nvidia-modeset hangs in nvWriteGpEntry from DIFR prefetch after external monitor hotplug
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- c, linux, ubuntu
- Bereich
- devtools, operating-systems
Rechercherichtung
Start by reviewing the reported stack in nvWriteGpEntry, PrefetchHelperSurfaceEvo, and nvDIFRPrefetchSurfaces, then examine the attached kernel logs for the hotplug sequence. The report describes the failure path and reproduction steps, but does not identify source files or tests; reproduce across monitor disconnect and reconnect and confirm modesetting no longer hangs.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
NVIDIA Open GPU Kernel Modules Version
615.71.09 (also reproduced on 595.99.02), Ubuntu packages nvidia-driver-615-open / nvidia-driver-595-open
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
Kernel Release
7.0.0-38-generic
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
GeForce RTX 4090 Laptop GPU (AD103M, 10de:2757), hybrid graphics with Intel Raptor Lake-S UHD (i915). Alienware m18 R2, BIOS 1.23.0.
Describe the bug
The whole desktop locks up after the external monitor (Samsung U28E590 on HDMI-A-1, which is wired to the NVIDIA GPU) disconnects and reconnects. The monitor reconnect coincides with a USB UGREEN KVM hub reconnecting. The kernel stays alive (SysRq works), but the display is frozen and switching to a VT doesn't work either. The only recovery is REISUB or a hard power-off.
Desktop: GNOME Shell 50.1 on Wayland, with nvidia-drm.modeset=1.
The kernel's hung-task detector shows mutter's KMS thread stuck in nv_drm_atomic_apply_modeset_config, waiting on a semaphore held by the nvidia-modeset kthread. That kthread is runnable (state R) and spins inside the DIFR prefetch path. Every snapshot (six, taken 20 seconds apart, plus SysRq+W) shows the same stack:
RIP: 0010:nvWriteGpEntry+0x.../0x370 [nvidia_modeset]
nvPushKickoff+0x28/0x50 [nvidia_modeset]
PrefetchHelperSurfaceEvo+0x45c/0x650 [nvidia_modeset]
nvDIFRPrefetchSurfaces+0x12f/0x1f0 [nvidia_modeset]
DifrPrefetchEventDeferredWork+0x16/0x30 [nvidia_modeset]
nvkms_kthread_q_callback+0xe9/0x190 [nvidia_modeset]
_main_loop+0x99/0x160 [nvidia_modeset]
It looks like nvWriteGpEntry is waiting for GPFIFO space that the GPU never frees after the hotplug, and it holds the nvkms lock while it spins, so every modeset from the compositor blocks.
Timeline of the 615.71.09 occurrence (2026-10-29, local time):
- 15:17:54 external monitor and USB hub disconnect
- 15:30:07 monitor and hub reconnect
- ~15:31:27 display frozen; hung-task reports start at 15:31:47
- 15:33:25 SysRq+W captured, then REISUB
There are no Xid errors in the log. There's no module parameter or registry key that I can find to turn DIFR off as a workaround.
To Reproduce
- Laptop with hybrid graphics, external monitor connected to an output driven by the NVIDIA GPU, GNOME Wayland session.
- Disconnect the external monitor (or let it drop off) and reconnect it.
- It doesn't happen every time. Several reconnects succeed, but it has happened 4 times in about 4 days.
Bug Incidence
Sometimes
nvidia-bug-report.log.gz
nvidia-bug-report-redacted.log.gz
Attached, with hardware serials, MAC addresses, the monitor EDID and user/host names redacted. The report was generated after the reboot, so it doesn't contain the hang itself. The kernel log from two hangs (on 595.99.02 and 615.71.09) is attached separately as nvidia-freeze-kernel-log-redacted.log.gz.
nvidia-freeze-kernel-log-redacted.log.gz
More Info
Happy to test patches or collect more data (for example with nvidia_modeset debug=1).
- Vorherrschende Sprache
- C
- Sterne
- 17.5k
- Forks
- 1.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/open-gpu-kernel-modules
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootEvtl. vergeben @SammyTourani hat das vor 37 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
HKC G27H7Pro redundant long-HPD loop after DisplayPort link training (RTX 5060 Laptop, 610.57.04)Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
NVIDIA/open-gpu-kernel-modules#1323 ·
Maintainer antworten meist innerhalb von 1 Tag
-
build-problem
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
NVIDIA/open-gpu-kernel-modules#1155 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NVIDIA/open-gpu-kernel-modules
Ähnliche Issues
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
vercel-labs/scriptc#2910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
darktable-org/darktable#22939 ·
Maintainer antworten meist innerhalb von 1 Tag
-
os: input_password leaves terminal echo disabled when reading failsEvtl. vergeben @davlgd hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
armv7l: `close`, `unlink` and `chroot` pass the kernel their argument's addressEvtl. vergeben @aoinoikaz hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
colbymchenry/codegraph#3223 ·
Maintainer antworten meist innerhalb von 1 Tag