My laptop setup is that a Nvidia 4070 DGPU is wired directly to the HDMI port on the laptop. (I understand this is a common setup.)
When the cable is plugged in a new framebuffer device is created as it should, however when the cable is plugged out, the device is NOT removed even with no clients using it. This has several negative consequences:
If the virtual console is remapped to the new framebuffer, then after plugging out, the console is NOT remapped back to the integrated GPU. (This can be inhibited by passing fbcon=map:0, however this does not help the framebuffer to get removed)
The DGPU device fails to enter D3cold state and consumes power.
Here are some facts from the kernel’s sysfs. Note this is WITHOUT any graphical environment running, pure text console, ruling out the graphical env as a culprit.
Before the cable is plugged in
+ cat /proc/driver/nvidia/gpus/0000:c4:00.0/power
Runtime D3 status: Enabled (fine-grained)
Video Memory: Off
GPU Hardware Support:
Video Memory Self Refresh: Supported
Video Memory Off: Supported
S0ix Power Management:
Platform Support: Supported
Status: Disabled
+ cat /sys/kernel/debug/dri/1/clients
command tgid dev master a uid magic
+ cat /sys/kernel/debug/dri/1/internal_clients
fbdev
+ ls /sys/class/graphics
fb0
fbcon
+ grep . /sys/class/graphics/fb0/name
amdgpudrmfb
I have the exact same issue with intel12 and nvidia 3080 ti on a advanced optimus laptop.
I first thought it was an issue from Aquamarine (AQ), the Wayland backend used by Hyprland, but i can reproduce the issue without a graphical environment as well.
I’ve tried to reproduce the issue: boot to the desktop, check that GPU goes into D3cold, plug in a display (HDMI routed to the nvidia GPU), unplug, observe unwanted consequences.
For me, the GPU does not enter PCI D3cold, I also see that the system still thinks the display is still plugged in in the gnome display settings and my cursor will go into the void where the display pane was.
This is Fedora (Silverblue) 41, nvidia 565.77, linux 6.12.7, Wayland on a ThinkPad P1 gen 6 laptop.
Thank you for the logs. GPU not entering D3cold after unplugging the external display is a known issue. We are tracking it internally on NVBug #4822713.
The issue remains under investigation and we do not have a fix at this time.