Hello everyone,
I’m looking for a practical solution to the following problem:
My setup is a laptop with both a dedicated GPU (NVIDIA) and an integrated GPU (AMD).
switcherooctl list
Device: 0
Name: NVIDIA Corporation AD106M [GeForce RTX™ 4070 Max-Q / Mobile]
Default: no
Discrete: yes
Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_LOADER_DRIVERS_SELECT=*nvidia*
Device: 1
Name: Advanced Micro Devices, Inc. [AMD/ATI] Strix [Radeon™ 880M / 890M]
Default: no
Discrete: no
Environment: DRI_PRIME=pci-0000_66_00_0 VK_LOADER_DRIVERS_SELECT=*radeon*
Under Wayland, when an external monitor is connected via HDMI cable (directly to the NVIDIA GPU, I assume), two different scenarios occur, both leading to a system crash (I cannot switch to TTY; only a hard reset works):
-
The system runs, but the moment I move my mouse to the external monitor, the system freezes.
-
After a reboot, the system freezes as soon as Wayland starts loading.
There are no such problems when using X11 instead.
I found a temporary solution here:
However, this is not practical for everyday laptop use. When I set
export KWIN_DRM_DEVICES="/dev/dri/card1:/dev/dri/card0"
in /etc/profile.d/kwin_drm.sh (where card1 is the NVIDIA GPU and card0 is the AMD one), Wayland works fine; but now GPU switching no longer functions. Previously, with all external cables unplugged, the AMD GPU would take over from the NVIDIA one, which is much more power‑efficient than the RTX 4070. That behavior is now lost.
My question: is there a way to handle this situation properly? Ideally, I would like to restore the original Wayland behavior that worked out of the box without any hotfixes. Alternatively, are there better workarounds that allow me to simply unplug the HDMI cable and have the AMD GPU take over dynamic switching again?
Thanks in advance,
Cheers