EGL with Matlab 2021a

Since VirtualGL can use EGL to not require Xorg server running I seem to have issues with Matlab 2021a where the -nosoftwareopengl option to vglrun e.g.

$ export VGL_DISPLAY=/dev/dri/card1
$ vglrun matlab -nosoftwareopengl

Seems to produce an error when using OpenGL e.g. in Matlab


Will produce an error and have:

com.jogamp.opengl.GLException: Caught GLException: AWT-EventQueue-0: createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL4bc/GL4bc.hw], current: 4.6 (Compat profile, compat[ES2, ES3, ES31], FBO, hardware) - 4.6.0 NVIDIA 495.29.05

Which suggests Matlab doesn’t like the OpenGL profile. Am I asking for too much? Has anyone got this to work - there is a later version of VirtualGL just released but I couldn’t spot anything in release notes to help fix this.

Using -softwareopengl seems to work okay.

I’m seeing this

>> rendererinfo(gca)

ans = 

  struct with fields:

    GraphicsRenderer: 'OpenGL Hardware'
              Vendor: 'NVIDIA Corporation'
             Version: '4.6.0 NVIDIA 495.29.05'
      RendererDevice: 'Tesla T4/PCIe/SSE2'
             Details: [1×1 struct]

with both GLX (via Thinlinc on my login node) and EGL backends (via OOD + novnc).

Have you tested other apps to see if it works correctly? glxinfo, glxgears, glxspheres64, etc.

vglrun glxinfo

Hi - apologies for slow response. Thanks for feedback. What version of Matlab are you using? Other programs seem to work.

Hi Tom

I tested with 2020b, 2021a, 2021b, and I have no issue. The output from rendererinfo(gca) is always the same as above.
OS is CentOS7, MATLAB is installed from EasyBuild, VirtualGL is taken from the official rpms from the virtualgl repo.


Okay - looks like its a Singularity issue since I am running desktop in Singularity. Maybe something isn’t been communicated properly in the container. Will investigate a bit more now I know it should work.


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.