Bug 421135 - Flickering Issue with Blur enabled
Summary: Flickering Issue with Blur enabled
Status: REOPENED
Alias: None
Product: kwin
Classification: Unclassified
Component: compositing (show other bugs)
Version: 5.18.5
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 426530 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-07 06:56 UTC by Matt
Modified: 2022-05-16 13:58 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.4


Attachments
Screenshot of dark object flickering on application launcher (216.54 KB, image/png)
2020-05-07 06:56 UTC, Matt
Details
Patch to fix window flickering (1.46 KB, patch)
2022-03-17 10:54 UTC, Mathias Tillman
Details

Note You need to log in before you can comment on or make changes to this bug.
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.