openGL error whenever starting MATLAB on Ubuntu

4 views (last 30 days)
Whenever I start MATLAB, there's always same error message like below. It was fine when I've first installed, but someday it started with this problem. X11GLXDrawableFactory - Could not initialize shared resources for :0
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(
at Source)
Caused by: java.lang.NullPointerException
at jogamp.opengl.GLContextImpl.makeCurrent(
at jogamp.opengl.GLContextImpl.makeCurrent(
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(
... 2 more
Exception in thread "Startup Class Loader" java.lang.InternalError: XXX0 profile[1]: GL3bc -> profileImpl GL4bc !!! not mapped
at Method)
at com.mathworks.hg.peer.JavaSceneServerPeer.initializeJOGL(
at com.mathworks.hg.peer.JavaSceneServerPeer.<clinit>(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.mathworks.mde.desk.StartupClassLoader.loadClass(
at com.mathworks.mde.desk.StartupClassLoader.access$900(
at com.mathworks.mde.desk.StartupClassLoader$
at Source)
I'm using 2015a version on ubuntu 16.04 and I've tried before with opengl command. It looked work well because there's no more error message that I mentioned above, but it was failed to use some toolbox functions such as Psychtoolbox. How can I solve it ??
matlab -softwareopengl

Answers (1)

Zenin Easa Panthakkalakath
According to the description of 'Psychtoolbox', the toolbox uses Hardware-accelerated OpenGL. Using '-softwareopengl' flag makes MATLAB use Software OpenGL.
Try to run MATLAB using the following start-up command. This ensures that graphics libraries are loaded in the right order when MATLAB starts.
matlab -nodesktop -r "opengl info, desktop"


Find more on Graphics Performance 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!

Translated by