Plotting and OpenGL error on Linux. How to resolve?

Hi I am unable to plot with Matlab. I have been getting this message:
MATLAB has experienced a low-level graphics error, and may not have drawn correctly. Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB.
When I followed the instructions to resolve this issue, I got this message:
Error using opengl Switching to software OpenGL rendering at runtime on unix is not supported.
I am running debian wheezy on a lenovo T440s. Please let me know what I can do to resolve this issue.

回答 (3 件)

Willi Mutschler
Willi Mutschler 2020 年 4 月 26 日

10 投票

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.

8 件のコメント

Eyal
Eyal 2022 年 11 月 29 日
Thank you for number 1!!
Solved it for me :)
Avinash
Avinash 2023 年 1 月 16 日
The 1st solution resolved it, Thank you !!
Abhishek
Abhishek 2023 年 4 月 12 日
Hello!! How did you create that particular file. Is it just like the normal .txt file?
Walter Roberson
Walter Roberson 2023 年 4 月 12 日
yes, java.opts is a normal text file.
Armaghan
Armaghan 2023 年 8 月 11 日
The 1st solution worked for me. Thank you!!!
Atharva
Atharva 2024 年 9 月 27 日
The second option worked for me. Thanks for helping!!
Kadapalla
Kadapalla 2024 年 11 月 3 日
The 1st solution worked for me. Thank you!!!
Rafael
Rafael 2025 年 1 月 13 日
編集済み: Rafael 2025 年 1 月 13 日
The first solution error:
Unrecognized option: Djogl.disable.openglarbcontext=1
Unable to start the JVM because of a bad Java option or unknown error.
Please check your java.opts file.
So don't forget the dash in java.opts:
-Djogl.disable.openglarbcontext=1

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

Willi Mutschler
Willi Mutschler 2020 年 4 月 12 日

8 投票

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

2 件のコメント

How can I edit matlab.desktop It is not giving access to edit and save
Walter Roberson
Walter Roberson 2022 年 9 月 14 日
You get someone with system administration access to change the file.

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

Walter Roberson
Walter Roberson 2015 年 5 月 16 日

0 投票

Try starting your MATLAB with the -softwareopengl flag. If the crash goes away then you have an OpenGL problem and might need a driver update.
Which MATLAB release are you using?

2 件のコメント

yuanb
yuanb 2015 年 5 月 17 日
I am using R2014b. How do I start MATLAB with the -softwareopengl flag? The instructions said to run matlab -softwareopengl in my console, but it says command not found when I do that.
Thank you!
Walter Roberson
Walter Roberson 2015 年 5 月 17 日
Inside MATLAB, give the command
matlabroot
The result will tell you where your MATLAB is installed. You might have to look inside a subfolder such as 'bin' to find the matlab executable.
For example on OS-X it shows up for me as
/Applications/MATLAB_R2014a.app/bin/matlab

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

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2015 年 5 月 16 日

編集済み:

2025 年 1 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by