Why is my OpenGL version stuck at 3.0 despite new hardware & software?
I need to use a program on my laptop that requires OpenGL 3.3 or better. Apparently my "effective" OpenGL version is 3.0. Below is the output from glxinfo. This is xubuntu 16.10 and the graphics card is Intel HD 5500. So I don't understand what's going wrong, it seems like both hardware and software should be plenty up to date to get at least 3.3. Hope someone can help!
glxinfo|grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.3
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Solution 1:
Short answer: Your OpenGL version in not stuck at 3.0. The "OpenGL core profile version string" line displays your supported OpenGL as "4.3".
More detailed explanation: This complicated versioning is related to changes done in OpenGL version 3.0, up to which all OpenGL versions were fully backwards compatible. Starting from OpenGL version 3.0 some features were marked as deprecated, and newer drivers don't necessarily have to support them to be OpenGL 3.1+ compatible.
To make it possible for OpenGL drivers to support deprecated functions while also being fully compatible with versions 3.1+, OpenGL introduced "core" and "compatible" profiles.
Basically, if you run an application in the context of the "compatible" profile, you are guaranteed to have access to all OpenGL capabilities up to a particular version including all the deprecated functions. This is not the case when running an application in the context of "core" profile.
My speculation is that, for context-unaware applications, the OpenGL version might be purposefully reported as 3.0 for maximum compatibility. This is were environment variables like MESA_GL_VERSION_OVERRIDE=4.3
come in handy.
For more information: OpenGL Context
Solution 2:
I think the application may just be pulling the version string and reporting it. However, I don't think this represents the maximum version available and possibly not what the application is using. My "OpenGL Version String" is reported exactly the same as yours and I'm developing using OpenGL 3.2 on this system.
If you run the command glxinfo | grep Max
you should receive a list that details the maximum versions available for the core profile, compatibility profile etc. I would run this and see what it reports. I think it will report your max core profile version as 4.3 (not 3.0). If so, I don't think you have a driver issue.
I looked briefly at the software application and I didn't see any mention of a requirement for OpenGL 3.3. However, their site does suggest that there are large differences between different GPU's.
They do appear to offer support, so if you're still having problems it may be best to see if they can help further.
Hope that helps.
Updated for glmark2
glmark2 is an OpenGL (ES) 2.0 benchmark. Again this may be just pulling the version string. I've googled other benchmark applications and found GFXBench available here. If you download, install and run this and then select "Info" at the bottom of the screen it appears to provide your maximum OpenGL version. Mine states "3.3 (Core)" which is the correct maximum version my card supports.
It also includes tests that require V4.x and none will run on my setup so this may be worth a try.
Updated Mesa Environment Variables
I just came across the Mesa environment variable MESA_GL_VERSION_OVERRIDE
. More information here. It states that this variable:
changes the value returned by glGetString(GL_VERSION) and possibly the GL API type.
I tried the following command on my system:
MESA_GL_VERSION_OVERRIDE=3.3 glxinfo | grep OpenGL
and this gave the following for the OpenGL version string and OpenGL shading language version string:
OpenGL version string: 3.3 (Core Profile) Mesa 12.0.3
OpenGL shading language version string: 3.30
This isn't what was reported without the environment variable. It may be worth trying to use this environment variable when executing your application as it may force the correct version to be used. You would use:
MESA_GL_VERSION_OVERRIDE=4.3 command
Where you would just replace command with whatever command you use to run your application.