KWin Wayland main thread hangs ~12s on AMD hybrid GPU (ROG G14) — KWin trying to open D3cold dGPU


Setup

  • ASUS ROG Zephyrus G14 GA402RK, Ryzen 7 6800HS + RX 6800S
  • KDE Plasma 6.5.6, KWin Wayland, kernel 6.18.18-1-MANJARO
  • supergfxd in Hybrid mode

Problem

Random ~12 second desktop freezes. Any app connecting to the Wayland socket also hangs during this time. KWin logs show:

kwin_wayland: Failed to open drm device /dev/dri/card1
kwin_wayland: The main thread was hanging temporarily!

Root cause: In Hybrid mode the dGPU suspends to D3cold (/sys/bus/pci/devices/0000:03:00.0/power_state = D3cold). KWin periodically tries to open /dev/dri/card1, which triggers a PCIe power-on sequence that blocks KWin’s main thread for ~12 seconds.

Reproduced consistently with time vulkaninfo --summary — 12s with Wayland, 0.07s without.


Workaround

Restrict KWin to the iGPU only:

set KWIN_DRM_DEVICES=/dev/dri/card2 in ~/.config/environment.d/kwin-gpu.conf

After relogin: vulkaninfo runs in ~0.08s (dGPU active) or ~2.3s (dGPU waking from D3cold — expected, not a hang). No more “hanging temporarily” in KWin logs. Games and apps can still use the dGPU
normally.


Question

Is this a KWin bug? It seems like KWin shouldn’t be blocking its main thread while trying to open a D3cold device. In Hybrid mode it has no reason to open the dGPU at all — compositing happens entirely on the iGPU. Has anyone else hit this on an AMD-only hybrid setup with supergfxd?

Most likely it is. Notice though that Plasma’s current version is 6.6.3 so i presume they won’t accept a bug report for 6.5.6.

1 Like