Comment 10 for bug 1755097

Revision history for this message
shankao (shankao) wrote : Re: LLVMpipe renderer used instead of Intel on Xorg sessions

So, after investigating this problem, I finally saw the cause: under X.org, the environment variable LIBGL_ALWAYS_SOFTWARE is set to 1 *always*. Without it, it uses the intel driver as usual:

$ LIBGL_ALWAYS_SOFTWARE=0 glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.0-rc5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.0-rc5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

This is probably because I have an old unity file that's running when my session starts (/etc/X11/Xsession.d/50_check_unity_support) with these contents:

# This file is sourced by Xsession(5), not executed.
# If the hardware does not pass unity_support_test, fall back to LLVMpipe
# which does.

if [ "x$DESKTOP_SESSION" = "xubuntu" ]; then
    /usr/lib/nux/unity_support_test || export LIBGL_ALWAYS_SOFTWARE=1
fi

And given that the file /usr/lib/nux/unity_support_test doesn't exist anymore, it always exports the variable.

I think that there is still a bug here, and some possible fixes:

a) Remove the offending file when unity is removed
b) Fix the condition to check if unity_support_test exists
c) Be sure that ubuntu-bug reports the status of the flag for mesa bugs
d) Make that glxinfo prominently warns that the current env forces it to run in software mode