Bug 500172

Summary: Setting a colour profile with Wayland seems broken on TeraScale-based GPUs
Product: [Plasma] kwin Reporter: Wedge009 <wedge009>
Component: colour-managementAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.2.5   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Display corruption with ICC set on Wayland
DRM Info on TeraScale

Description Wedge009 2025-02-16 09:52:05 UTC
Created attachment 178428 [details]
Display corruption with ICC set on Wayland

SUMMARY
I tried looking for similar issues - the closest I got was https://bugs.kde.org/show_bug.cgi?id=477017, but I don't think it's related.

Most of my KDE systems are Kubuntu LTS based, and 24.04 is still using Plasma 5. With Kubuntu 24.10, Wayland is set as default (https://kubuntu.org/news/kubuntu-24-10-oracular-oriole-released/). I decided to give it a try: for the most part, things are looking good - the last time I tried KDE on Wayland (probably many years ago), it was an unusable, broken mess. The last thing I have outstanding is setting colour profiles.

With Plasma 5 on X11, I use colord-kde, which I understand wraps around GNOME's colour manager. This has worked fine for me. However, attempting to use the built-in colour management with Plasma 6 on Wayland, I get severe corruption on old TeraScale-based GPUs - an example is attached.

(My colour profiles are generated using DisplayCAL-Py3.) I have colour profiles working okay with Wayland on one system that has GCN-based graphics. But two others systems, one an AMD APU, the other a discrete TeraScale-based Radeon HD 6870 (Barts XT), I get screen corruption when attempting to use colour profiles with Wayland.

I accept TeraScale is rather old so I suppose falling back to X11 is acceptable. But I thought to report this just in case someone knows what's going on with the apparent pattern on this older architecture. I'm just using the standard mesa-based amdgpu graphics.

STEPS TO REPRODUCE
1. Start a Plasma Wayland session.
2. Right-click on the screen -> Configure Display Settings
3. Set an ICC colour profile.

OBSERVED RESULT
Display becomes unusable until the configuration reverts to no profile set.

EXPECTED RESULT
Display is colour corrected as with doing the same on a GCN-based GPU.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 24.10, kernel 6.11.0-14.
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.2
Qt Version: 6.6.2
Comment 1 Bug Janitor Service 2025-02-16 10:33:37 UTC
Thank you for the bug report!

However Plasma 6.1.5 is no longer eligible for support or maintenance from KDE; supported versions are 5.27. (LTS), and 6.2 (non-LTS) or newer. Please upgrade to a supported version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.

If you need support for Plasma 6.1.5, please contact your distribution, who bears the responsibility of providing support for older releases that are no longer supported by KDE.

If you can reproduce the issue after upgrading to a supported version, feel free to re-open this bug report.
Comment 2 Wedge009 2025-02-16 21:35:58 UTC
I was able to replicate the issue on a live session of KDE Neon 20250202-0745 with Plasma 6.2.5, Frameworks 6.10.0, Qt 6.8.1, kernel 6.8.0-52.

I just started the live session and repeated the steps in the original report -> garbled/corrupted display.
Comment 3 Zamundaaa 2025-02-17 17:25:15 UTC
Please attach the output of drm_info.

If the driver exposes a gamma lut, Plasma 6.3 might work around the problem. The actual issue is most likely that the driver support for 16 bit floating point buffer formats isn't well tested - we've hit several driver bugs with them on newer cards.
Comment 4 Wedge009 2025-02-18 05:40:45 UTC
Created attachment 178504 [details]
DRM Info on TeraScale
Comment 5 Wedge009 2025-02-18 05:43:57 UTC
Thanks for the response.

I contrast this with the GCN system that has colour profile working and there are entries under Properties for the CRTCs - including 'GAMMA_LUT' and 'GAMMA_LUT_SIZE'. So maybe the radeon driver (contrast amdgpu) doesn't have what you were suggesting regarding gamma LUTs?
Comment 6 Wedge009 2025-02-23 03:28:49 UTC
I checked the DRM Info for a few of my GPUs, both integrated and discrete, and it seems to be a running pattern that the newer amdgpu driver includes GAMMA_LUT entries while the older radeon drive does not.

I don't have any NV GPUs to check since the last one died a long while ago. I also don't use Intel GPUs.
Comment 7 Zamundaaa 2025-03-05 16:37:20 UTC
Yeah, no hardware acceleration for color operations there.

Please test Plasma 6.3 anyways though: In addition to more aggressively using hardware acceleration, we also changed some things for how the shadow buffer works - as long as you leave the color accuracy as "prefer efficiency", it'll try to use only 10 bits per color buffers rather than 16, which should be much better tested on the driver side.
Comment 8 Wedge009 2025-03-05 22:04:31 UTC
I was intending to test Plasma 6.3 but I haven't seen any update to the KDE Neon image since February, and when I tested that one previously it was Plasma 6.2.
Comment 9 Bug Janitor Service 2025-03-20 03:47:01 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Wedge009 2025-03-20 11:31:03 UTC
Updating status - I'm not aware of anything outstanding from my end.

I still intend to retest KDE Neon (for Plasma 6.3). I just noticed the User Edition has been updated, I'll test it when I get back home tomorrow.
Comment 11 Wedge009 2025-03-21 07:05:08 UTC
I just tested KDE Neon live session (neon-user-20250320-1319.iso) with Plasma 6.3.3 and setting an ICC profile seems to function on TeraScale GPU (ie it does the job of colour correction). It seems to be okay regardless of whether I set prefer efficiency or colour accuracy.

So it seems resolved for Plasma 6.3?
Comment 12 Wedge009 2025-04-18 06:36:31 UTC
I just updated to Kubuntu 25.04 with Plasma 6.3.4 and Plasma colour correction seems to be working fine on Wayland even with TeraScale-based GPUs, so I don't see any need to keep this open.