Bug 475520 - KDE on Wayland only powers the first connected monitor on a multi-monitor dock
Summary: KDE on Wayland only powers the first connected monitor on a multi-monitor dock
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-12 15:14 UTC by Willow
Modified: 2024-01-24 23:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Dumps from drm_info (16.52 KB, application/gzip)
2023-10-12 17:17 UTC, Willow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willow 2023-10-12 15:14:40 UTC
SUMMARY
KDE on Wayland only powers one monitor per display port used despite KDE showing all monitors in system settings and screenshots/screencaptures showing all connected monitors. All monitors are enabled and show content prior to login. After login, it is always the same external monitor that powers on - the first one in the list of monitors. This is a regression from X11 and a hard blocker for my daily use.

STEPS TO REPRODUCE
1. Connect multiple monitors to an external laptop dock.
2. Connect the dock to the laptop.
3. Login to a KDE Wayland session.

OBSERVED RESULT
Only the first monitor is powered up and displays content.

EXPECTED RESULT
All monitors are powered up and display content.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.5-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 14.9 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 20T8001HUS
System Version: ThinkPad E15 Gen 2

ADDITIONAL INFORMATION
I have verified this to be a KDE issue by validating all monitors are powered up in a Gnome Wayland session. I have also verified this behavior on both my normal Arch install and a separate Fedora install on the same laptop hardware. Finally, I verified this to be different from bug 448220 due to the previously mentioned consistency, that neither install has the xf86-video-amdgpu package installed, and that the behavior is unchanged regardless of if the package is installed or not.
If one of the external monitors is connected to the dock and the other the laptop's HDMI port, both power on as expected and respond perfectly normally. It is only when both are connected through the same port that the issue shows.
Unplugging the first listed monitor from the dock causes the second monitor to power up and display content, however plugging the first listed monitor back into the dock causes the second monitor to power back down.
It is entirely possible this is a driver or kernel issue that I haven't been able to nail down; I will gladly take any instruction or assistance with locating and fixing the issue.
Comment 1 Zamundaaa 2023-10-12 16:58:29 UTC
Please attach the output of drm_info from your laptop, while the dock is connected
Comment 2 Willow 2023-10-12 17:17:46 UTC
Created attachment 162250 [details]
Dumps from drm_info
Comment 3 Willow 2023-10-12 17:18:50 UTC
(In reply to Zamundaaa from comment #1)
> Please attach the output of drm_info from your laptop, while the dock is
> connected

Sure thing, I've gotten four dumps in that tar.gz file - X11 and Wayland with and without the dock.
Comment 4 Zamundaaa 2024-01-23 00:44:32 UTC
It looks like KWin's doing everything correctly. Does putting
> KWIN_DRM_PREFER_COLOR_DEPTH=24
into /etc/environment and rebooting fix the problem?
Comment 5 Willow 2024-01-24 16:54:18 UTC
(In reply to Zamundaaa from comment #4)
> It looks like KWin's doing everything correctly. Does putting
> > KWIN_DRM_PREFER_COLOR_DEPTH=24
> into /etc/environment and rebooting fix the problem?

That appears to have resolved it; all three monitors are online through the dock. While two of the monitors were changed due to a workplace upgrade, the third monitor remains one of the problematic three and is now no longer exhibiting the same behavior.
Comment 6 Zamundaaa 2024-01-24 23:00:48 UTC
Great. Please confirm that you're experiencing https://gitlab.freedesktop.org/drm/amd/-/issues/2598 on that issue tracker as well, so that hopefully someone takes care of this problem on the kernel side and this workaround isn't necessary anymore