Bug 353050

Summary: Screen flicker after a window changes its dimensions
Product: [Plasma] kwin Reporter: Chris Warrick <kwpolska>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.4.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kwin support info

Description Chris Warrick 2015-09-22 17:31:22 UTC
Randomly, parts of the screen will start flickering after a window changes its size. It can happen when using partial maximize (horizontal/vertical), and is almost always reproducible when starting a VirtualBox machine or after clicking the “Options »” button in a print window.

nvidia gts 450/closed-source drivers/using export __GL_YIELD="USLEEP"

Reproducible: Sometimes

Steps to Reproduce:
1. Open a window.
2. Make it change its size.
3. Have a seizure.
Comment 1 Thomas Lübking 2015-09-22 18:16:07 UTC
Try
   KWIN_USE_BUFFER_AGE=0 kwin_x11 --replace &

and please also attach the output of
   qdbus org.kde.KWin /KWin supportInformation
Comment 2 Chris Warrick 2015-09-22 18:54:48 UTC
Created attachment 94680 [details]
kwin support info
Comment 3 Chris Warrick 2015-09-22 19:01:19 UTC
I tried reproducing with that environment variable and couldn’t do it (but do note it happens randomly).  I added it to /etc/profile.d/kwin.sh (along with the usleep workaround) and will try it in the long term.

I’ll report back in two days.
Comment 4 Chris Warrick 2015-09-24 15:13:54 UTC
Didn’t get any flicker yet… seems like that switch is the way to go.

But do I really need two workaround settings just to get a functional environment?
Comment 5 Thomas Lübking 2015-09-24 15:31:07 UTC
Please don't be pathetic.
There's obviously either a bug in the driver or kwin's usage of the feature, but it's required to figure what the problem actually is - "flickers" is not exactly a useful problem description.

=> Next, enforce "swapping minus front buffer reading"  by setting "tearing prevention" to full scene repaints (keep buffer_age usage disabled)

=> If there's still no problem, re-activate KWIN_USE_BUFFER_AGE (remove/comment the environment or set it to "1") but keep tearing prevention at full scene repaints.
Comment 6 Chris Warrick 2015-09-24 15:32:58 UTC
I don’t have time for this.
Comment 7 Thomas Lübking 2015-09-24 15:45:37 UTC
You'll then have to hope it auto-fixes (eg. with a driver update)