Created attachment 108987 [details] Patch adding GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB attribute On systems where the only ARGB visual/fbconfig combination is sRGB capable and which use mesa after 17.2, kwin will not render windows using an ARGB visual. Steps to Reproduce: 1) Start an application that chooses ARGB visuals for some of its windows For example, QT4 apps may choose the ARGB visual for their menus or drop-downs. (They probably should not, but they do here.) 2) Make the application show such a window Actual Results: The window is invisible Expected Results: The window should be visible Build Date & Platform: Using the 5.11.3 release on a gentoo system. Inspection of the git repository shows bug still present. Mesa 17.3 branch. The commit changing mesa behaviour went into 17.2. Xserver 1.19.5 Additional Information: Commit 6e06e281c6ee342276d087ed4ee4a442626e433a in mesa changed the behaviour of glXChooseFBConfig so that it can filter for sRGB capable fbconfigs. By default, it will filter out all sRGB capable fbconfigs. The only ARGB visual/fbconfig combination on my system is sRGB capable, so kwin never finds it when an application uses the ARGB visual on a window, thus it will not be able to render the windows content. I solved this problem by adding GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, int(GLX_DONT_CARE) to the attribute list of glXChooseFBConfig, plugins/platforms/x11/standalone/glxbackend.cpp, about line 550. It may be more appropriate to use GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT(which is the same value).
Patch looks fine to me. Could you please provide a patch exported from git so that I can push keeping you as author?
Created attachment 108989 [details] Git format-patch Patch adding GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT attribute Changed to _EXT instead of _ARB since that seems to be preferred in glxbackend.cpp. Also changed the comment to mention mesa/i965, since all of the mesa "drivers" are somewhat independent.
Git commit 9300aa82be77ee23c346b85fb49091ab9728aba0 by Martin Flöser, on behalf of Pierre Willenbrock. Committed on 20/11/2017 at 17:12. Pushed by graesslin into branch 'Plasma/5.11'. Allow glXChooseFBConfig to return sRGB capable fbconfig Mesa's glXChooseFBConfig will not return any sRGB capable fbconfig when it is not explicitly asked for. On some systems, the only ARGB32 visual is paired with an sRGB capable fbconfig, so application windows using ARGB32 visuals would fail to display. FIXED-IN: 5.11.4 M +1 -0 plugins/platforms/x11/standalone/glxbackend.cpp https://commits.kde.org/kwin/9300aa82be77ee23c346b85fb49091ab9728aba0