Bug 480799 - Changing the kms gamma lut causes synchronization issues on some PCs
Summary: Changing the kms gamma lut causes synchronization issues on some PCs
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.2.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, regression
: 485058 487487 495246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-03 19:33 UTC by kocelfc
Modified: 2024-10-26 01:29 UTC (History)
13 users (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 kocelfc 2024-02-03 19:33:48 UTC
SUMMARY
Whenever I enable/disable night light i get very visible artifacts, this isn't reproducible in 5.27.10 or if I turn off one of the monitors.

Here is a video that shows the issue that I am having:
https://www.youtube.com/watch?v=on00Q2Vr0ko

STEPS TO REPRODUCE
1. Have two monitors plugged in
2. Enable/disable night light
3. Artifacts

OBSERVED RESULT

Artifacts when toggling the night light option

EXPECTED RESULT

No artifacts

SOFTWARE/OS VERSIONS

Arch Linux
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Graphics Platform: Wayland
GPU: AMD Radeon RX 6800
Mesa Version: 23.3.5
Monitors: AOC 24G2 and AOC 24G2SP
Comment 1 Doug 2024-02-05 05:22:28 UTC
I cannot reproduce, Nightlight is turning on and off smoothly and with no artifacts.

Operating System: KDE neon Testing Edition
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.1
Kernel Version: 6.5.0-15-generic (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: AMD Radeon Pro WX 3200 Series
Manufacturer: Dell Inc.
Product Name: Precision 7540
Comment 2 Nate Graham 2024-02-05 21:30:42 UTC
Same, works for me with my two screens both connected to an Intel HD620 iGPU.
Comment 3 kocelfc 2024-02-05 21:51:13 UTC
Could be a driver issue that is somehow getting exposed now. Also to note: it seems that it's only reproducible on Wayland. X11 is fine.
Comment 4 Zamundaaa 2024-02-05 23:02:21 UTC
Are you using an ICC profile or HDR? If not, does KWIN_DRM_FORCE_COLOR_MANAGEMENT=1 fix this?
Comment 5 kocelfc 2024-02-05 23:22:33 UTC
(In reply to Zamundaaa from comment #4)
> Are you using an ICC profile or HDR? If not, does
> KWIN_DRM_FORCE_COLOR_MANAGEMENT=1 fix this?

No ICC profiles or HDR. Setting the environment variable seems to make it a lot less reproducible, and I think I can only sometimes see artifacting in the "Night Light on/off" pop up when it appears, but the variable also makes the colors of the taskbar and the applets more intense if "Background Contrast" is enabled in Window Management > Desktop Effects. Haven't noticed if any other areas appear different.
Comment 6 Zamundaaa 2024-02-07 14:46:50 UTC
Do the glitches go away if you disable blur and/or background contrast effects?
Comment 7 kocelfc 2024-02-07 14:56:19 UTC
(In reply to Zamundaaa from comment #6)
> Do the glitches go away if you disable blur and/or background contrast
> effects?

Still there, I could make a bisect to maybe narrow it down to something. I've tried 5.91.0 and it's still artifacting there. Could you point me to an earlier commit which I can use as a starting point?
Comment 8 Zamundaaa 2024-02-08 16:18:55 UTC
You could try 5.90.0 first... If that doesn't work, you'd kind of have to bisect it down to 5.27.10. That would be painful though, to say the least.

One other thing you could try is an older kernel, and/or to force memory clocks of your GPU to the maximum with
>echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level
. amdgpu has been plagued by memory clock bugs lately, so it could just be caused by that
Comment 9 Zamundaaa 2024-03-20 16:49:14 UTC
Can you still reproduce this on Plasma 6.0.2?
Comment 10 kocelfc 2024-03-21 06:33:28 UTC
(In reply to Zamundaaa from comment #9)
> Can you still reproduce this on Plasma 6.0.2?

I can indeed.
Comment 11 Zamundaaa 2024-03-21 12:17:07 UTC
Even with KWIN_DRM_FORCE_COLOR_MANAGEMENT=1?
Comment 12 kocelfc 2024-03-23 13:00:24 UTC
(In reply to Zamundaaa from comment #11)
> Even with KWIN_DRM_FORCE_COLOR_MANAGEMENT=1?

Even with it. Forcing high memory clocks on the Graphics card is no help either.
Comment 13 Matt 2024-03-25 04:39:11 UTC
Can reproduce, went looking for this report since I've been seeing it here. Not reproducible on X11.
Might be a radeon issue?

Operating System: Artix Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-artix1-1 (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT
Manufacturer: EVGA Corp.
Product Name: X570 FTW WIFI
Comment 14 Zamundaaa 2024-04-05 14:50:51 UTC
*** Bug 485058 has been marked as a duplicate of this bug. ***
Comment 15 benjaminesims 2024-04-05 16:51:19 UTC
My bug was marked as a duplicate of this one, but to add, I also have multiple monitors, though I only see the issue when playing games.
Comment 16 kocelfc 2024-05-22 17:46:18 UTC
Can't seem to reproduce anymore with kernel 6.9.1. Can anyone else confirm it's gone for them too?
Comment 17 Nate Graham 2024-05-22 18:26:09 UTC
.
Comment 18 kocelfc 2024-05-22 19:59:46 UTC
(In reply to kocelfc from comment #16)
> Can't seem to reproduce anymore with kernel 6.9.1. Can anyone else confirm
> it's gone for them too?

Actually, it still appears when playing a fullscreen video, in games, and in the steam library.
Comment 19 benjaminesims 2024-05-23 01:53:38 UTC
I can also confirm that this bug still happens on kernel 6.9.1.
Comment 20 Paul Elliott 2024-05-24 16:22:10 UTC
*** Bug 487487 has been marked as a duplicate of this bug. ***
Comment 21 Bug Janitor Service 2024-06-08 03:46:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 22 benjaminesims 2024-06-08 03:49:20 UTC
Marking as retorted, as the bug still persists.
Comment 23 Jon Gardner 2024-06-26 14:21:31 UTC
I am also having a similar style of visual glitch. Although mine happens while interacting with various parts of the desktop environment.

I'm using an ASUS TUF book with a Ryzen 7 7735HS. It has a dual graphics setup between the integrated GPU 680M and a discrete RX 7700S.

I'm running Plasma 6.1.0 Let me know if you need more information.
Comment 24 Kirby 2024-07-04 07:15:37 UTC
glitch/bug still present in 6.1.1/wayland
Comment 25 Matt 2024-07-14 06:27:06 UTC
Looks like this is a kernel bug I swapped back to 6.6.36 and seems to go away for me. There's a couple of bug reports in drm right now:
https://gitlab.freedesktop.org/drm/amd/-/issues/3388
https://gitlab.freedesktop.org/drm/amd/-/issues/3264
Comment 26 Matt 2024-07-14 06:53:29 UTC
(In reply to Matt from comment #25)
> Looks like this is a kernel bug I swapped back to 6.6.36 and seems to go
> away for me. There's a couple of bug reports in drm right now:
> https://gitlab.freedesktop.org/drm/amd/-/issues/3388
> https://gitlab.freedesktop.org/drm/amd/-/issues/3264

nvm sorry everyone still happening on 6.6 and 6.1 but a lot less noticeable
Comment 27 Andrew Rembrandt 2024-10-18 13:38:01 UTC
Hi QA/devs,
After upgrading to 6.2.1 (Wayland, single screen), I experienced flickering and often a disappearing mouse, as described in: https://www.reddit.com/r/kde/comments/1g4ntqr/621_update_broke_cursor_behaviour/

I tried searching for the bug, but only found this one. Shall I also make a video recording and create a new bug?

(Kernel 6.11.4, Arch Linux, Intel/Alder Lake integrated graphics)
Comment 28 postix 2024-10-18 13:39:45 UTC
(In reply to Andrew Rembrandt from comment #27)
> Hi QA/devs,
> After upgrading to 6.2.1 (Wayland, single screen), I experienced flickering
> and often a disappearing mouse, as described in:
> https://www.reddit.com/r/kde/comments/1g4ntqr/
> 621_update_broke_cursor_behaviour/
> 
> I tried searching for the bug, but only found this one. Shall I also make a
> video recording and create a new bug?
> 
> (Kernel 6.11.4, Arch Linux, Intel/Alder Lake integrated graphics)

This is bug #494829 or #494959
Comment 29 Iyán Méndez Veiga 2024-10-19 20:36:17 UTC
I don't get a smooth transition anymore (it's like three discrete temperature steps now) when enabling/disabling night light on this system:

Operating System: Arch Linux 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 22 × Intel® Core™ Ultra 7 155H
Memory: 30.9 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Manufacturer: LENOVO
Product Name: 21KDS00600
System Version: ThinkPad X1 Carbon Gen 12
Comment 30 Zamundaaa 2024-10-23 12:36:40 UTC
(In reply to Iyán Méndez Veiga from comment #29)
> I don't get a smooth transition anymore (it's like three discrete
> temperature steps now) when enabling/disabling night light on this system:
That's a different problem from what this bug report is about, please make a separate bug report for that.
Comment 31 Zamundaaa 2024-10-24 15:07:51 UTC
*** Bug 495246 has been marked as a duplicate of this bug. ***
Comment 32 Zamundaaa 2024-10-24 15:18:25 UTC
The only possible causes I can see for this are that the kernel
1. presents a buffer before we're done rendering to it
2. tells us the pageflip is done while it's still presenting the buffer, and we end up rendering to it too early

1 is prevented by KWin never giving the kernel any buffer that's still being rendered to, but 2 is possible and would explain why not everyone experiences it - it depends very heavily on timing and GPU speed.
Comment 33 Zamundaaa 2024-10-26 01:29:49 UTC
*** Bug 495167 has been marked as a duplicate of this bug. ***