Intel Mesa Gives Problems With KDE's KWin, Again

Written by Michael Larabel in Mesa on 18 April 2011 at 10:26 AM EDT. 94 Comments
MESA
Martin Gräßlin, the lead KDE developer of the KWin compositing window manager, usually has fairly insightful and technical blog posts. Last week he was talking about possibly moving the KDE screensaver into the KWin compositor for KDE SC 4.8 after writing the KDE view on GNOME's new compositing manager. Today he has written a new post, but this time it's about the open-source Intel Mesa driver breaking (again) for KWin.

Martin's post is more of a rant this time, but it's over Intel changing their OpenGL renderer string in a Mesa point release. Within the Mesa 7.10.x branch, Intel removed the "GEM" (Graphics Execution Manager) reference from their renderer string and in master (for Mesa 7.11) they have done further reformatting to this information for not only Intel but the other Mesa drivers too.

KWin was using the GEM reference in the OpenGL renderer string to determine whether direct rendering was available. With "GEM" no longer being in the string, KWin's blur effect is now disabled using Mesa 7.10 or Mesa 7.11-devel Git. Martin's main frustration is that Intel changed this in their stable branch and that KDE won't be able to detect Intel's GEM-capable driver by other means until their next major release, but not a KDE monthly point release. This is a problem hitting Ubuntu 11.04 "Natty" users right now where the problem was first discovered with KWin suddenly breaking on Intel hardware.

From Martin's blog post, "I'm now doing this kind of stuff for more than three years and changing the driver strings seems to be a hobby of the free drivers. The only driver which has in that time not change the pattern is NVIDIA. Apparently they recognize that customers may parse this information and rely on it. But of course as we all are open source evangelists it would be completely unacceptable to recommend the use of the NVIDIA driver or to recommend people to buy NVIDIA cards because their driver is bad, bad, bad just by the fact that it is closed!"

This is not the first time open-source drivers have broke with KWin. "Now we all remember the time of the 4.5 release and how the drivers announced support for what they don’t support. At that time the driver developers justified themselves with we should have known better, asked or at least assume that if the drivers say they support version X, that they in fact only support version X-2. Now my question: how should we handle such custom adjustments for broken drivers if the drivers change how they can be recognized?"

The workaround right now for KDE users with the latest Intel Mesa code is to set the KWIN_DIRECT_GL environmental variable to bypass the renderer string checks.

What's nice though about the OpenGL renderer string changes on Mesa master for the 7.11 release is the reporting of the short Git commit hash. This way it's much easier -- in useful cases such as benchmarking -- to immediately keep track of what Git revision the Mesa build currently is on. The driver date has been removed from the renderer string since these driver dates were rarely ever maintained by the developers. This is just not a change for the Intel driver but all of the Mesa drivers. Fortunately, the Phoronix Test Suite isn't solely dependent upon the OpenGL renderer string but has additional GEM checks (such as by some of the GEM sysfs entries) as additional fall-backs for detecting the in-kernel video memory management mechanism.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week