open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

nvidia-modeset registers nvidia_0 for an eDP panel muxed to the iGPU; each write resumes the suspended dGPU (+2.8 s boot via systemd-backlight)

Open sergihrs opened this issue 2 months ago • 0 comments

Template fields

  • NVIDIA Driver Version: 610.57.04 (same code in 615.71.09)
  • Proprietary driver: cannot test, the proprietary kernel modules do not support Blackwell (GB206)
  • Operating System and Version: Arch Linux (Omarchy 4.0.4), systemd 261.2
  • Kernel Release: 7.2.5
  • Hardware: NVIDIA GeForce RTX 5070 Laptop GPU (GB206, 10de:2d58), ASUS ROG Zephyrus G16 GU605CP (BIOS GU605CP.307), Intel Core Ultra 9 285H (Arrow Lake-H, iGPU 8086:7d51)
  • Incidence: always

Describe the bug

On a hybrid laptop with the MUX set to the iGPU (ASUS gpu_mux_mode=1), the internal OLED panel is eDP-2 on i915 and intel_backlight controls it. The dGPU's own eDP connector (card1-eDP-1) is disconnected. nvidia-modeset still registers /sys/class/backlight/nvidia_0 (type raw, max 100, parent 0000:01:00.0).

Writing to it does nothing visible and resumes the runtime-suspended dGPU (NVreg_DynamicPowerManagement=3):

$ cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
suspended
$ brightnessctl -d nvidia_0 set 30%      # took 2632 ms; panel brightness unchanged
$ cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status   # 0.5 s later
active
# back to suspended about 20 s later

The write path is nvkms_update_backlight_status() → nvKmsSetBacklight() → NV0073_CTRL_CMD_SPECIFIC_SET_BACKLIGHT_BRIGHTNESS, an RM control, so the GPU is resumed to set the backlight of a panel it does not drive. Reads of actual_brightness take the same route (nvKmsGetBacklight()).

The visible cost is at boot: systemd restores every backlight with systemd-backlight@backlight:nvidia_0.service, ordered before sysinit.target. Here that unit takes 2.81 s and sits on the critical chain to the display manager:

38.561 systemd: Starting Load/Save Screen Backlight Brightness of backlight:nvidia_0...
38.966 kernel: nvidia 0000:01:00.0: Enabling HDA controller      <- dGPU leaves D3
41.371 kernel: snd_hda_intel 0000:01:00.1: enabling device
41.372 systemd: Finished Load/Save Screen Backlight Brightness of backlight:nvidia_0.

Why it happens (source, 610.57.04)

  • nvRmRegisterBacklight() (src/nvidia-modeset/src/nvkms-rm.c) registers a backlight as soon as NV0073_CTRL_CMD_SYSTEM_GET_INTERNAL_DISPLAYS lists an internal display and GET_BACKLIGHT_BRIGHTNESS succeeds. It does not check whether the panel is connected to this GPU.
  • nvRmMuxState() would not help as is: nvRmMuxInit() runs in nvAllocDevice() after nvAllocCoreChannelEvo() has already registered the backlight, and it only covers dynamic-MUX systems.
  • nvkms_register_backlight() only asks acpi_video_backlight_use_native(), which is system-wide, so on hybrid laptops i915 and nvidia-modeset both register native backlights.
  • NVreg_EnableBacklightHandler is gone since 465, so there is no supported opt-out.

Expected

Don't register nvidia_<n> for an internal panel that is not connected to this GPU. Filtering availableInternalDisplaysMask through nvRmGetConnectedDpys() in nvRmRegisterBacklight() would do it; that change builds against 610.57.04. Alternatively, don't resume a runtime-suspended GPU to service the backlight of a panel it does not scan out.

Workaround

systemctl mask systemd-backlight@backlight:nvidia_0.service (undo it if the MUX is switched to the dGPU).

Filed by Claude Opus 5.5 via Claude Code.

sergihrs avatar Oct 02 '26 06:10 sergihrs