Ssh – OpenGL rendering with X11 forwarding

openglsshx11

I am trying to run an executable on a remote server, to which I connect via ssh -Y. I think the executable uses openGL

The server runs Ubuntu and the local system runs OSX.

ssh -Y normally opens a display on my local machine by X11. This works well with other applications (firefox, matlab etc..)

This time I get the message:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  35
  Current serial number in output stream:  34
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  34
  Current serial number in output stream:  35

I also ran glxinfo (I was trying things I found on forums) and got this

name of display: localhost:11.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  23
  Current serial number in output stream:  22

Could someone help with this?

Thank you!

Best Answer

I got this sorta working on Mac OS Mojave with using defaults; write org.macports.X11 enable_iglx -bool true in a terminal app, then run Xquartz +extension GLX` in the same terminal.

Then I am able to run glxgears and get rastering working, but it throws the display into the top left corner of my external monitor (instead of default/retina display) and doesn't draw any frames to resize/move it.

It kinda reminds me of crappy driver support I had with Nvidia graphics cards and trying to run a Linux desktop in 1990's :)

I looked up on freedesktop.org bug repo and it doesn't appear Retina displays are supported by Xquartz/X11 yet. There is a few hacks, but this reminds me of how clunky it was to run Wireshark a few years back inside XQuartz on my Mac. I just want to get X11 forwarding working right, where it doesn't take ~3 to 5 minutes to redraw frames. See https://gitlab.freedesktop.org/xorg/xserver/-/issues/187

Related Question