Bug 363500

Summary: Flickering and incompletely drawn textures
Product: [Plasma] kwin Reporter: Lastique <andysem>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: lukasz
Priority: NOR    
Version: 5.5.5   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Undrawn decorations screenshot
KWin support info
Video presenting the bug
KWin support info
Screencast showing opacity changes when opening windows
Screencast showing undrawn decorations

Description Lastique 2016-05-25 12:10:52 UTC
Sometimes I can see flickering or incompletely drawn textures around the desktop. For example, I once saw part of the Firefox window, which was opened on one monitor, flicker on the other monitor (which had no open windows, i.e. it flickered on the desktop). Another time window decorations were either flickering or not drawn at all for different applications. I took a screenshot of this case (attached). When I moved the mouse over the decoration, it starts to flicker more frequently, and if I move mouse over the decoration buttons, they are drawn in squares, with the rest of the decoration not drawn.

Reproducible: Sometimes

Steps to Reproduce:
I don't know a reliable way to reproduce this.



Kubuntu 16.04, x86_64. Nvidia driver 367.18. The flicker also happened with 364.19. OpenGL interface: GLX, rendering backend: OpenGL 3.1. Desktop theme: Breeze, window decorations: org.kde.oxygen.
Comment 1 Lastique 2016-05-25 12:15:17 UTC
Created attachment 99174 [details]
Undrawn decorations screenshot
Comment 2 Lastique 2016-05-25 12:17:20 UTC
I forgot to mention that I tried switching from Automatic refresh to Full screen repaints, it didn't help.
Comment 3 Thomas Lübking 2016-05-25 12:47:21 UTC
can you please attach the output of "qdbus org.kde.KWin /KWin supportInformation"
Comment 4 Lastique 2016-05-25 13:02:17 UTC
Created attachment 99178 [details]
KWin support info
Comment 5 Łukasz Żarnowiecki 2016-05-29 20:15:25 UTC
I think I hit the same bug, it happens very often after I exit from csgo game on Steam.
Comment 6 Łukasz Żarnowiecki 2016-05-29 20:19:37 UTC
Created attachment 99250 [details]
Video presenting the bug
Comment 7 Łukasz Żarnowiecki 2016-05-29 20:21:13 UTC
Created attachment 99251 [details]
KWin support info
Comment 8 Thomas Lübking 2016-05-29 21:43:48 UTC
The black border around windows is clearly bug #361154 (unlike original bug fits in usage pattern aside visual results), but the "flickering" desktop is interesting.

Either the desktop window (uses GL as well) switches between a valid and an invalid texture or kwin picked some junk desktop (black for eg. an invalid window texture) and missed a global update in the buffer age chain.

Forcing a (series of) full scene repaints like un/maximizing one of the windows a couple of times should "fix" the buffer chain and running

    KWIN_USE_BUFFER_AGE=0 kwin_x11 --replace &

along a tearing prevention forced to full scene repaints should prevent the flicker from occuring at all (likewise "tearing prevention: none" should prevent it)
Comment 9 Łukasz Żarnowiecki 2016-05-30 21:06:19 UTC
> KWIN_USE_BUFFER_AGE=0 kwin_x11 --replace &

This command does the job well in case of flickering and with borders too.  Thank you.
Comment 10 Thomas Lübking 2016-05-30 21:14:42 UTC
It's *not* meant as as resort from an existing problem (it includes a restart of kwin, so naturally resolves any pending problems with the present kwin process ;-)

The interesting question is whether a kwin process started this way is not affected by the problems in this bug.
Comment 11 Lastique 2016-06-01 20:44:26 UTC
I put KWIN_USE_BUFFER_AGE=0 to /etc/environment a few days ago and so far I haven't seen any flickering textures. I can't be 100% sure this fixes the problem but it does make things better.

Note: My vsync mode is "Automatic".
Comment 12 Lastique 2016-06-01 21:13:54 UTC
Created attachment 99314 [details]
Screencast showing opacity changes when opening windows

Here's a screencast of opacity changes when blur is enabled. Pay attention to the panels.
Comment 13 Lastique 2016-06-01 21:19:24 UTC
Created attachment 99315 [details]
Screencast showing undrawn decorations

Sorry, I mixed up two of by bugs.

(In reply to Lastique from comment #11)
> I put KWIN_USE_BUFFER_AGE=0 to /etc/environment a few days ago and so far I
> haven't seen any flickering textures. I can't be 100% sure this fixes the
> problem but it does make things better.
> 
> Note: My vsync mode is "Automatic".

And there you go. A few minutes later after I wrote the message I re-enabled the Blur effect and got un-drawn window decorations. No flickering though. Also I noticed that the decorations are affected by the nearby windows. See the attached screencast.
Comment 14 Martin Flöser 2016-08-27 15:47:22 UTC
I assume this is just another case of bug #361154 - in case 5.7.4 does not fix the incorrectly drawn decorations and the flickering, please reopen.

*** This bug has been marked as a duplicate of bug 361154 ***