Software OpenGL Linux i915 11th Gen Intel

55 views (last 30 days)
Hi!
I am using MATLAB R2021b. Linux Mint 20.2, 5.13.0-21-generic kernel, 11th gen i7-1165G7 CPU.
Software OpenGL failing seems to be a common problem with MATLAB on Linux. I get the following error:
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
I have tried solution posted here. It worked for me before, but on my new laptop, forcing i965 spits out more errors:
MATLAB is selecting SOFTWARE OPENGL rendering.
gen12 and newer are not supported on i965
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
It seems like the previous solution was forcing an older driver (could be totaly wrong here). It seems like this trick does not work with newer CPUs with Intel Xe graphics. Any ideas what to do about this?

Accepted Answer

Dmitrii Turygin
Dmitrii Turygin on 30 Nov 2021
Edited: Dmitrii Turygin on 21 Dec 2021
Okay, I think if figured it out. For whatever reason MATLAB looks in wrong folders for some libraries. You can fix this by pointing MATLAB to them. For my system these are the commands:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6;
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/dri/;
EDIT: Hm, I think this was not it. MATLAB would load by I would get opengl context erroros right after load. You need to create a java.opts file inside of matlab/bin/glnxa64 folder with -Djogl.disable.openglarbcontext=1 line in it. That should fix the context issue.
  3 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!