X11 Forwarding an OpenGL Application Between NVIDIA and AMD Cards

openglsshx11

I'm interested in forwarding an X11 session over SSH, in order to launch a remote process that utilizes OpenGL (specifically, gazebo for anyone familiar.)

The problem that I seem to be running into is that gazebo crashes due to a mismatch in the graphics cards; it can't find "NV-GLX" extensions. The exact error output:

Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
Xlib:  extension "NV-GLX" missing on display "localhost:10.0".
X Error of failed request:  GLXUnsupportedPrivateRequest
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  16 (X_GLXVendorPrivate)
  Serial number of failed request:  24
  Current serial number in output stream:  25

The remote machine is running with an NVIDIA card, and my local machine is using an AMD card.

I've tested X11 forwarding of gazebo between two machines with NVIDIA cards. It works just fine.

As near as I can tell, it seems that one of three things are happening:

  1. I'm doing something wrong,
  2. What I want to do is impossible,
  3. Gazebo doesn't build in an agnostic manner with branching codepaths for different hardware; whatever your system looks like when it builds is what you get.

The remote machine is running Ubuntu and my local machine is a Mac running 10.8.2; I already know that I have x11 forwarding set up properly for normal use as I can get things like xclock to open up in XQuartz just fine. The solution (if it exists) would also preferably work for other OS's including Windows over WinSCP.

Best Answer

A few notes from the GLX Wikipedia article:

GLX [is] An extension of the X protocol, which allows the client (the OpenGL application) to send 3D rendering commands to the X server (the software responsible for the display). The client and server software may run on different computers.

and

If client and server are running on the same computer and an accelerated 3D graphics card using a suitable driver is available, the former two components can be bypassed by DRI. In this case, the client application is then allowed to directly access the video hardware through several API layers.

I believe the fist point answers your question about whether this is possible or not: it should certainly be possible. The second may provide an explanation for why your client program insists on using features of its local X server (the NV GLX driver) -- perhaps it thinks that localhost:10.0 is the same computer, and so attempted a direction connection.

Things to try:

  1. Instead of gazebo, try glxdemo.
  2. If possible, get the two computers on the same network, and take ssh out of the picture
  3. The big gun: strace your gazebo invocation, and figure out why it's loading nv-glx

Good luck!

Related Question