[Wayland] Power management / hotplug

Using a Legion 5 Pro with AMDGPU and Nvidia 3070.

I have Wayland working really well on Gentoo Linux using latest proprietary r515.

It generally uses less power than in Xorg, however, when I try to disable the display on the NVIDIA, the GPU does not suspend.

When I start Wayland without the NVIDIA plugged into a display, it properly starts out suspended and stays suspended. But plugging a display in while logged in, doesn’t hint to the device that it should wake up. I cannot determine any method to force Wayland to re-scan.

It would help if you tell us which wayland compositor are you using. In the wayland world the compositors take on the job of what used to be in Xorg. So stuff that works in one compositor might not in another. The three main wayland compositor implementations are mutter (gnome), kwin (kde), and wlroots (sway and many others).

it is the same in all compositors. this is seemingly a problem with the EGL library being present. when it’s not there, the GPU suspends. but also, there’s no display output for the nvidia, then.

without updating Plasma (KDE) compositor, I updated kernel from 5.18.8 to 5.18.12 or newer, and this changed how the hotplug worked.

the new kernel would suspend the GPU if I disconnect the HDMI cable from the laptop at runtime. in the earlier kernel, I had to restart the display manager if I wanted to suspend or resume the GPU power state. However, the system wouldn’t recognise the HDMI output if I started up with the cable unplugged.

with Plasma’s latest 5.25.4 version updates on top of kernel 5.19.0, I can start without an HDMI cable plugged in, and the Displays widget in KDE allows to enable it and extend/mirror the display.

the power savings of being able to suspend the GPU are pretty substantial.