Black/Blurred screen on Plasma/KWin 6.0 Beta 1 + Wayland + AMD eGPU

I switched[1] to KDE 6.0 Beta 1 recently on a AMD laptop, on Wayland session the screen attached to external GPU cannot display properly on default, it cannot show any part of a window if I drag one to it from the internal display (internal display works normally), only random blurred/fuzzy screen or black screen.

GPU setup:

➜  ~ lspci | grep VGA
37:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon VII] (rev c1)
63:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt (rev d8)

The eGPU Radeon VII is /dev/dri/card0 and the iGPU Radeon 680M (of a Ryzen 6800HS) is /dev/dri/card1.

Driver is the one in upstream kernel, tried kernel version 6.6.7-1-liquorix-amd64 and 6.5.0-1010-oem (of Ubuntu 22.04)

Other behaviors noticed:

  • Mouse cursor can be displayed properly on the external screen (which seems strange?)
  • Spectacle can capture all desktops correctly.
  • No kernel/driver panic or warning in kernel message
  • this phenomenon does not appear on Xorg session
  • this phenomenon does not appear on KDE Plasma/KWin 5.27.x
  • In accordance with this post ( Plasma breaks on Wayland with NVIDIA proprietary drivers eGPU ), the default setup seems equivalent to export KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0, and swapping them fixes it.

Current workaround: Use eGPU to render: add

export KWIN_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1

to $KDE_PREFIX/usr/lib/x86_64-linux-gnu/libexec/plasma-dev-prefix.sh.

But the default case is strange, is there anything wrong with my setup, or should it considered a bug of KWin or Plasma or driver … ? How can I help to debug this ?

[1]: I choose to switch to KDE 6.0 from 5.27.10 because of a issue similar to Low fps and high CPU usage on external monitor connected to NVIDIA when default GPU is Intel

Vega doesn’t support drm modifiers, so it’s relatively likely this is a KWin bug. Please create a bug report for this problem

OK, created bug report: https://bugs.kde.org/show_bug.cgi?id=478921