When launching matlab I get the following error: MESA-LOADER: failed to open iris:
Show older comments
Hi,
I can see many similar problems have been reported,but unfortunately I din't find the answer.
When I launch Matlab I get the following message:
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)
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)
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)
failed to load swrast driver
Gtk-Message: Failed to load module "canberra-gtk-module"
I use Matlab R2021b, Ubuntu 20.04.3 LTS with graphics Mesa Intel® UHD Graphics (TGL GT1).
I can find e.g. iris_dri.so in /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
and /snap/gnome-3-38-2004/87/usr/lib/x86_64-linux-gnu/dri/iris_dri.so
What should I change so that Matlab would find that path?
Thanks a lot in advance for your answers,
Kaisa
4 Comments
Michele Perrone
on 6 Feb 2022
Moved: DGM
on 21 Jun 2023
Same problem here!
Adrien Prévost
on 18 Feb 2022
Moved: DGM
on 21 Jun 2023
Hi, same problem here !
bouchra turki
on 22 Feb 2022
Moved: DGM
on 21 Jun 2023
Hi, the same problem!!!
Bryan De La Cruz
on 6 Aug 2023
Edited: Bryan De La Cruz
on 6 Aug 2023
creo que se soluciono con esto:

-----------------------------------------------------------------------------------------------------------------
cd /mnt/sda1/programas/matlab/programa_instalado/bin/glnxa64/../../sys/os/glnxa64/
mv libstdc++.so.6 libstdc++.so.6.old
ln -s /usr/lib/libstdc++.so.6 libstdc++.so.6
-Djogl.disable.openglarbcontext=true
Accepted Answer
More Answers (2)
Serguei Miridonov
on 28 Jan 2023
2 votes
I did not try this solution but I have found another at Stackoverflow for Intel CPU: add environment variable
export MESA_LOADER_DRIVER_OVERRIDE=i965
It works on Ubuntu 22.04.1
Alp Eren Yilmaz
on 22 Jan 2022
0 votes
I have the same setup, and I got the same error now. Unfortunately I couldn't find a solution, but I can still use matlab with "matlab -nodesktop" command, since it is related to graphics driver or something. The strange thing is I didn't update any driver or any opengl related thing, this thing came like in all of a sudden.
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!