Matlab graphics rendering issues on Linux

When I open matlab in the terminal receive the following output. 'MATLAB is selecting SOFTWARE OPENGL rendering.
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load swrast driver'
Matlab still opens but when I run a script I recieve the following output 'Warning: MATLAB has disabled some advanced graphics rendering features by switching to software OpenGL. For more information, click here. '
What can I do to fix these issues? I cannot find any documentation that can resolve this.
I am using Ubuntu 22.04 LTS. I have a dedicated graphics card with nvidia drivers.
If any more information is needed please let me know.

回答 (2 件)

Fotios Tsitsos
Fotios Tsitsos 2022 年 8 月 31 日

4 投票

MATLAB R2022a is not supported on Ubuntu 22.04. I had the same problem and I got the following workaround from support:
You should remove the libstdc++ symlink from the MATLAB path, like this (on the Linux terminal):
/usr/local/MATLAB/R2022a/sys/os/glnxa64/ mv libstdc++.so.6 libstdc++.so.6.distlink
This helped me fix my issues!

5 件のコメント

Rehan Hossain
Rehan Hossain 2023 年 2 月 8 日
This solved the issue on my Ubuntu 22.04. Matlab R2022a.
Vaishnavi
Vaishnavi 2024 年 1 月 20 日
This fixed worked me too. Thank you!
I have a system with Ubuntu 22.04 and MATLAB R2022b installed on it.
Bryan
Bryan 2024 年 2 月 6 日
Also solved for me. (Matlab 2021a on Ubuntu 22.04)
Jurica Brodar
Jurica Brodar 2024 年 4 月 26 日
Also worked for me! (Matlab 2020b on Linux Mint 21.3)
Thank you! :)
Anton
Anton 2024 年 11 月 14 日
Thanks! Works for me as well. 2021a, 22.04

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

Abderrahim. B
Abderrahim. B 2022 年 7 月 4 日
編集済み: Abderrahim. B 2022 年 7 月 4 日

2 投票

Hi
Workaround to fix terminal issue: run the below command in your ubuntu terminal to start matlab:
export MESA_LOADER_DRIVER_OVERRIDE=i965; matlab
Also, the graphic issue should be fixed. If not, try the instructions in this mathworks documentation page: Resolving Low-Level Graphics Issues .
Hope this fix your issues!

4 件のコメント

Daniel Velazquez
Daniel Velazquez 2023 年 10 月 9 日
This works for me with Debian Gnome MATE and Matlab R2022a
Sushant
Sushant 2025 年 2 月 14 日
this worked for me!
Hildur Maria
Hildur Maria 2025 年 2 月 19 日
This worked for me too. Thank you! I'm using Matlab2024b with Ubuntu 24.04.
Sam
Sam 2025 年 5 月 9 日
I'm using Matlab2024b with Ubuntu 24.04 and this just had me run in as if I had run
matlab -softwareopengl

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

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

製品

リリース

R2022a

タグ

質問済み:

2022 年 7 月 4 日

コメント済み:

Sam
2025 年 5 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by