How to configure Paraview Client/Server configuration with native GPU rendering over SSH

Hello,
I’m having some troubles compiling/configuring ParaView in order to be able to render on a remote server on its GPU and visualizing the results on a client, on another machine.

My server setup is an Ubuntu 18.04 machine with full desktop. I compiled paraview linking against (I hope) the system openGL library (and not mesa + llvmpipe). I also enabled iGLX.

The problem is that when I do glxinfo | grep OpenGL on the server while connected using ssh -Y, I get

glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 19.0.8

so it uses the software rendering. My questions:

  • OpenGL over SSH is always software rendered?
  • Is it possible to achieve hardware rendering in a Client/Server configuration? If Yes, how?

Thanks in advance,

SSH OpenGL version is not engouh and is not supported by ParaView.
Do not use ssh -Y or ssh -X

of course, see here :
https://www.paraview.org/Wiki/Setting_up_a_ParaView_Server#X_Connections

Hello, and thanks for the answer. Unfortunately the wiki you linked is not exhaustive: if I connect using ssh but without -Y, I get the Display is not accessible on the server side because Paraview cannot connect to the underlying X Server display.

So, how do I achieve Client/Server connection with native hardware accelerated rendering over an SSH Tunnel? In particular, reading the wiki, I don’t have xdm on Ubuntu. Is it up to date? Do I need xdm on Ubuntu?

Moreover, quoting:

If the clusters are not headless , i.e if the nodes are operating with full-blown desktop environments (e.g if you are running pvserver on one node that has many graphics cards), then you don’t have to make any changes. Just spawn many processes using mpirun; since the desktop manager is already running, the X windows should not have any trouble in getting created. If Paraview shows errors when the client connects to the pvserver(s), then you will have to follow the instructions below and create one another display where all the rendering will be done by the pvservers

Which are the instructions below to create the other display?

just access your X server.

can you run this over ssh ?

DISPLAY=:0 glxinfo

No, if I don’t forward the X11 connection (i.e. ssh -Y or ssh -X). But if I do, then I get software rendering.

Just to be clear, the server and the client are on different machines. The server machine is accessible to the client machine via an SSH tunnel

ssh -L 11111:<server>:11111 <username>@<tunnel>

is an Xorg server running on the server machine ?

Well, I’m quite embarrassed, but no. The X server was not running. :slight_smile:

So what I did was to startx Xorg

  1 # nvidia-xconfig: X configuration file generated by nvidia-xconfig
  2 # nvidia-xconfig:  version 430.26
  3
  4
  5 Section "ServerLayout"
  6     Identifier     "Layout0"
  7     Screen      0  "Screen0" 0 0
  8     InputDevice    "Keyboard0" "CoreKeyboard"
  9     InputDevice    "Mouse0" "CorePointer"
 10 EndSection
 11
 12 Section "Files"
 13 EndSection
 14
 15 Section "ServerFlags"
 16     Option         "IndirectGLX" "on"
 17 EndSection
 18
 19 Section "InputDevice"
 20
 21     # generated from default
 22     Identifier     "Mouse0"
 23     Driver         "mouse"
 24     Option         "Protocol" "auto"
 25     Option         "Device" "/dev/psaux"
 26     Option         "Emulate3Buttons" "no"
 27     Option         "ZAxisMapping" "4 5"
 28 EndSection
 29
 30 Section "InputDevice"
 31
 32     # generated from default
 33     Identifier     "Keyboard0"
 34     Driver         "kbd"
 35 EndSection
 36
 37 Section "Monitor"
 38     Identifier     "Monitor0"
 39     VendorName     "Unknown"
 40     ModelName      "Unknown"
 41     HorizSync       28.0 - 33.0
 42     VertRefresh     43.0 - 72.0
 43     Option         "DPMS"
 44 EndSection
 45
 46 Section "Device"
 47     Identifier     "Device0"
 48     Driver         "nvidia"
 49     VendorName     "NVIDIA Corporation"
 50 EndSection
 51
 52 Section "Screen"
 53     Identifier     "Screen0"
 54     Device         "Device0"
 55     Monitor        "Monitor0"
 56     DefaultDepth    24

and this is its log:

[  1494.409]
X.Org X Server 1.19.6
Release Date: 2017-12-20
[  1494.409] X Protocol Version 11, Revision 0
[  1494.409] Build Operating System: Linux 4.4.0-148-generic x86_64 Ubuntu
[  1494.409] Current Operating System: Linux ******* 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64
[  1494.409] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-66-generic root=UUID=b9cf2308-c879-427b-838d-8fafce778567 ro
[  1494.409] Build Date: 03 June 2019  08:10:35AM
[  1494.409] xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)
[  1494.409] Current version of pixman: 0.34.0
[  1494.409]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[  1494.409] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1494.409] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Nov 10 15:43:46 2019
[  1494.409] (==) Using config file: "/etc/X11/xorg.conf"
[  1494.409] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1494.409] (==) ServerLayout "Layout0"
[  1494.410] (**) |-->Screen "Screen0" (0)
[  1494.410] (**) |   |-->Monitor "Monitor0"
[  1494.410] (**) |   |-->Device "Device0"
[  1494.410] (**) |-->Input Device "Keyboard0"
[  1494.410] (**) |-->Input Device "Mouse0"
[  1494.410] (**) Option "IndirectGLX" "on"
[  1494.410] (==) Automatically adding devices
[  1494.410] (==) Automatically enabling devices
[  1494.410] (==) Automatically adding GPU devices
[  1494.410] (==) Automatically binding GPU devices
[  1494.410] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1494.410] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  1494.410]    Entry deleted from font path.
[  1494.410] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[  1494.410]    Entry deleted from font path.
[  1494.410] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  1494.410]    Entry deleted from font path.
[  1494.410] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[  1494.410]    Entry deleted from font path.
[  1494.410] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  1494.410]    Entry deleted from font path.
[  1494.410] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[  1494.410] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1494.410] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  1494.410] (WW) Disabling Keyboard0
[  1494.410] (WW) Disabling Mouse0
[  1494.410] (II) Loader magic: 0x556297cc9020
[  1494.410] (II) Module ABI versions:
[  1494.410]    X.Org ANSI C Emulation: 0.4
[  1494.410]    X.Org Video Driver: 23.0
[  1494.410]    X.Org XInput driver : 24.1
[  1494.410]    X.Org Server Extension : 10.0
[  1494.411] (--) using VT number 2

[  1494.411] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration

and then tried to run glxinfo. If I use startx , DISPLAY=:0 glxinfo is not able to find the DISPLAY (I’m on SSH without X Forwarding). If I use xinit , after that I copied the /etc/xinirc to my home, glxinfo finds the DISPLAY but it runs on software rendering

DISPLAY=:0 glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 19.0.8
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

I made finally some progress, since on Ubuntu libglvnd is used, I needed to force nvidia vendor.

DISPLAY=:0 _GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
name of display: :0
display: :0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_stereo_tree, GLX_EXT_swap_control,
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_copy_buffer,
    GLX_NV_copy_image, GLX_NV_delay_before_swap, GLX_NV_float_buffer,
    GLX_NV_multisample_coverage, GLX_NV_present_video,
    GLX_NV_robustness_video_memory_purge, GLX_NV_swap_group,
    GLX_NV_video_capture, GLX_NV_video_out, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
    GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer
OpenGL vendor string:
OpenGL renderer string:
OpenGL version string:
OpenGL extensions:

The problem is now that, when I run pvserver, I get:

DISPLAY=:0 __GLX_VENDOR_LIBRARY_NAME=nvidia pvserver
Waiting for client...
Connection URL: cs://hostname:11111
Accepting connection(s): hostname:11111
Client connected.
ERROR: In /dev/shm/ruben/spack-stage-paraview-5.6.3-gwc3rrsjqd2koa4rtl3gjiaqzprgr4vq/spack-src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 736
vtkXOpenGLRenderWindow (0x5613694ab070): GLEW could not be initialized.

ERROR: In /dev/shm/ruben/spack-stage-paraview-5.6.3-gwc3rrsjqd2koa4rtl3gjiaqzprgr4vq/spack-src/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 796
vtkXOpenGLRenderWindow (0x5613694ab070): failed to create offscreen window

ERROR: In /dev/shm/ruben/spack-stage-paraview-5.6.3-gwc3rrsjqd2koa4rtl3gjiaqzprgr4vq/spack-src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 736
vtkXOpenGLRenderWindow (0x5613694ab070): GLEW could not be initialized.

Any idea why?

This glxinfo is still incorrect. You need to fix that first.

Here is how it should look, even over ssh :

DISPLAY=:0 glxinfo
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro K620/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 390.116
OpenGL core profile shading language version string: 4.60 NVIDIA