Bug 500477 - Random, minor graphical artifacting when enabling "Prefer color accuracy"
Summary: Random, minor graphical artifacting when enabling "Prefer color accuracy"
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (show other bugs)
Version: 6.3.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-20 17:27 UTC by Syboxez
Modified: 2025-03-06 02:49 UTC (History)
3 users (show)

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


Attachments
drm_info dump as requested (195.20 KB, text/plain)
2025-03-05 23:30 UTC, Syboxez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syboxez 2025-02-20 17:27:34 UTC
SUMMARY
For context, I was previously only getting this artifacting in full screen videos, but after the upgrade to 6.3.1, I noticed an option to enable 12bpc display output (Prefer color accuracy), which I then enabled. After enabling it, I'm noticing screen artifacting in the form of glitchy horizontal lines spanning approximately the length of the default taskbar in HiDPI mode (200%) on my 4K display. The artifacting is random, and I'm not sure how to reliably reproduce it. My display is connected directly to the GPU that is doing the rendering (confirmed with wayland-info and drm_info).

For reference, I have an ASUS FA617NT with an iGPU (680M) that is unused and my dGPU (RX 7700S - Navi 33) that is being used. I am connecting an external display directly to my dGPU and I disabled all other displays.

STEPS TO REPRODUCE
1. Enable "Prefer color accuracy"
2. Use various applications (I'm not sure of anything specific that causes this to occur)

OBSERVED RESULT
Observe random screen artifacting in the form of glitchy horizontal bars spanning the entire length of the screen for one frame at a time

EXPECTED RESULT
No artifacting

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.15-lqx1-1-lqx-15khz (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7735HS with Radeon Graphics
Memory: 14.9 GiB of RAM
Graphics Processor 1: AMD Radeon RX 7700S
Graphics Processor 2: AMD Radeon 680M

ADDITIONAL INFORMATION
I was unable to reproduce using this bug's steps as reference: https://bugs.kde.org/show_bug.cgi?id=499935 so I don't think it's a duplicate of that.

According to zamundaaa on Matrix, KMS offloading isn't used when "Prefer color accuracy" is enabled, which may be relevant information for this issue.

From my limited testing, I haven't seen artifacting when "Prefer efficiency" is enabled.
Comment 1 Syboxez 2025-02-20 17:29:40 UTC
My kernel is a Liquorix kernel with these patches enabled: https://github.com/D0023R/linux_kernel_15khz

I don't believe this is relevant to this issue, but I figured I'd include that info anyway, especially since the latter patches impact the display code.
Comment 2 Syboxez 2025-02-20 17:31:16 UTC
https://bugs.kde.org/show_bug.cgi?id=480799#c23

This comment may be relevant to this issue, as this person has identical hardware to me.
Comment 3 John 2025-02-21 11:15:00 UTC
I have them with the "prefer color accuracy" configuration, on Debian 13 (Triexie), unstable repository, with:

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.7.2
Kernel Version: 6.12.15-amd64 (64-bit)
Graphics Platform: Wayland


HARDWARE SPECIFICATIONS
Hardware: Laptop Dell Inspiron 5770 (17" 1080p@60Hz screen)
CPU: Intel® Core™ i5-8250U CPU @ 1.60GHz
GPU 1: Mesa Intel® UHD Graphics 620 (main, Vulkan capable)
GPU 2: AMD Radeon R5 M465 Series
RAM: 8 GiB (7.7 GiB usable)

In my case they are really small / minor which are happening only when I'm opening some widget, like:
-Kickoff widget
-Audio widget
-Network widget
-Date / calendar widget
They manifest as showing some colors on the background (even if they open in front of something else, lets say Firefox) and showing jagged edges of a triangle, like stairs of big black squares.
Looks similar with how JPEG progressive photos are opening on the web on a slow connection, except that here they are on the diagonals.
I can even make a printscreen of them if I try long enough to capture it, if it's needed.
For the moment I guess my integrated GPU is just too weak for it and I reverted back to the default.
I'll try it again when Plasma 6.3.1 arrives on my distro.
Comment 4 John 2025-02-24 15:31:24 UTC
I think this could be a duplicate of:
https://bugs.kde.org/show_bug.cgi?id=499935
Comment 5 Zamundaaa 2025-02-24 15:51:07 UTC
It might be related, but the symptoms sound different
Comment 6 Syboxez 2025-02-26 00:21:33 UTC
I was able to induce a situation that causes rapid and severe artifacting only when "Prefer color accuracy" is enabled.

To reproduce, I played a video in VLC and moved the mouse around.

I recorded a video: https://files.catbox.moe/94tw2f.mp4
Note how the artifacting extends past the window through the whole screen.
Comment 7 Syboxez 2025-02-26 00:22:30 UTC
(In reply to John from comment #4)
> I think this could be a duplicate of:
> https://bugs.kde.org/show_bug.cgi?id=499935

I was actually not able to reproduce this issue, as I have mentioned in the OP. Also the symptoms are different, as you can see in my recently uploaded video in my last comment.
Comment 8 Zamundaaa 2025-03-05 16:41:04 UTC
There's a chance that this is caused by the buffer format, but it could also be the high bit depth sent to the screen. No other desktop, or any software really has used either before on Linux...

Please try setting https://invent.kde.org/plasma/kwin/-/wikis/Environment-Variables#kwin_drm_prefer_color_depth to 30, and if that doesn't help, to 24. If that removes the glitches, then we know it's the bit depth sent to the screen.
Comment 9 Syboxez 2025-03-05 18:16:42 UTC
(In reply to Zamundaaa from comment #8)
> There's a chance that this is caused by the buffer format, but it could also
> be the high bit depth sent to the screen. No other desktop, or any software
> really has used either before on Linux...
> 
> Please try setting
> https://invent.kde.org/plasma/kwin/-/wikis/Environment-
> Variables#kwin_drm_prefer_color_depth to 30, and if that doesn't help, to
> 24. If that removes the glitches, then we know it's the bit depth sent to
> the screen.

I tried both color depth values of 30 and 24, and I still get the same issue, specifically reproducing the issue with VLC as shown in the video. My display is reporting the correct values of 10bpc and 8bpc respectively when I set that env var, so I know it's working.

With Prefer Efficiency enabled, there are no issues, but the moment I hit apply while setting Prefer Color Accuracy, the artifacting starts, and then it stops again when I set Prefer Efficiency.
Comment 10 Zamundaaa 2025-03-05 20:07:52 UTC
Ok, three more things to check:
1. does forcing a high power profile on the GPU help?
2. what's the buffer format that's getting used with "prefer color accuracy"? You can check with drm_info (or just attach its output here)
3. if you use the integrated GPU, do you get the same glitches? 

At this point I'm pretty sure it's a driver bug, but if we can narrow it down that could help making it actionable.
Comment 11 Syboxez 2025-03-05 23:30:22 UTC
Created attachment 179160 [details]
drm_info dump as requested

(In reply to Zamundaaa from comment #10)
> Ok, three more things to check:
> 1. does forcing a high power profile on the GPU help?
> 2. what's the buffer format that's getting used with "prefer color
> accuracy"? You can check with drm_info (or just attach its output here)
> 3. if you use the integrated GPU, do you get the same glitches? 
> 
> At this point I'm pretty sure it's a driver bug, but if we can narrow it
> down that could help making it actionable.

I attached a dump of drm_info's output. My iGPU is fine. While the display connected to my dGPU has artifacts, the display connected to my iGPU has no artifacts.
Comment 12 Syboxez 2025-03-05 23:35:17 UTC
Interestingly enough, when I enable another display on my dGPU, the artifacting completely stops. The artifacting comes back when I disable the display.
Comment 13 Syboxez 2025-03-05 23:38:37 UTC
Another interesting discovery. The artifacting only happens when the only display is outputting 3840x2160 @ 120Hz. When outputting 100Hz or 1080p@120Hz or 3840x240@60Hz on my other display, there is no artifacting. When I switch back to 3840x2160@120Hz, the artifacting comes back.
Comment 14 Syboxez 2025-03-05 23:42:50 UTC
If I use LACT to force "Performance Level" to "Highest Clocks", the artifacting at 3840x2160 goes away.
Comment 15 Zamundaaa 2025-03-06 00:19:31 UTC
Great, that makes it pretty certain then - the GPU isn't clocking high enough for the additional bandwidth requirement. Please report that at https://gitlab.freedesktop.org/drm/amd/-/issues
Comment 16 Syboxez 2025-03-06 02:49:09 UTC
(In reply to Zamundaaa from comment #15)
> Great, that makes it pretty certain then - the GPU isn't clocking high
> enough for the additional bandwidth requirement. Please report that at
> https://gitlab.freedesktop.org/drm/amd/-/issues

https://gitlab.freedesktop.org/drm/amd/-/issues/4019