SSH -X Login doesnt display glxgears, glxinfo doesnt start too. other opengl work neither

Hello folks,

since 2 days iam sitting here and installing our new workstation…

Linux 4.4.0-53-generic #74-Ubuntu x64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04.1
nvidia-367.57
NVIDIA GTX970 (2x (no SLI) )

My Problems:
Iam remotely logged in to my workstation and want to start some openGL apps like QTcreator or glxgears for testing. It works well until i install the nvidia driver. After the installation of nvidia-367 from the official ubuntu ppa i cant start OPENGL apps via ssh.
Xforwarding is set to yes in ssh*_config file

$ ssh -X user@host
$ glxgears
ERROR: couldn't get an RGB, Double-buffered visual
$ glxinfo
name of display: localhost:10.0
ERROR: couldn't find RGB GLX visual or fbconfig
$ glewinfo 
ERROR: glewCreateContext failed
$ qtcreator
Coult not initialize GLX
Aborted (core dumped)

This apps work fine if i sit physically at the workstation
glewinfo: https://paste.ubuntu.com/23658092/
glxinfo: https://paste.ubuntu.com/23658099/

I tried many solutions:
Added iglx to:
/usr/share/lightdm/lightdm.conf.d/50-xserver-command.confq

[Seat:*]
# Dump core
xserver-command=X -core +iglx

#Section "ServerFlags"
#Option "AllowIndirectGLX" "on"
#EndSection

or:
$ssh -Y user@HOST

or:

nvidia-352/340/304/331/361
every driver has the same problems.

I want to login via Xming and Putty too (Windows7) and iam restricted to use those apps under windows.

Sometimes qtcreator worked if i started it with:

qtcreator -noload Welcome
or:
qtcreator -noload Welcome -noload QmlProfile -noload QmlDesigner
but this doesnt work anymore…

My understanding of X11forwarding is that when iam logged in via ssh the Xserver(workstation) sends opengl commands to my client. Those commands are rendered with the client opengl libraries. The +iglx commands sets the rendering to my workstation and sends the output to the tunnel?

I dont have another pc with nvidia, so i cant check if it would work under nvidiaenvironment.

Another idea i have is that i create a seat for ssh where i let them use my intelonboard chip?

I hope you can help me :-)
Kind Regards
Mirko

EDIT:
Xorg Log
https://paste.ubuntu.com/23658810/

EDIT2:

FYI: xclock works

I registered only to tell you I have the same problem. Falling back to nvidia-current in Ubuntu restored the expected behavior, but without hardware acceleration (I.E. no CUDA devices available and no GLSL rendering). I tried to force indirect rendering setting environment variables, but that didn’t work either.

Hoping for some answers.

Happy hollidays

Same problem here.
ssh-ing from a Macbook Air to workstations running linux CEntOS 6 or CEntOS 7 with the latest nVIDIA drivers. It used to work, maybe an update broke it?

I have the exact same issue on ubuntu 14.0.4
GL_VERSION = 4.5.0 NVIDIA 367.57

glxinfo works on physical desktop
but failed in X forwards client (using ssh -X)
it still failed even after ‘export LIBGL_ALWAYS_INDIRECT=y’

xclock or xeyes work fine in X forwards client

client env:

  1. Windows 7 + MobaXterm + ssh -X, OpenGL version string: 1.4 (2.1 Mesa 10.5.4)
  2. Mac OSX + ssh -X, OpenGL 2.1 INTEL-10.14.73, Intel HD Graphics 5000, OpenGL shading language 1.20

Please help it.

I partially solved it by uninstalling nvidia ppa drivers (sudo apt-get purge nvidia*), blacklisting nouveau and installing the drivers from the binary download. But now my xserver crashes without giving me an explanation (I’m using Xming, but i tried MobaXterm and cygwin 1.4 and 1.6 X servers).

Hello,

thanks for the replies. Its nice to know that we’re not alone :-)

I started to switch between nouveau and nvidia. Whenever i need nvidia i switch to it…

Maybe my idea of creating seperate seats for ssh and physical users is a solution?

if ( ssh Login)
{
use nouveau driver only for the ssh seat
}
else // physical
{
use nvidia driver only for the phys. seat
}

Maybe s1 could help me with the solution?

Kind regards
Mirko

You could try tunning the following (I found it somewhere else). Instead of looking for vendor identifiers you could make a statement if for the DISPLAY variable (which is only set in ssh sessions, if i recall correctly). Sava as a .conf and in the /etc/init/ folder.

#!/bin/bash
# Vendor identifiers
nvidia=\"10de\"
vmware=\"15ad\"

# Detect NVIDIA driver
nvidia_driver=`dpkg --get-selections | awk '/nvidia-[0-9]+\t+install/ { print $1
 }'`

# Detect PCI bus ID
vga_bus_id=`lspci | awk '/VGA/ { print $1 }'`

# Detect VGA vendor identifier
vga_vendor=$(lspci -nm | awk "/$vga_bus_id/ { print \$3 }")

if [ $vga_vendor == $nvidia ]; then
   # Configure for nvidia GLX via update-alternatives
   update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/${nvidia_driver}/al
t_ld.so.conf
   update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/${nvidia_driver}/a
lt_ld.so.conf
   update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/${nvidia_driver}/
ld.so.conf
   update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/${nvidia_driver}
/ld.so.conf
elif [ $vga_vendor == $vmware ]; then
   # Configure for mesa GLX via update-alternatives
   update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa
/ld.so.conf
   update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/i386-linux-gnu/mes
a-egl/ld.so.conf
   update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/
mesa/ld.so.conf
   update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/x86_64-linux-gnu
/mesa-egl/ld.so.conf
else
   # Configure for mesa GLX via update-alternatives
   update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa
/ld.so.conf
   update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/i386-linux-gnu/mes
a-egl/ld.so.conf
   update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/
mesa/ld.so.conf
   update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/x86_64-linux-gnu
/mesa-egl/ld.so.conf
fi
ldconfig