Bug 338472 - Display contents alternating between two different partially updated images
Summary: Display contents alternating between two different partially updated images
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 4.11.11
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-22 11:03 UTC by Pierre Willenbrock
Modified: 2014-11-25 13:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
output of qdbus org.kde.kwin /KWin supportInformation (5.83 KB, text/plain)
2014-08-22 11:03 UTC, Pierre Willenbrock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Willenbrock 2014-08-22 11:03:52 UTC
Created attachment 88369 [details]
output of qdbus org.kde.kwin /KWin supportInformation

When compositing is enabled, the display contents permanently switch between two images. This is especially obvious when activating the "Show rendering regions" effect. When there is an application permanently updating, this leads to a flickering display. It seems like the updated display contents land only in one of front or back-buffer, but not the other, so one of the two contains old data. Usually, this happens when the back and front buffers are swapped instead of copies being made from back to front buffer.

This happens on xserver-1.16 and xserver master, mesa 10.1, 10.2 and mesa master, xf86-video-intel master, kernel 3.13.5 and kernel 3.16.1. I don't know if this happened with kwin 4.11.10 and earlier. I also tested with all effects disabled, as well as with KWIN_TRIPLE_BUFFER=0, KWIN_TRIPLE_BUFFER=1 and without KWIN_TRIPLE_BUFFER being set. Happens with vsync-setting auto and off, with and without color correction, on opengl 2 and opengl 3 backends.
Comment 1 Thomas Lübking 2014-08-22 11:14:01 UTC
kwriteconfig --file kwinrc --group Compositing --key GLStrictBinding true
qdbus org.kde.kwin /KWin reconfigure
qdbus org.kde.kwin /KWin toggleCompositing
qdbus org.kde.kwin /KWin toggleCompositing


If that doesn't fix it, please unsetthe dupe.

*** This bug has been marked as a duplicate of bug 336589 ***
Comment 2 Pierre Willenbrock 2014-08-22 11:31:17 UTC
That did not help. Anything else i could try?
Comment 3 Thomas Lübking 2014-08-22 11:39:42 UTC
FTR: If you have ever set the tearing prevention to "copy", please ensure to restart "kwin --replace" afterwards.

Other things to try:

- cacheTexture: true
  Disable caching of the blur effect ("kcmshell4 kwincompositing", 2nd tab, filter for blur, click confg - it's the only checkbox)
- Qt Graphics System: native
  Use the raster graphicssystem (3rd tab)
- Currently Active Effects:
  -------------------------
  kwin4_effect_translucency
  kwin4_effect_diminactive
  kwin4_effect_blur

  -> Deactivate them all (2nd tab)

Does it also happen with GL 1.3?
Comment 4 Pierre Willenbrock 2014-08-22 12:27:13 UTC
I tried without any effects already. Opengl 1.2 shows the same issue.

I started tinkering around in GlxBackend::present. Disabling both the fullRepaint and glXCopySubBuffer paths resulted in a kwin hang, but disabling the fullRepaint path only actually made the problem go away. Although i'm surprised it does full screen repaints in that case, if the "Show rendering regions" is to be believed.
Comment 5 Pierre Willenbrock 2014-08-22 13:21:07 UTC
KWIN_USE_BUFFER_AGE=0 makes things partially work, but now updates are missing(i.E. screen contents staying the same although they should have changed). No flickering anymore, though.
Comment 6 Martin Flöser 2014-08-22 13:41:40 UTC
you could give a try to with the egl backend instead of the glx backend. To activate run:
KWIN_OPENGL_INTERFACE=egl kwin --replace
Comment 7 Pierre Willenbrock 2014-08-22 15:59:23 UTC
Egl works as its supposed to. No missing updates, no flicker.
Comment 8 Fredrik Höglund 2014-08-25 18:25:25 UTC
This is possibly https://bugs.freedesktop.org/show_bug.cgi?id=81551
Comment 9 Pierre Willenbrock 2014-08-26 15:00:26 UTC
Looks like that is my problem. The patch over there makes flickering content go away. 

I think it is to be expected that the "Show paint" effect produces different colours for the rendering with buffer ages, since the same region is separately drawn to each buffer.

Thanks for helping to find the real culprit.
Comment 10 Philipp A. 2014-11-25 12:21:44 UTC
is this the bug about things flickering when e.g. fading out?

because every translucent tooltip and plasma panel flickers when fading out for me.

KWin support info: http://paste.kde.org/pqofrrf6s
Comment 11 Thomas Lübking 2014-11-25 13:01:09 UTC
That's probably rather bug #307112