620.85.02: DP monitor stays dark in UEFI/bootloader after Linux reboot (sink left in D3 by powerdownLink on shutdown), works after Windows restart — RTX 2070 SUPER

Aperta
#1,631 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
46/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, cpp, linux

Direzione di ricerca

Start with ConnectorImpl::powerdownLink() in src/common/displayport/src/dp_connectorimpl.cpp and trace how it writes DPCD SET_POWER during driver teardown. Compare the Linux reboot path with the reported behavior after Windows restart, then check the proposed patch’s effects on external DP sinks and eDP. The issue reports compile testing only; done means reproducing the monitor behavior and validating a fix on hardware.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

NVIDIA Open GPU Kernel Modules Version

620.85.02 (CachyOS package linux-cachyos-nvidia-open 7.3.7-2)

Please confirm this issue does not happen with the proprietary driver (of the same version).

Not tested with the proprietary package. The code path I believe is involved (src/common/displayport, nvidia-modeset) is open source, so I'm filing here.

Operating System and Version

CachyOS (rolling)

Kernel Release

Linux 7.3.7-2-cachyos #1 SMP PREEMPT_DYNAMIC Thu, 03 Dec 2026 10:41:20 +0000 x86_64 GNU/Linux (distro kernel, stable)

Hardware: GPU

GPU 0: NVIDIA GeForce RTX 2070 SUPER (TU104, Gigabyte 1458:4001)

Describe the bug

After a reboot or shutdown from Linux, the DisplayPort monitor stays dark on the next boot and does not show the UEFI firmware or the bootloader (Limine). It wakes up only later, when nvidia-drm loads and the driver does its own link training.

After a reboot or shutdown from Windows on the same machine, the monitor shows the bootloader normally.

Setup:

  • Monitor: HKC 24E3, 1920x1080, connected over DisplayPort (single display, DP-1)
  • Board: MSI MAG B550M MORTAR (MS-7C94), BIOS 1.M0
  • Driver options: nvidia_drm.modeset=1 fbdev=1 (defaults)

This is different from the closed #1315. In #1315 the Linux/Windows difference turned out to be Windows Fast Startup and only a long cold power-off was affected. Here a plain warm reboot from Linux is enough to reproduce it. A Windows restart never uses Fast Startup and does not reproduce it.

The journal shows the driver itself can't see the monitor early in the boot that follows a Linux reboot:

nvidia 0000:2b:00.0: [drm] Cannot find any crtc or sizes
...
[drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002b00] Flip event timeout on head 0

Cannot find any crtc or sizes appears only in boots that directly follow a Linux reboot (checked across the last 7 boots). It does not appear after a cold start or after Windows.

Suspected cause

ConnectorImpl::powerdownLink() (src/common/displayport/src/dp_connectorimpl.cpp) writes DPCD SET_POWER (0x600) = D3 to the sink. It is reached on head detach, which also happens during driver teardown in nv_pci_shutdown() → nv_pci_remove_helper() on reboot/poweroff.

Some monitors in D3 apparently ignore the next source until they get an explicit D0 over AUX. The VBIOS GOP does not seem to send D0 (or doesn't retry long enough), so the firmware and bootloader output goes nowhere. The Windows driver apparently leaves the sink in D0 on shutdown/restart.

Possible fix (untested on hardware)

I wrote a small patch, compile-tested only against 620.85.02 / kernel 7.3.7 with clang+LTO. It adds an nvidia_modeset parameter dp_sink_no_d3:

  • 1: skip the D3 write in powerdownLink() while system_state > SYSTEM_RUNNING, i.e. during reboot, poweroff or halt
  • 2: always skip it

Normal DPMS behaviour is unchanged. eDP is excluded.

dp_sink_no_d3.patch
diff --git a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c
index 69f853f..0f72f27 100644
--- a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c
+++ b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c
@@ -124,6 +124,17 @@ module_param_named(force_frl_rate, force_frl_rate, int, 0444);
 
 MODULE_PARM_DESC(conceal_vrr_caps,
                  "Conceal all display VRR capabilities");
+/*
+ * dp_sink_no_d3: don't write DPCD SET_POWER=D3 to DisplayPort sinks when
+ * powering down the link.
+ *   0 = upstream behaviour
+ *   1 = skip D3 only while the system is going down (reboot/poweroff/halt),
+ *       so monitors that ignore the UEFI GOP while in D3 stay wakeable
+ *   2 = never put sinks into D3 (debugging)
+ */
+static int dp_sink_no_d3 = 0;
+module_param_named(dp_sink_no_d3, dp_sink_no_d3, int, 0644);
+
 static bool conceal_vrr_caps = false;
 module_param_named(conceal_vrr_caps, conceal_vrr_caps, bool, 0444);
 
@@ -223,6 +234,17 @@ enum NvKmsFrlRateForce nvkms_force_frl_rate(void)
     return NVKMS_FRL_RATE_FORCE_NONE;
 }
 
+NvBool nvkms_dp_skip_sink_d3(void)
+{
+    if (dp_sink_no_d3 >= 2) {
+        return NV_TRUE;
+    }
+    if (dp_sink_no_d3 == 1 && system_state > SYSTEM_RUNNING) {
+        return NV_TRUE;
+    }
+    return NV_FALSE;
+}
+
 NvBool nvkms_conceal_vrr_caps(void)
 {
     return conceal_vrr_caps;
diff --git a/kernel-open/nvidia-modeset/nvidia-modeset-os-interface.h b/kernel-open/nvidia-modeset/nvidia-modeset-os-interface.h
index 8097941..125bc55 100644
--- a/kernel-open/nvidia-modeset/nvidia-modeset-os-interface.h
+++ b/kernel-open/nvidia-modeset/nvidia-modeset-os-interface.h
@@ -119,6 +119,7 @@ enum NvKmsFrlRateForce {
 NvBool nvkms_test_fail_alloc_core_channel(enum NvKmsFailAllocCoreChannelMethod method);
 enum NvKmsFrlRateForce nvkms_force_frl_rate(void);
 NvBool nvkms_conceal_vrr_caps(void);
+NvBool nvkms_dp_skip_sink_d3(void);
 NvBool nvkms_enhanced_pcon_support(void);
 NvBool nvkms_output_rounding_fix(void);
 NvBool nvkms_disable_hdmi_frl(void);
diff --git a/src/common/displayport/inc/dp_hostimp.h b/src/common/displayport/inc/dp_hostimp.h
index f8ff1d6..7dd5360 100644
--- a/src/common/displayport/inc/dp_hostimp.h
+++ b/src/common/displayport/inc/dp_hostimp.h
@@ -44,6 +44,9 @@ extern "C" void dpPrintf(DP_LOG_LEVEL severity, const char * formatter, ...)
     __attribute__ ((format (printf, 2, 3)))
 #endif
 ;
+// Returns true when the sink must NOT be put into D3 (SET_POWER=0x600)
+// on link power-down. See nvidia_modeset.dp_sink_no_d3.
+extern "C" NvBool dpSkipSinkD3(void);
 extern "C" void dpTraceEvent(NV_DP_TRACING_EVENT event,
                              NV_DP_TRACING_PRIORITY priority, NvU32 numArgs, ...);
 
diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp
index 988c9c3..581ad20 100644
--- a/src/common/displayport/src/dp_connectorimpl.cpp
+++ b/src/common/displayport/src/dp_connectorimpl.cpp
@@ -5340,7 +5340,10 @@ void ConnectorImpl::powerdownLink(bool bPowerdownPanel)
     if (!this->bFECEnable &&
         ((!main->isEDP()) || (main->getEdpPowerData(&bPanelPwrSts, NULL) && bPanelPwrSts)))
     {
-        hal->setPowerState(PowerStateD3);
+        if (main->isEDP() || !dpSkipSinkD3())
+            hal->setPowerState(PowerStateD3);
+        else
+            DP_PRINTF(DP_NOTICE, "DPCONN> Skipping sink D3 on link powerdown (dp_sink_no_d3)");
     }
 
     train(powerOff, !bPowerdownPanel);  // Train to 0 laneCount, RBR linkRate (powerDown sequence)
@@ -5350,7 +5353,7 @@ void ConnectorImpl::powerdownLink(bool bPowerdownPanel)
     // For eDP with FEC support, FEC state would be cleared as part of panel
     // power down
     //
-    if (this->bFECEnable && (!main->isEDP()))
+    if (this->bFECEnable && (!main->isEDP()) && !dpSkipSinkD3())
     {
         hal->setPowerState(PowerStateD3);
     }
diff --git a/src/nvidia-modeset/os-interface/include/nvidia-modeset-os-interface.h b/src/nvidia-modeset/os-interface/include/nvidia-modeset-os-interface.h
index 8097941..125bc55 100644
--- a/src/nvidia-modeset/os-interface/include/nvidia-modeset-os-interface.h
+++ b/src/nvidia-modeset/os-interface/include/nvidia-modeset-os-interface.h
@@ -119,6 +119,7 @@ enum NvKmsFrlRateForce {
 NvBool nvkms_test_fail_alloc_core_channel(enum NvKmsFailAllocCoreChannelMethod method);
 enum NvKmsFrlRateForce nvkms_force_frl_rate(void);
 NvBool nvkms_conceal_vrr_caps(void);
+NvBool nvkms_dp_skip_sink_d3(void);
 NvBool nvkms_enhanced_pcon_support(void);
 NvBool nvkms_output_rounding_fix(void);
 NvBool nvkms_disable_hdmi_frl(void);
diff --git a/src/nvidia-modeset/src/dp/nvdp-host.cpp b/src/nvidia-modeset/src/dp/nvdp-host.cpp
index eb1128b..9ce9a9f 100644
--- a/src/nvidia-modeset/src/dp/nvdp-host.cpp
+++ b/src/nvidia-modeset/src/dp/nvdp-host.cpp
@@ -71,6 +71,11 @@ void dpPrintf(DP_LOG_LEVEL severity, const char *format, ...)
     va_end(ap);
 }
 
+NvBool dpSkipSinkD3(void)
+{
+    return nvkms_dp_skip_sink_d3();
+}
+
 void dpDebugBreakpoint(void)
 {
     nvAssert(!"DisplayPort library debug breakpoint");

A cleaner fix might be to never put external DP sinks into D3 during system shutdown, or to set D0 again after the final link power-down, matching what the Windows driver appears to do.

To Reproduce
  1. RTX 2070 SUPER, monitor over DisplayPort (HKC 24E3 here)
  2. Boot Linux with nvidia-open 620.85.02 and log in to the desktop
  3. systemctl reboot (or poweroff, then power on)
  4. Monitor stays dark during UEFI and bootloader, and only lights up once the nvidia driver loads
  5. Boot Windows, restart: the bootloader is shown normally
Bug Incidence

Always

nvidia-bug-report.log.gz

Will be attached in a comment.

More Info

Expected: the monitor stays wakeable by the UEFI GOP after a Linux reboot/shutdown, as it does after Windows.

Lingua principale
C
Stelle
17.7k
Fork
2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/open-gpu-kernel-modules

Tutte le issue di NVIDIA/open-gpu-kernel-modules

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.