Hardware based OpenGL on Linux

60 visualizzazioni (ultimi 30 giorni)
Daniel Shub
Daniel Shub il 2 Set 2015
Commentato: Nikolai Kozlov il 2 Ago 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 Commenti
Pedro Brito
Pedro Brito il 4 Set 2015
Modificato: Pedro Brito il 4 Set 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 il 4 Mag 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.)?

Accedi per commentare.

Risposte (3)

Willi Mutschler
Willi Mutschler il 12 Apr 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 Commenti
Willie Smit
Willie Smit il 4 Mar 2021
Modificato: Willie Smit il 4 Mar 2021
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
worked for me on Matlab 2019b and Ubuntu 20.04. Thanks WM.
Nikolai Kozlov
Nikolai Kozlov il 2 Ago 2024
Thank you!

Accedi per commentare.


Willi Mutschler
Willi Mutschler il 26 Apr 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 il 4 Mag 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 Commento
Daniel Shub
Daniel Shub il 4 Mag 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.

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by