Some users of both compton and nouveau have experienced screen flickering when using the upgraded compton with GLX backend.
Nothing really changed in how compton uses OpenGL, so I suspect this could be a driver bug.
For details, please go to: https://github.com/yshui/compton/issues/33
How reproducible is this?
Is there an easy way for me, a non-compton user, to see these issues without massive software installation? (Could I just run compton with windowmaker, for example?)
What version of mesa did this work with? Or what was the change that precipitates these issues?
compton itself does not have lots of dependencies. Right now all the users experienced this problem seems to be using the i3 window manager, I don't know if this is reproducible with windowmaker.
I don't know the mesa version they use, I will ask. But judging that they are all archlinux users, they are probably using mesa 18.2.4.
They started experiencing this issue when they upgraded their compton. One of the reporters did a bisect (though he cannot reliably reproduce this problem) and find out the bad commit seems to be https://github.com/yshui/compton/commit/7af815a0aaaffc02e114e1d0adccb5f87dcc3548, which touches nothing OpenGL related.
On Mon, Nov 5, 2018 at 1:06 PM <email@example.com> wrote:
> Comment # 2 on bug 108651 from Yuxuan Shui
> compton itself does not have lots of dependencies. Right now all the users
> experienced this problem seems to be using the i3 window manager, I don't know
> if this is reproducible with windowmaker.
> I don't know the mesa version they use, I will ask. But judging that they are
> all archlinux users, they are probably using mesa 18.2.4.
> They started experiencing this issue when they upgraded their compton. One of
> the reporters did a bisect (though he cannot reliably reproduce this problem)
> and find out the bad commit seems to be
> which touches nothing OpenGL related.
> You are receiving this mail because:
> You are the QA Contact for the bug.
> You are the assignee for the bug.
> Nouveau mailing list
They confirmed they are using mesa 18.2.4
This probably isn't specific to nouveau. I am using Intel graphics (modesetting driver) and I was also bitten by screen flickering in compton after the switch to XCB (commits 43f3744fea07 and 7af815a0aaaf).
It is specific to DRI2. With DRI3 or software rendering (LIBGL_ALWAYS_SOFTWARE=1), the flickering goes away.
Looking at mesa source (src/glx/dri2.c), DRI2 seems to be incompatible with xcb event processing due to usage of XESetWireToEvent()/XESetEventToWire(), which hook into the traditional Xlib event processing. Without Xlib in the loop, DRI2 misses its Invalidate events and the result is that glXSwapBuffers() doesn't work as expected. (Take a look at src/glx/dri2_glx.c - dri2XcbSwapBuffers() contains an explicit XSync() call to wait for Invalidate events, which it never gets.)
One workaround I found is to change the following line in src/glx/dri2_glx.c:
pdp->invalidateAvailable = (pdp->driMinor >= 3);
pdp->invalidateAvailable = 0;
This causes mesa to think it's using an older X Server that doesn't send Invalidate events and use some kind of internal fallback. It's enough to make the flickering go away, but I don't know what other side effects it has.
Note that by default, xf86-video-nouveau does not expose DRI3. There's a bit of incompatibility between EXA and DRI3, which I'm told is unfixable (without major changes to EXA).
This can be forced by adding
Option "DRI" "3"
in the Driver section.
So the problem is actually a incompatibility between using xcb event loop and mesa DRI2.
It is hacked around in compton.
More details in bug 108705
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1164.