Bug 470383 - Displays connected through USB-C Dock give black display until 24-bit color mode is forced
Summary: Displays connected through USB-C Dock give black display until 24-bit color m...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-29 01:32 UTC by Shawn W Dunn
Modified: 2023-08-16 03:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn W Dunn 2023-05-29 01:32:50 UTC
Using a Lenovo Thinkpad T16 AMD, and Lenovo Universal USB-C Dock, a plasma-wayland session gives me no output to the displays.  kscreen *sees* the displays there, but the displays remain blank.   This behavior is the same whether I have the dock and displays plugged in while booting, or if I plug the dock into an already booted plasma-wayland session.

STEPS TO REPRODUCE
1. Plug displays via displayport cables into USB-C Dock 
2. Plug Dock into Laptop


OBSERVED RESULT
No Output to dock connected displays, but all other dock functions work (audio passthrough, mouse/keyboard, etc), Kscreen reports the displays are there and enabled, but displays remain blank.

EXPECTED RESULT
Output of Graphical desktop to dock attached displays

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.5.19

ADDITIONAL INFORMATION

This behavior is the same for me on both openSUSE Tumbleweed, and Fedora 38, so it doesn't appear to be a distro specific issue.   Not that it matters to wayland, but using plasma-x11 also is problematic.   The Dock works *fine* and as expected in Gnome 44, for both X11 and Wayland sessions, on both openSUSE and Fedora
Comment 1 Shawn W Dunn 2023-05-29 19:39:48 UTC
Setting KWIN_DRM_PREFER_COLOR_DEPTH=24 in `/etc/profile` fixes this issue.

Per suggestion from the user that helped me in the Plasma matrix channel, I have filed a bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2598
Comment 2 Nate Graham 2023-05-31 13:54:27 UTC
Sounds like a driver bug. Not sure how we could fix this ourselves in KWin. Would it be possible to detect that there's no output and try to switch to 24-bit mode? If not, we probably have to wait for the driver bug to be fixed.
Comment 3 Shawn W Dunn 2023-05-31 14:24:31 UTC
(In reply to Nate Graham from comment #2)
> Sounds like a driver bug. Not sure how we could fix this ourselves in KWin.
> Would it be possible to detect that there's no output and try to switch to
> 24-bit mode? If not, we probably have to wait for the driver bug to be fixed.

*shrug*  I wasn't sure where the bug actually was, or if this is something that can be "fixed" via kwin or not.   It appears that the proximal cause is in the amdgpu drm driver.