Hardware based OpenGL on Linux

88 ビュー (過去 30 日間)
Daniel Shub
Daniel Shub 2015 年 9 月 2 日
コメント済み: Nikolai Kozlov 2024 年 8 月 2 日
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 件のコメント
Pedro Brito
Pedro Brito 2015 年 9 月 4 日
編集済み: Pedro Brito 2015 年 9 月 4 日
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 2016 年 5 月 4 日
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.)?

サインインしてコメントする。

回答 (3 件)

Willi Mutschler
Willi Mutschler 2020 年 4 月 12 日
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 件のコメント
Willie Smit
Willie Smit 2021 年 3 月 4 日
編集済み: Willie Smit 2021 年 3 月 4 日
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
worked for me on Matlab 2019b and Ubuntu 20.04. Thanks WM.
Nikolai Kozlov
Nikolai Kozlov 2024 年 8 月 2 日
Thank you!

サインインしてコメントする。


Willi Mutschler
Willi Mutschler 2020 年 4 月 26 日
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 2016 年 5 月 4 日
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 件のコメント
Daniel Shub
Daniel Shub 2016 年 5 月 4 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by