nvidia-drm: force-enabled HDMI connector does not set link-status to Bad when sink stops responding
NVIDIA Open GPU Kernel Modules Version
595.58.03
Does this happen with the proprietary driver?
Not tested (RTX 5070 Ti / Blackwell only supports open kernel modules)
Operating System and Version
CachyOS (Arch-based) rolling release
Kernel Release
Linux msedek-pc 6.19.10-1-cachyos #1 SMP PREEMPT_DYNAMIC x86_64
Hardware
GPU 0: NVIDIA GeForce RTX 5070 Ti (UUID: GPU-ce08f902-c260-a75d-c651-9713c298c7ea)
Describe the bug
When an HDMI connector is force-enabled via the kernel parameter video=HDMI-A-1:e, the NVIDIA DRM driver's detect() callback in nvidia-drm-connector.c reads connector->force and passes forceConnected = NV_TRUE to NvKMS. This correctly keeps the connector status as "connected" regardless of physical state.
However, when the HDMI sink (a Samsung 75" 4K TV in this case) switches to its built-in apps (Netflix, etc.) and stops listening on its HDMI receiver, the TMDS link goes down. The driver never sets the DRM link-status property to DRM_MODE_LINK_STATUS_BAD. This means userspace compositors (KWin, Mutter, etc.) are never notified that the link degraded, and they never trigger a modeset to re-train it.
When the TV returns to the HDMI input, the display remains blank because no component in the stack knows the link needs re-negotiation.
Per the DRM/KMS specification, DRM_MODE_LINK_STATUS_BAD should be set by the driver when link training fails or when the sink disappears, so userspace can force a re-probe. The KWin compositor already has handling for this (forces a modeset when linkStatus == Bad), but it never triggers because the driver never sets it.
The relevant code path in nvidia-drm-connector.c:
static bool __nv_drm_detect_encoder(...)
{
switch (connector->force) {
case DRM_FORCE_ON:
case DRM_FORCE_ON_DIGITAL:
pDetectParams->forceConnected = NV_TRUE;
break;
...
}
// NvKMS returns connected, link-status is never updated
}
To Reproduce
- Connect a TV via HDMI to an NVIDIA GPU
- Add
video=HDMI-A-1:eto kernel command line (force-enable the connector) - Boot, verify TV displays correctly
- Switch the TV to a built-in app (Netflix, or any internal input)
- Switch the TV back to the HDMI input
- Display remains blank - the HDMI link is not re-trained
- Check
link-statusproperty: it still shows "Good" despite the link being dead
Expected behavior
When the HDMI sink stops responding on a force-enabled connector:
- The driver should detect the TMDS link failure
- Set
link-statustoDRM_MODE_LINK_STATUS_BADviadrm_connector_set_link_status_property() - Send a uevent so the compositor can trigger a modeset to re-train the link
Bug Incidence
Always
nvidia-bug-report.log.gz
(will attach separately - generated with nvidia-bug-report.sh)
More Info
- Display: Samsung 75" 4K TV (SAM, HDMI-A-1)
- Second display: Samsung monitor via DisplayPort (DP-2), unaffected
- Kernel parameters:
video=HDMI-A-1:e drm.edid_firmware=HDMI-A-1:edid/samsung-4k.edid - Compositor: KWin 6.6.3 (Wayland)
- KWin already handles
linkStatus == Badwithm_forceModeset = true(drm_gpu.cpp:332-335), but this path never fires because the NVIDIA driver never sets the property - Related kernel DRM patch submitted to dri-devel: signals hotplug uevent for force-enabled connectors (https://lore.kernel.org/dri-devel/[email protected]/)
- Related KDE KWin MR: https://invent.kde.org/plasma/kwin/-/merge_requests/9034
- Related issue: #1055 (similar class of "DRM state diverges from physical reality")
- Workaround: userspace I2C polling daemon that detects TV state via EDID reads and triggers
kscreen-doctordisable/enable cycle
nvidia-bug-report.log.gz attached below (generated with nvidia-bug-report.sh, driver 595.58.03)
nvidia-bug-report.log.gz
nvidia-bug-report.log.gz (base64-encoded due to GitHub API limitation): https://gist.github.com/msedek/7535e5efc4c3629215cf0af98fc406a7
Decode with: base64 -d nvidia-bug-report.log.gz.b64 > nvidia-bug-report.log.gz
Closing - root cause was a userspace script (SimulateUserActivity loop) preventing DPMS from ever turning off screens. With DPMS cycling normally, the HDMI link re-negotiates on wake without any driver changes needed. Apologies for the false report.
@msedek out of curiosity, for both the kwin change and this change, have you been using AI to assist you with the authorship?