1

I am running scripts on WSL that requires graphical output from mayavi but I am getting the following error:

GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.

My current OpenGL version is OpenGL version string: 1.4 (2.1 Mesa 19.2.0-devel (git-cdf42f5eaa))

I tried updating the OpenGL drivers via various solutions including:

  • export DISPLAY=:0
  • export DISPLAY=localhost:0
  • export LIBGL_ALWAYS_INDIRECT=1
  • Added ubuntu-x-swat into repository then upgrading via (ie. sudo apt-get upgrade)
  • export MESA_GL_VERSION_OVERRIDE=4.5; export MESA_GLSL_VERSION_OVERRIDE=150;

... but none of these solutions work!

Any kind souls got an idea how I can fix this issue?

Ang Jit Wei Aaron
  • 389
  • 1
  • 3
  • 19

2 Answers2

0

export LIBGL_ALWAYS_INDIRECT=0

^this worked for me. Im using wsl2 ubuntu-20.04 and running X-server with multiple windows, uncheck native opengl and check disable access control

-1

This maybe because your have use the indirect rendering mode.

What's the output when you execute the command glxinfo -B, if the 'direct rendering' is no, you can set it to yes by execute the command 'LIBGL_ALWAYS_INDIRECT=0'.

Then execute the command 'glxinfo -B' again and observe the version of opengl.

team317
  • 11
  • 2