Bug 365918 - Sometimes flickering when interacting with windows
Summary: Sometimes flickering when interacting with windows
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (other bugs)
Version First Reported In: 5.7.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 02:48 UTC by Chris
Modified: 2016-09-25 03:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
mgraesslin: NVIDIA+


Attachments
KWin Support Information (5.74 KB, text/plain)
2016-08-08 19:53 UTC, Chris
Details
attachment-14514-0.html (1.75 KB, text/html)
2016-08-16 20:50 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2016-07-21 02:48:49 UTC
When I use GLX as my backend, everything works fine (though I do experience tearing sometimes, though that's a separate issue that's partly thanks to Nvidia). And as of a recent update that included xorg-server and some others, using OpenGL as the backend causes severe flickering on the desktop or entire screen.

Since this can't be captured with a screenshot, I'm going to capture a video of it. This will take a bit more time, so I'll be linking that in a while.

Reproducible: Always

Steps to Reproduce:
1. Switch to one of the two OpenGL backends.
2. Open one or a few new Dolphin windows, for example.
3. Move the cursor around on top of it.

Actual Results:  
Flickering in areas of the screen.

Expected Results:  
Nothing out of the ordinary should happen.

Using Nvidia might or might not be a factor.
Comment 1 Chris 2016-07-21 03:16:05 UTC
Well, now I can't duplicate what was happening. Well, I'll post another comment here when it starts happening again...
Comment 2 Martin Flöser 2016-07-21 05:59:51 UTC
> When I use GLX as my backend, everything works fine

What do you mean with that? Did you switch to EGL and it started to break? If yes, switch back to GLX and be happy there. NVIDIA doesn't properly support EGL yet.
Comment 3 Chris 2016-07-29 00:02:26 UTC
Not sure why but I wasn't emailed for this. Strange. Anyway, I'll go ahead and close this bug - whatever glitch I was experiencing, I wasn't able to reproduce it for long after I wrote the report, and it had stopped happening by the time I tried capturing it with OBS.

I don't remember exactly, but I do remember that it wasn't happening with XRender, but I don't know why I was referring to GLX as "working" but "OpenGL" as not working. Maybe I meant EGL? Well, regardless, it's back to normal now.
Comment 4 Chris 2016-08-07 03:56:30 UTC
It's back! And I managed to capture it this time - OBS couldn't catch it, so I used a camera instead. I have a feeling this could be difficult to reproduce after I boot up again. I don't know what started this.

https://www.youtube.com/watch?v=_FVmg6IqMtw

Here's it not flickering with XRender:

https://www.youtube.com/watch?v=b2dKgvjV41k
Comment 5 Chris 2016-08-07 04:13:56 UTC
And a little more testing with a properly focused camera, back to OpenGL: https://www.youtube.com/watch?v=VfavT_a6U-M
Comment 6 Martin Flöser 2016-08-08 05:52:47 UTC
ouch. That looks really terrible. I hope that we can figure out whether a setting is responsible for it. So let's start with: please provide output of:

qdbus org.kde.KWin /KWin supportInformation
Comment 7 Chris 2016-08-08 19:53:29 UTC
Created attachment 100499 [details]
KWin Support Information
Comment 8 Chris 2016-08-08 23:01:42 UTC
I should also mention: this doesn't happen if a window has no titlebar/frame as set in Window Rules. The flickering doesn't happen when I open Firefox, because I got rid of the titlebar/frame for it (I use Tree Style Tabs) and I just tested that with Dolphin, and the flickering doesn't happen when opening a Dolphin window now either.
Comment 9 Martin Flöser 2016-08-09 05:35:57 UTC
Just an idea: give a try to use OpenGL 2 instead of OpenGL 3 in the compositor settings.
Comment 10 Chris 2016-08-09 14:08:01 UTC
I did try that ("Switch to one of the two OpenGL backends") and it didn't work, unfortunately.
Comment 11 Martin Flöser 2016-08-10 09:42:58 UTC
ok, thanks for trying. Actually I'm quite glad that this didn't help
Comment 12 Thomas Lübking 2016-08-15 16:11:27 UTC
The flicker is due to the re-used buffer, the question is why one of them is invalid but for the newly exposed area and this seems to be related to window decorations.

Let's start with the obvious: pelase deactivate blur and contrast effects (kcmshell5 kwineffects) and see whether it's still a problem.

You can also try
  export KWIN_USE_BUFFER_AGE=0
  kwin_x11 --replace &

and see what happens (this will read the old data from the front buffer instead of relying on the buffer_age extension)
Comment 13 Chris 2016-08-16 01:45:31 UTC
I actually still can't figure out how to trigger that behavior when I want to. It just seems to happen randomly. I've since rebooted, which gets rid of the issue indefinitely. It may crop up again, as it did before. Should I go ahead and disable those effects anyway (and change the buffer method too?) and see if it comes back?
Comment 14 Thomas Lübking 2016-08-16 19:58:07 UTC
Is rebooting required or does switching the compositor backend or restarting kwin clear the stage as well?
You could disable the two effects but that would only provide negative knowledge, of course (ie. if it still happens, it's not them)

Could it be related to running fullscreen games (steam et al.)?
Comment 15 Chris 2016-08-16 20:49:59 UTC
Created attachment 100637 [details]
attachment-14514-0.html

Switching the compositor backend to XRender would fix the problem, though
if I switched back to OpenGL during the same session, I think the problem
was still there. Rebooting is not required, I could also log out back to
SDDM, and log back in again. Didn't test restarting kwin without logging
out, didn't know that was an option.

I've definitely noticed it start happening when I wasn't in fullscreen. I
wish I had written down exactly what I was doing when it started happening
those few times it happened.

On Tue, Aug 16, 2016 at 3:58 PM, Thomas Lübking via KDE Bugzilla <
bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=365918
>
> --- Comment #14 from Thomas Lübking <thomas.luebking@gmail.com> ---
> Is rebooting required or does switching the compositor backend or
> restarting
> kwin clear the stage as well?
> You could disable the two effects but that would only provide negative
> knowledge, of course (ie. if it still happens, it's not them)
>
> Could it be related to running fullscreen games (steam et al.)?
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 16 Chris 2016-08-17 04:31:25 UTC
It came back again. (All I did was open a Konsole window.) While the glitching was happening, I went into Desktop Effects and tried disabling Blur and Contrast, but the glitching continued. Then I restarted kwin (using `killall kwin_x11' then `kwin_x11 --replace &') and the glitching was no longer happening, as expected.
Comment 17 Chris 2016-09-25 03:34:19 UTC
Hasn't happened for a good while. I'll go ahead and say this was probably fixed.