I’m trying to use a software (Paraview) in client/server mode opening the client on my desktop machine (linux, debian 10) and do the heavy computations on a remote server (linux, CentOS 8). The software requires OpenGL 3.2 or later implementation and it should be OK with what is installed on my machine as you see from the output of command glxinfo shown below:
myaccount@desktopmachine:$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: *GeForce GTX 650 Ti BOOST/PCIe/SSE2 OpenGL core*
profile version string: 4.6.0 NVIDIA 440.82 OpenGL core profile
shading language version string: 4.60 NVIDIA OpenGL core profile
context flags: (none) OpenGL core profile profile mask: core profile
OpenGL core profile extensions: OpenGL version string: 4.6.0 NVIDIA
440.82 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions:
OpenGL ES profile version string: **OpenGL ES 3.2** NVIDIA 440.82 OpenGL
ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
The problem is that, when connecting to the remote server through SSH, the OpenGL resulting from the same command is:
myaccount@server:$ glxinfo | grep "OpenGL"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: *GeForce GTX 650 Ti BOOST/PCIe/SSE2 OpenGL*
version string: **1.4** (2.1.2 NVIDIA 440.82) OpenGL extensions:
So it looks like the version of OpenGL is not correctly transmitted.
What should I do to fix this issue that does not allow me to run the software?
2
Answers
SSH tunnels X11. GLX is the X11 protocol extension that does OpenGL, and is also the protocol that encapsulates OpenGL calls into X11, which is then tunneled over SSH.
Now here’s the thing:
GLX only goes up to OpenGL-1.4 (https://www.khronos.org/registry/OpenGL/specs/gl/glx1.4.pdf page 49). Everything beyond that is supported only by direct rendering contexts and GLX is used merely to setup the context, but from there on, everything related to OpenGL-3.x and beyond bypasses GLX and goes directly to the driver.
Sure, in theory GLX could be updated to support OpenGL-3 and later. But nobody bothers.
Your option now is to run everything on the remote end and only transmit the rendering result. Ideally this would be done by applications creating an X-less, headless OpenGL context, then copying over the rendering result into a X11 SHM pixmap (however the performance will be abysmal, over your typical network).
My preferred solution is using Xpra, using the GPU on the remote end.
In the context of ParaView and the pvserver, you need to use your local display, not the “X11 forwarding” mechanism.
Do not use
-X
or-Y
when connecting and then runDISPLAY=:0 glxinfo
,DISPLAY=:0 pvserver
. on your server