Hardware based OpenGL on Linux

96 visualizaciones (últimos 30 días)
Daniel Shub
Daniel Shub el 2 de Sept. de 2015
Comentada: Nikolai Kozlov el 2 de Ag. de 2024
I am unable to get hardware based OpenGL since the change to HG2 (i.e., R2014b and R2015a) on Linux. Prior to that, I can use hardware based OpenGL. Specifically,
>> opengl info
Version: '3.0 Mesa 10.6.5'
Vendor: 'Intel Open Source Technology Center'
Renderer: 'Mesa DRI Intel(R) Sandybridge Mobile '
MaxTextureSize: 8192
Visual: 'Visual 0xac, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 4 samples)'
Software: 'true'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {199x1 cell}
MaxFrameBufferSize: 8192
I was expecting/wanting "Software" to be false.
$ ldd /opt/tmw/matlab/bin/glnxa64/glren.so | grep libGL
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f0a3b871000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007f0a3b5ef000)
suggests that MATLAB is finding the system libraries (which is what TMW says I want) and TMW confirms that the library versions libGL.so.1.2.0 and libGLU.so.1.3.1 are compatible. I have been in contact with TMW technical support and they have decided it is not a MATLAB issue despite
$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
suggesting hardware based OpenGL is working outside MATLAB. I have done most of my testing on Arch Linux with an Intel graphics card, but have also tried ATI and Nvidia cards. I recently installed MATLAB into a Debian 7 chroot with the Intel card. Despite Debian 7 being listed as a supported OS, I still have no luck.
Can anyone get MATLAB R2014b/R2015a to use hardware based OpenGL on Linux? Any ideas of where I should look?
  2 comentarios
Pedro Brito
Pedro Brito el 4 de Sept. de 2015
Editada: Pedro Brito el 4 de Sept. de 2015
I'm having the same problem, just installed R2015a, I'm also running Arch Linux:
Version: '3.0 Mesa 10.6.5'
Vendor: 'Intel Open Source Technology Center'
Renderer: 'Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) '
MaxTextureSize: 8192
Visual: 'Visual 0xd5, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samples)'
Software: 'true'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {207x1 cell}
MaxFrameBufferSize: 8192
and
direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)
and
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f7033bc4000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007f7033942000)
Maurizio
Maurizio el 4 de Mayo de 2016
I have the same problem with Matlab R2015a.
Version: '3.0 Mesa 10.1.3'
Vendor: 'Intel Open Source Technology Center'
Renderer: 'Mesa DRI Intel(R) Haswell Desktop '
MaxTextureSize: 8192
Visual: 'Visual 0x20, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samples)'
Software: 'true'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {188x1 cell}
MaxFrameBufferSize: 8192
and the output
$ ldd /opt/Matlab/bin/glnxa64/glren.so | grep libGL
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007fb5c1c5f000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fb5c19f1000)
and
$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop
Did you find a way to solve it? Also, I would be interested if you encountered any other problems possibly related to the graphic card while plotting simple 2D graphs ((randomly) crash of Matlab, computer freezes, etc.)?

Iniciar sesión para comentar.

Respuestas (3)

Willi Mutschler
Willi Mutschler el 12 de Abr. de 2020
Hi,
I am on Ubuntu 20.04 beta and running the nvidia on-demand prime profile, and get the same error. I can solve this (see the Archwiki) by starting matlab from terminal:
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
Or (additionaly) you can change the EXEC in /usr/share/applications/matlab.desktop to:
Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 matlab -desktop
  4 comentarios
Willie Smit
Willie Smit el 4 de Mzo. de 2021
Editada: Willie Smit el 4 de Mzo. de 2021
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
worked for me on Matlab 2019b and Ubuntu 20.04. Thanks WM.
Nikolai Kozlov
Nikolai Kozlov el 2 de Ag. de 2024
Thank you!

Iniciar sesión para comentar.


Willi Mutschler
Willi Mutschler el 26 de Abr. de 2020
I also ran into this issue on my Dell XPS 13 9360 which neither has a NVIDIA or AMD card, but an on-board intel graphics card.
I filed a bug report with MATHWORKS and they proposed two solutions:
  1. Create a file with the name 'java.opts' in the directory where MATLAB is executed (for me this is in '/usr/local/MATLAB/R2020a/bin/glnxa64') with the following line: -Djogl.disable.openglarbcontext=1
  2. If this does not work, then the above solution using export MESA_LOADER_DRIVER_OVERRIDE=i965 is working.
For me both solve my issue.

Rick Irons
Rick Irons el 4 de Mayo de 2016
In the three cases listed previously hardware accelerated versions of Mesa are in fact being used. The problem is that the value of the OpenGL info 'software' field is actually incorrect. This issue has been fixed in R2016a.
  1 comentario
Daniel Shub
Daniel Shub el 4 de Mayo de 2016
Can you explain how you know that hardware acceleration is being used? Further, in my service request (01487101) I was told this was not a MATLAB issue. Now it seems TMW is saying it is a "bug", in fact one that has been fixed, yet I do not see anything in the bug reports.

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by