Could not initialize shared resources for X11GraphicsDevice- Ubuntu 14.04, Matlab 2017b
Show older comments
I have a machine with running Ubuntu 14.04, Nvidia GeForce 1080 Ti and MAtlab 2017b. I am facing this error which ,I believe, has been reported previously in this post for 2017a https://www.mathworks.com/matlabcentral/answers/342906-could-not-initialize-shared-resources-for-x11graphicsdevice and the error message is the same :
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x413b9df1, isOwner false, <30fe5aac, af2eb55>[count 0, qsz 0, owner <NULL>]]]
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
at java.lang.Thread.run(Unknown Source)
Caused by: com.jogamp.opengl.GLException: glXGetConfig(0x1) failed: error code Unknown error code 6
at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.glXGetConfig(X11GLXGraphicsConfiguration.java:570)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(X11GLXGraphicsConfiguration.java:500)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationXVisual(X11GLXGraphicsConfigurationFactory.java:434)
at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(X11GLXGraphicsConfigurationFactory.java:240)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createMutableSurfaceImpl(X11GLXDrawableFactory.java:524)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createDummySurfaceImpl(X11GLXDrawableFactory.java:535)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:283)
... 2 more
according to the above post there were some suggestions that could resolve the issue that i try but didnt work for me: 1- "libstdc++.so.6" solution
2-
$ matlab -softwareopengl
3-Trying different version of the Nvidia drivers :
NVIDIA binary driver -Version 384.130 from NVIDIA-380 (open source)
NVIDIA binary driver -Version 396.18 from NVIDIA-396 (open source)
NVIDIA binary driver -Version 390.48 from NVIDIA-390 (open source)
is there any solution or recommendation to rectify that problem.
Answers (1)
Konstantinos Ftikas
on 25 Dec 2019
1 vote
I have the same problem and i am searching since 2 days all the day for a solution. I can't even plot basic things. I am actually destroying my ubuntu system by trying various things out. At this point i would rather start thinking if octave is the better solution
7 Comments
caesar
on 26 Dec 2019
Walter Roberson
on 26 Dec 2019
opengl software
Possibly
Konstantinos Ftikas
on 26 Dec 2019
Edited: Konstantinos Ftikas
on 26 Dec 2019
Sadly not. I've seen this solution before. Thank you for your response anyway
Willi Mutschler
on 12 Apr 2020
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
Emmanuel Mennesson
on 10 Oct 2020
Bless you this worked for me after hours of suffering
Jenny Paola Romero Castro
on 28 Nov 2020
Thanks !!
Ananthakrishnan
on 12 Jan 2026
opengl software .. should work as temporary fix
Categories
Find more on Startup and Shutdown 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!