SSH from my Mac into Ubuntu: X forwarding not working correctly?

6,899

Solution 1

This appears to be a problem with XQuartz. Apparently they are severely understaffed, and don't have barely enough time to keep the project on life-support. If you are also facing this issue, try reverting back to XQuartz 2.7.8, as that worked for someone in the bug report.

Your other options could be to use VNC, as Amias Channer suggested.

https://bugs.freedesktop.org/show_bug.cgi?id=93953#c6

As per the lead developer for XQuartz:

Given that the issue is with indirect rendering, it is either a change in xorg-server in XQuartz or a change in libGL or the X11 stack on the remote system. My hunch is that the remote libGL changed and possibly something in XQuartz's IGLX support changed. If you can try running older versions of XQuartz to see if it works with an older version of XQuartz, that might point to a change that could be made to get this working again. Although as I mentioned, IGLX is on life support in general, not just in XQuartz.

And:

Yeah, as I mentioned in the bug report, there's not much chance of things like this getting fixed soon because there aren't many people working on the project. I have maybe 2-3 hours every month or so, which is about just enough time to pull in security fixes, do some testing, and send out an update. Adding support for OpenGL Core in our direct rendering path is more work than I can sign up for. What you are asking for is adding it to the indirect rendering path, and that's even less likely to ever happen. Xorg is actively deprecating AIGLX and even removing it from the default configuration, so I suspect the solution there will be to just remove support for AIGLX completely.

Solution 2

NV-GLX suggests it is looking for NVIDIA OpenGL acceleration

Which would mean the ubuntu machine is trying to find 3D acceleration for its desktop.

It looks like that won't work via remote display ssh X forwarding for those applications.

You need to use something like RDP or VNC to display the image after the acceleration has happend.

Share:
6,899

Related videos on Youtube

reas0n
Author by

reas0n

Neuroimaging, and machine learning

Updated on September 18, 2022

Comments

  • reas0n
    reas0n over 1 year

    Running a Mac Pro, OS X El Capitan 10.11.4 With ATI Radeon Graphics card, and XQuartz v 2.7.9

    I am able to run qdec and freeview perfectly fine on my machine. The problem comes when I attempt to SSH into an Ubuntu 12.04 (Nvidia GeForce GTX 650) machine and use these programs (it used to work fine, but I am wondering if something in our configuration has changed now)

    I get the following errors after ssh into the Ubuntu machine.

    [myuser@ubuntu-machine:~] freeview
    Xlib: extension "NV-GLX" missing on display "localhost:10.0". 
    X Error: BadValue (integer parameter out of range for operation) 2
    Extension:    150 (Uknown extension)
    Minor opcode: 3 (Unknown request)
    Resource id:  0x0
    Abort         (core dumped)
    
    [myuser@ubuntu-machine:~] qdec
    Xlib: extension "NV-GLX" missing on display "localhost:10.0".
    X Error of failed request:  BadValue (integer parameter out of range for operation)
    Major opcode of failed request:  150 (GLX)
    Minor opcode of failed request:  3 (X_GLXCreateContext)
    Value in failed request:  0x0
    Serial number of failed request:  1504
    Current serial number in output stream:  1505
    

    Based on my limited knowledge, It seems likely to be a problem with X / SSH, and the graphics card, but I am unsure on how to proceed from here. If anyone has any ideas on how to overcome this, I would be incredibly grateful!

    The Ubuntu machine itself also has a monitor, and can run qdec and freeview fine locally, with no problems. the issue seems to happen over SSH. Some programs on the Ubuntu machine will work correctly this way (but they complain loudly in the background terminal about X)

    The Mac recently updated XQuartz but I am not entirely sure if this problem was happening before the update or not.

    We attempted ssh -y but this returns the same error.

    We also export LIBGL_ALWAYS_INDIRECT=1 after SSH into the Ubuntu machine, but still get the same error.

    The official question: What do these errors mean, and how can I attempt a fix?

    • Admin
      Admin almost 8 years
    • Admin
      Admin almost 8 years
      Also see discussions.apple.com/thread/135423?start=0&tstart=0 Could you please try replacing the ssh -X command from the mac with an ssh -Y command and let us know what happens?
    • reas0n
      reas0n almost 8 years
      Nick, thanks, I already saw that question and I also think this could be related. I am using glxdemo for testing, it also does not run via ssh on Mac. We also tried ssh -Y but got the same error. I tried strace glxdemo &> glx.log but cat glx.log | grep nv-glx gives nothing
    • reas0n
      reas0n almost 8 years
      quite frankly I have no idea what to look for with strace
    • Amias
      Amias almost 8 years
      a good way to filter strace output is to add -e open , this will make it show you only files it opens . You might also want to ensure your grep is case insensitive with a -i option.
    • reas0n
      reas0n almost 8 years
    • anonymous
      anonymous over 7 years
      2.7.11 is out now but it, too gives me "X Error: BadValue (integer parameter out of range for operation) 2; Extension: 149 (Uknown extension); Minor opcode: 3 (Unknown request); Resource id: 0x0" e.g. with ParaView.
  • reas0n
    reas0n almost 8 years
    But it was working before...
  • Amias
    Amias almost 8 years
    so your configuration change has disabled the NVIDIA acceleration. My guess is it has reverted to the Nouveau driver. Have a look at your xorg.0.log (sometimes the number is differnet , check the dates on the file) to see what driver xorg is actually using.
  • anonymous
    anonymous over 7 years
    I can confirm that going back to 2.7.8 (don't forget to log out and log in again!) fixes this.
  • Patrick Sanan
    Patrick Sanan over 6 years
    Likewise (and many thanks - I can't believe that this issue was actually resolved in 5 minutes by googling it..)