0

I am using mayavi to do some visualization task on my remote server with GPUs.When my code run mlab.show(),the following error occurred

qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
...
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)

ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 797
vtkXOpenGLRenderWindow (0x559c336fd4e0): 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.

I am using Ubuntu16.04 and here is some info about my remote server.

(base) zz@SYS-4028GR-TR:~$ glxinfo | grep OpenGL
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.3 Mesa 4.0.4
OpenGL extensions:

(base) zz@SYS-4028GR-TR:~$ glxinfo | grep render
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
OpenGL renderer string: Mesa GLX Indirect

Does anyone have some ideas about this situation?I try to found some ways to update Mesa in Ubuntu but failed.If there is any way to deal with this kind of problem, it would be very helpful.

Zhuzi
  • 1
  • 2
  • Related? [Current state and solutions for OpenGL over Windows Remote](https://stackoverflow.com/questions/51705471/current-state-and-solutions-for-opengl-over-windows-remote) – BDL Nov 06 '19 at 08:53
  • Using the `LIBGL_ALWAYS_SOFTWARE=true` env var may help, Mesa comes with a software rendering implementation of OpenGL 2.1 called `llvmpipe`. – Romen Nov 06 '19 at 17:35

1 Answers1

0

I am using mayavi to do some visualization task on my remote server with GPUs.

"Remote Server", that's your problem right there. If you log in via SSH forwarding the X11 connection, all OpenGL commands are serialized as GLX commands and tunneled through the X11 connection over the network to your computer to be executed on your local graphics system.

If you have a GPU on the remote system, your best option these days is to use Xpra, configuring so that it launches its backing X server on the GPU and not with a virtual framebuffer device.

What this comes down to is to install the regular Xorg server. Modify /etc/X11/Xwrapper to allow start by a regular user. You can then start the X server with Xpra being the first client with the command line

startx /usr/bin/Xpra start :100 --use-display --daemon=no -- :100

If you don't want to fix your display, then create a executable file /usr/local/bin/xpra_display

#!/bin/sh
exec xpra start $DISPLAY --use-display --daemon=no

which you can then launch with

startx /usr/local/bin/xpra_display

without further arguments

datenwolf
  • 159,371
  • 13
  • 185
  • 298