MATLAB: Could not initialize shared resources for X11GraphicsDevice

2017aubuntu 14.04

Hey,
I'm using Dell precision 7510 with preinstalled Ubuntu 14.04(I have the driver the NVIDIA). I just downloaded the MATLAB 2017a and I run into the following error. I just searched and found it's not just me who have the same problem. I wonder if this problem is fixable? To put it in another way, could I use all the features provided by MATALB with this error?
Thank you in advance, attached is the error infor
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

Best Answer

This low-level graphics error is an NVIDIA driver issue. If possible, downgrade to a previous NVIDIA driver, such as the one that was on the system before the update.
1. Start MATLAB with nodesktop AND the opengl info command, and then open the desktop. This gets the right library load order for everything to work. Try to start MATLAB with the following command (in the Windows Command Prompt) :
>>matlab -nodesktop -r "opengl info, desktop"
This command starts MATLAB with "nodesktop" and the "opengl info" command, and then opens the desktop. The downside is you cannot start MATLAB in the background, or suspend (Ctrl-Z) and push it to the background (bg).
This might have to be used in conjunction with the "libstdc++.so.6" library being incompatible which can be resolved using the workaround in the following bug report :
2. Downgrade from NVIDIA driver version 367.57 to version 340.98, a stable previous release:
3. Keep an eye out for new NVIDIA drivers on the NVIDIA website:
4. If it is not possible or preferable to change your graphics driver, use MATLAB with Software OpenGL. Open MATLAB from the Linux Terminal with the following command:
$ matlab -softwareopengl
You can set your preferences so that MATLAB always starts with Software OpenGL by executing the following in the MATLAB Command Window:
>> opengl('save','software')
You can always revert to your default graphics renderer with the following:
>> opengl('save','none')