[Nouveau] [Bug 108651] Screen flickering when using compositor with OpenGL backend

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 10 18:44:17 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=108651

--- Comment #5 from John Lindgren <john at jlindgren.net> ---
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);

To this:

   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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20181110/4360e83f/attachment.html>


More information about the Nouveau mailing list