3

I am trying to open a VTK render on a local machine through ssh. I am using pyvista to make the render, which is being run from a python script on a remote machine.

Local machine (where I want to see the render): MacOS Catalina 10.15

Remote machine: Ubuntu 18.04

To run the script I first ssh into the remote machine and then run, i.e.

ssh -Y <username>@remotehost.com
python script.py

However when I run this I get the following error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR:root: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.
[1]    21692 segmentation fault (core dumped)  python script.py

Based on several posts online I have tried the following setting:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

On MacOS I have installed mesa==20.0.2 and mesalib-glw==8.0.0

The issue appears to be that MacOS is using OpenGL==2.1, but should instead be using version 3.2+. This is confirmed with I run:

$ glxinfo|grep OpenGL

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon Pro 560X OpenGL Engine
OpenGL version string: 2.1 ATI-3.8.24
OpenGL shading language version string: 1.20
OpenGL extensions:

How can I get MacOS to run the VTK window over ssh? I The script runs fine if I run it locally. Also, it runs fine if I run it on the remote only. It's only when I try to run it remotely and view in locally I have this issue. Is it a matter of either changing the default OpenGL version or upgrading somehow?

D.Griffiths
  • 2,248
  • 3
  • 16
  • 30
  • 1
    "How can I get MacOS to run the VTK window over ssh?" You can't. If you use X forwarding, _direct rendering_ can't be used, and indirect rendering is only supported for OpenGL up to 1.4 or something similarly outdated. You might have much better luck using some remote desktop protocol to just transmit the locally-rendered picktures. – derhass Mar 29 '20 at 17:55
  • Ah annoying. I have come across [VirtualGL](https://virtualgl.org/) do you know if this is a possible work around? – D.Griffiths Mar 29 '20 at 19:41

1 Answers1

2

I solved this using VirtualGL.

VirtualGL server works for Ubuntu 18.04 and VirtualGL client for MacOS Catalina (10.15.4).

D.Griffiths
  • 2,248
  • 3
  • 16
  • 30