Public bug reported:
[Impact]
On mobile workstations with NVIDIA Ada Lovelace GPUs (e.g. HP ZBook Fury 16 G11
with NVIDIA RTX 2000 Ada Generation Laptop GPU [10de:28b8]) connected to
external monitors via a DisplayPort MST Thunderbolt dock (HP Thunderbolt Dock
G4) with nvidia_drm.fbdev=0 (!nv_dev->hasFramebufferConsole), rebooting or
shutting down the system can freeze indefinitely during session teardown.
When systemd-logind drops DRM master (drm_dropmaster_ioctl ->
nv_drm_master_drop):
1. nv_drm_revoke_modeset_permission() unconditionally executes
drm_atomic_commit() on an empty atomic state even when no connector permissions
were granted to file_priv, issuing two redundant nvKms->applyModeSetConfig()
calls under nvkms_lock.
2. nv_drm_atomic_helper_disable_all() (copied from pre-4.3 Linux
drm_atomic_helper before commit 19efdf99feb2) adds all GPU CRTCs and planes to
the atomic state even when they are already disabled (!crtc->state->mode_blob
&& !crtc->state->active), forcing a full multi-head modeset teardown across all
heads (headsMask = 0xf).
3. During DisplayPort MST teardown on the dock, NVKMS times out waiting for the
display notification after 3.5s:
nvidia-modeset: WARNING: GPU:0: Lost display notification (0:0x00000000);
continuing.
4. Immediately afterwards, nv_drm_master_drop() calls
nvKms->releaseOwnership(nv_dev->pDevice), which acquires nvkms_lock and blocks
inside rm_kernel_rmapi_op waiting on the GSP display task (partition:2#0,
task:3), which faults on MMIO register 0x01281504 (0xbadf5041) and hits the GSP
task watchdog timeout 5.0s later:
GSP task watchdog timeout @ pc:0x1ad7cf8, partition:2#0, task:3
INFO: task nvidia-modeset/:1585 blocked for more than 122 seconds.
Call Trace:
down+0x49/0x70
nvkms_kthread_q_callback+0x92/0x100 [nvidia_modeset]
systemd-logind remains stuck in R state inside rm_kernel_rmapi_op
holding nvkms_lock, blocking the nvidia-modeset kthread in D state and
preventing the system from completing reboot.
[Fix]
Add fix-nv-drm-master-drop-shutdown-and-inactive-crtc.patch (+10/-11 lines) to
both debian/dkms_nvidia/patches/ and debian/open-kernel/patches/:
1. In nv_drm_revoke_modeset_permission(), track whether any connector
permission was actually revoked (do_revoke) before calling
drm_atomic_commit(state) (matching nv_drm_reset_input_colorspace() in the same
file), and ensure drm_connector_list_iter_end() is called on error paths.
2. In nv_drm_atomic_helper_disable_all(), skip already-disabled CRTCs
(!crtc->state->mode_blob && !crtc->state->active) and reset plane rotation
inside for_each_new_plane_in_state(), aligning with upstream Linux commit
19efdf99feb2 ("drm/atomic: Do not disable crtc in drm_atomic_helper_disable_all
if it's already disabled").
[Test Plan]
1. Build nvidia-dkms-595 / nvidia-kernel-source-595
(595.99.02-0ubuntu0.26.04.2) against Linux 7.0.0-42-generic on Ubuntu 26.04
(resolute).
2. Boot an HP ZBook Fury 16 G11 (RTX 2000 Ada [10de:28b8]) connected to an HP
Thunderbolt Dock G4 with external DisplayPort MST monitors active.
3. Verify that closing DRM clients (postclose), switching VTs
(drm_dropmaster_ioctl), and rebooting cleanly release NVKMS ownership without
triggering redundant applyModeSetConfig commits, "Lost display notification",
or GSP watchdog timeouts.
[Where problems could occur]
- The changes are scoped strictly to nv_drm_revoke_modeset_permission() and
nv_drm_atomic_helper_disable_all() in nvidia-drm (+10/-11 lines total).
- Skipping drm_atomic_commit() in nv_drm_revoke_modeset_permission() only
occurs when no connector matched modeset_permission_filep == filep (when state
is empty and unmodified).
- Skipping inactive CRTCs in nv_drm_atomic_helper_disable_all() matches
upstream Linux drm_atomic_helper_disable_all() behavior since Linux 4.3 (commit
19efdf99feb2).
** Affects: nvidia-graphics-drivers-595 (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "Kernel log (boot -1) showing Lost display notification,
GSP watchdog timeout, and nvidia-modeset hang"
https://bugs.launchpad.net/bugs/2173513/+attachment/6015365/+files/boot-1-gsp-watchdog-and-hung-task.log
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173513
Title:
[SRU] nvidia-drm hangs in nv_drm_master_drop / releaseOwnership on
reboot with DP MST dock (GSP task watchdog timeout @ partition:2#0,
task:3)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-595/+bug/2173513/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs