Bug 421135

Summary: Flickering Issue with Blur enabled
Product: [Plasma] kwin Reporter: Matt <mattyhoffman7>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dashonwwIII, dpbasti, d_debnath, emanuelxoda, gregorystarr00, imanol, kde, korialo001, master.homer, nate, postix, sbutcher+bugs, solerman, vityas_official, vlad.zahorodnii
Priority: NOR    
Version: 5.18.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=445109
https://bugs.kde.org/show_bug.cgi?id=451179
https://bugs.kde.org/show_bug.cgi?id=432286
Latest Commit: Version Fixed In: 5.24.4
Sentry Crash Report:
Attachments: Screenshot of dark object flickering on application launcher
Patch to fix window flickering
Konsole flickering badly when blur is enabled
screenshot of menu flickering
animaton sceeenshot

Description Matt 2020-05-07 06:56:09 UTC
Created attachment 128213 [details]
Screenshot of dark object flickering on application launcher

SUMMARY
Geometric objects occasionally flicker on transparent UI elements such as window decorations, widget popups (calendar, clipboard, sound, etc.) application launchers, konsole and others.

Have noticed this using default Breeze themes but is more noticeable with the Breeze Krystal Light theme enabled as that adds more transparency than usual. Has happened to me on Arch, Manjaro, Debian and Kubuntu all on different machines using Intel or NVIDIA graphics (the latter of which on the proprietary driver).

I am unsure how to reproduce this consistently, but I have noticed it happen over windows such as VSCode (seen in the screenshot), Firefox, Dolphin and Discord so am unsure as to whether a specific application triggers it.

STEPS TO REPRODUCE
1. Open an application
2. Open a transparent menu on top of it
3. See if flickering occurs

OBSERVED RESULT
Dark geometric objects occasionally flicker (not often, it's quite rare but as seen in the screenshot it does happen)

EXPECTED RESULT
Consistent blur with no dark flickering objects.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Could reproduce on OpenGL 3.1, 2.0 but not on XRender. Only happens when Blur is enabled.
Comment 1 postix 2022-02-15 18:59:25 UTC
*** Bug 426530 has been marked as a duplicate of this bug. ***
Comment 2 postix 2022-02-15 18:59:54 UTC
I have seen this as well under X11 in case of Konsole under openSUSE TW and Fedora 35.
Comment 3 Emanuele Constantini 2022-03-16 12:36:02 UTC
I can confirm it's still happening in KDE plasma 5.24.2
Here's a video about it.
https://youtu.be/SJgooe5UHbM

I didn't had anything opened in other workspaces at the time. But those flickering objects would show behind any application using blurred content in x11 and Wayland.
Comment 4 Mathias Tillman 2022-03-17 10:12:01 UTC
So I've been experiencing this myself lately, but I believe the original bug is actually a separate issue, it just happens to have the same or similar results.
I've done some testing myself, and it seems to have been introduced in v5.24.2. Running a bisect the faulty commit looks to be 00a8de6c011954f379fe6f0542bdc9c502de45f3 (https://invent.kde.org/plasma/kwin/-/commit/00a8de6c011954f379fe6f0542bdc9c502de45f3).
I'm not sure why this would cause flickering though.
Comment 5 Mathias Tillman 2022-03-17 10:54:45 UTC
Created attachment 147548 [details]
Patch to fix window flickering
Comment 6 David Edmundson 2022-03-17 16:13:21 UTC
looks sane. Feel free to merge.
Comment 7 David Edmundson 2022-03-17 22:20:03 UTC
Git commit 140c2fb20efa547cda1ff74880a7cdbcab8b5943 by David Edmundson, on behalf of Mathias Tillman.
Committed on 17/03/2022 at 22:19.
Pushed by davidedmundson into branch 'master'.

effects/blur: Fix window flickering when the clip intersected with the current blur region.

This fixes a bug introduced in https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no longer check if it should redraw the whole region unless the data clip intersected. This would lead to flickering in certain cases

M  +7    -6    src/effects/blur/blur.cpp

https://invent.kde.org/plasma/kwin/commit/140c2fb20efa547cda1ff74880a7cdbcab8b5943
Comment 8 Matt 2022-03-18 01:21:39 UTC
(In reply to David Edmundson from comment #7)
> Git commit 140c2fb20efa547cda1ff74880a7cdbcab8b5943 by David Edmundson, on
> behalf of Mathias Tillman.
> Committed on 17/03/2022 at 22:19.
> Pushed by davidedmundson into branch 'master'.
> 
> effects/blur: Fix window flickering when the clip intersected with the
> current blur region.
> 
> This fixes a bug introduced in
> https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no
> longer check if it should redraw the whole region unless the data clip
> intersected. This would lead to flickering in certain cases
> 
> M  +7    -6    src/effects/blur/blur.cpp
> 
> https://invent.kde.org/plasma/kwin/commit/
> 140c2fb20efa547cda1ff74880a7cdbcab8b5943

Wondering if this bug should really be resolved as fixed?
Matthias says this is a fix for something introduced in 5.24, but the issue that was reported has been around since at least 5.18.
Comment 9 Vlad Zahorodnii 2022-03-18 08:46:38 UTC
Git commit 5186f411885b8d8e5bcc177ef888e63277a515ba by Vlad Zahorodnii, on behalf of Mathias Tillman.
Committed on 18/03/2022 at 08:46.
Pushed by vladz into branch 'Plasma/5.24'.

effects/blur: Fix window flickering when the clip intersected with the current blur region.

This fixes a bug introduced in https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no longer check if it should redraw the whole region unless the data clip intersected. This would lead to flickering in certain cases


(cherry picked from commit 140c2fb20efa547cda1ff74880a7cdbcab8b5943)

M  +7    -6    src/effects/blur/blur.cpp

https://invent.kde.org/plasma/kwin/commit/5186f411885b8d8e5bcc177ef888e63277a515ba
Comment 10 Mathias Tillman 2022-03-18 13:36:23 UTC
(In reply to Matt from comment #8)
> (In reply to David Edmundson from comment #7)
> > Git commit 140c2fb20efa547cda1ff74880a7cdbcab8b5943 by David Edmundson, on
> > behalf of Mathias Tillman.
> > Committed on 17/03/2022 at 22:19.
> > Pushed by davidedmundson into branch 'master'.
> > 
> > effects/blur: Fix window flickering when the clip intersected with the
> > current blur region.
> > 
> > This fixes a bug introduced in
> > https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no
> > longer check if it should redraw the whole region unless the data clip
> > intersected. This would lead to flickering in certain cases
> > 
> > M  +7    -6    src/effects/blur/blur.cpp
> > 
> > https://invent.kde.org/plasma/kwin/commit/
> > 140c2fb20efa547cda1ff74880a7cdbcab8b5943
> 
> Wondering if this bug should really be resolved as fixed?
> Matthias says this is a fix for something introduced in 5.24, but the issue
> that was reported has been around since at least 5.18.

Agreed, it probably shouldn't be marked as fixed. In hindsight I should have opened a separate issue, but since I wasn't sure of what the actual issue was, and it basically matched the flickering of the original issue, I decided to post my findings here.
Perhaps this latest conversation should be split into a separate issue (that would be marked as resolved) for archiving purposes?
Comment 11 David Edmundson 2022-03-18 13:49:36 UTC
Technically yes. In practice, bugzilla always gets messy with multiple bugs with similar symptoms.
The first bug doesn't contain enough information to be actionable and is a super old release. I would just leave it, if issues still exist someone will file a new bug.
Comment 12 Matt 2022-03-18 13:52:21 UTC
(In reply to David Edmundson from comment #11)
> Technically yes. In practice, bugzilla always gets messy with multiple bugs
> with similar symptoms.
> The first bug doesn't contain enough information to be actionable and is a
> super old release. I would just leave it, if issues still exist someone will
> file a new bug.

Hmm well I've still been experiencing it  from time to time on all versions up to and including 5.24. Doing a bit of digging there are a few other bug reports for this same issue, however this one seems to be the oldest report. Not sure what other info I'd need to make it actionable, unfortunately it seems random and hard to reproduce consistently.
Comment 13 Matt 2022-05-16 13:58:37 UTC
Hey guys, reopening this one since it still happens to me on 5.24.5, supposedly after the fix dropped. As was stated earlier in this thread I believe the patch was for a different but related issue, so this one isn't fully solved yet.
Comment 14 Solerman Kaplon 2022-09-29 14:16:16 UTC
I'm experiencing this while dragging a konsole window with blurred background on 5.24.6, 2 screens (laptop with one edp and another hdmi), 
extract from qdbus org.kde.KWin /KWin supportInformation :

>Compositing
>===========
>Compositing is active
>Compositing Type: OpenGL
>OpenGL vendor string: Intel
>OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
>OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.0.5
>OpenGL platform interface: GLX
>OpenGL shading language version string: 4.60
>Driver: Intel
>GPU class: Kaby Lake
>OpenGL version: 4.6
>GLSL version: 4.60
>Mesa version: 22.0.5
>X server version: 1.21.1
>Linux kernel version: 5.15
>Direct rendering: Requires strict binding: yes
>GLSL shaders:  yes
>Texture NPOT support:  yes
>Virtual Machine:  no
>OpenGL 2 Shaders are used
Comment 15 Victor Prudniy 2022-10-07 23:46:42 UTC
I have 2 same model displays and this bug happens only when konsole placed on first primary screen.
Comment 16 Simon B 2022-10-10 09:23:00 UTC
Created attachment 152683 [details]
Konsole flickering badly when blur is enabled

Still happening for me on 5.24.6
Comment 17 D. Debnath 2022-12-15 17:06:33 UTC
Can confirm this on Plasma 5.26.4 (Arch Linux) when using blur in Konsole. Both in Xorg as well as Wayland.

Operating System: Arch Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400 CPU @ 2.90GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 18 Korialo 2022-12-25 10:47:27 UTC
Same issue on my device.
OS: Manjaro Linux x86_64 
Kernel: 5.15.85-1-MANJARO
DE: Plasma 5.26.4
WM: KWin
WM Theme: Fluent-round 
Theme: Breath Light [Plasma], Fluent-round-Dark [GTK2/3] 
Icons: Fluent-dark [Plasma], Fluent-dark [GTK2/3] 
CPU: Intel i7-10870H
GPU: NVIDIA GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 
GPU: Intel CometLake-H GT2 [UHD Graphics]
Comment 19 Imanol Barba 2023-02-20 02:17:27 UTC
Still happening on Debian testing with:

- KDE Plasma 5.26.90
- KF 5.102.0
- Qt 5.15.8
- Kernel: 6.1.0-3
- Graphics: AMD Radeon VII (amdgpu)
- Display Server: Wayland (also happens on X11)

Happy to test patches, submit logs, etc
Comment 20 Sebastian Turzański 2023-08-15 06:09:51 UTC
I may have similar issue but instead of blurry flicker I get partly invisible items, for example when I right click on a desktop an I get the desktop context menu.
But important - I only get it when I have a secondary display connected and set on the left of main and current display ?!

My setup - latest plasma 5.27.7
Nvidia
Wayland

See attachment with part of the menu invisible and a border kind of visible
Comment 21 Sebastian Turzański 2023-08-15 06:10:50 UTC
Created attachment 160972 [details]
screenshot of menu flickering
Comment 22 Sebastian Turzański 2023-08-15 06:28:08 UTC
Created attachment 160973 [details]
animaton sceeenshot
Comment 23 Vlad Zahorodnii 2023-08-15 07:03:46 UTC

*** This bug has been marked as a duplicate of bug 455526 ***
Comment 24 Imanol Barba 2023-08-15 11:22:28 UTC
I am able to reproduce the issue with a single monitor on a Radeon VII (amdgpu driver)