Matlab crashes after insatlling PTB: com.jogamp.opengl.GLException

Hi!


I recently installed Matlab 2016b and used DownloadPsychtoolbox.m to install PTB.


At the end of the installation, I get this:

MATLAB has experienced a low-level graphics error, and may not have drawn correctly.
Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB.
To share details of this issue with MathWorks technical support,
please include this file with your service request.

Your version of Matlab R2014b or later was setup to use its own software OpenGL renderer.
As this is completely unsuitable for Psychtoolbox, i have changed the setting to use the
system provided hardware accelerated OpenGL library. You need to quit and restart Matlab
for these changes to take effect, otherwise visual stimulation will be broken.

Press any key to continue to confirm you read and understood this.
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x3edd14b8, isOwner false, <247b5c46, 1ee70a60>[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: main-SharedResourceRunner: Error making temp context(1) current: display 0x7f59b80019f0, context 0x7f59b809d180, drawable X11OnscreenGLXDrawable[Realized true,
    Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@378eaf9d,
    Handle    0x4400003,
    Surface   WrappedSurface[ displayHandle 0x7f59b80019f0
, surfaceHandle 0x4400003
, size 64x64
, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
, X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x7f59b80019f0, owner true, ResourceToolkitLock[obj 0x78ab88e9, isOwner true, <45a9b6e3, 92614d0>[count 2, qsz 0, owner <main-SharedResourceRunner>]]], idx 0], visualID 0x363, fbConfigID 0x10d,
    requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
    chosen    GLCaps[glx vid 0x363, fbc 0x10d: rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
, surfaceLock <23206861, 24a4ca4b>[count 1, qsz 0, owner <main-SharedResourceRunner>]
, X11DummyUpstreamSurfaceHook[pixel 64x64]
, upstreamSurface false ]]
    at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:371)
    at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:759)
    at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:642)
    at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580)
    at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:297)
    ... 2 more


Then, the following command makes Matlab crash:

[window, windowRect] = PsychImaging('OpenWindow', screenNumber, grey);


... and I get the those errors in the terminal:

libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast


What could I do about it?

I'm using a Debian Linux 4.9.0-3-amd64 x86_64.


Best regards,

Jonathan


-> Probably Matlab screwing up libraries: Try this:

sudo dpkg-reconfigure matlab-support

and answer yes when it asks if it should remove/rename Matlab libraries. This step is needed after each upgrade/install of Matlab to fix Matlab brain-damage.

-mario