Headless Remote Server Setup

Hi All,
I currently have setup a server with dual GTX 1080TI Duke cards that will be used for remote visualization. These cards are hooked up to an Asus rs924a-e6/rs8 which has an onboard video card (Aspeed AST2050). The operating system is Linux Mint 18.1 using LightDM as the display manager. I have setup TurboVNC/VirtualGL and the latest Nvidia 384.59 drivers for the cards.The issue lies when I ssh -X onto the server and try testing the setup by using:
name of display: localhost:10.0
Error: couldn’t find RGB GLX visual or fbconfig
Error: couldn’t get an RGB, Double-buffered visual

Any possible ideas on how I can solve this issue? If you need any more information please ask!
Thank you so much!
Marshall Stageberg
Michigan State University

Can you please run nvidia-bug-report.sh and attach the nvidia-bug-report.log.gz file? My guess here is that X is using your onboard graphics. You probably need to configure it to use one or both of the NVIDIA cards instead.

If you want one X server with a headless screen on each GPU, you can do that with “sudo nvidia-xconfig --enable-all-gpus --use-display-device=none”.

Hi Aaron,
Attached is the log you had requested. Am I able to have 1 X-server be able to utilize both video cards?

Thank you very much for your quick response!

Marshall Stageberg
Michigan State University
nvidia-bug-report.log.gz (216 KB)

Hi Marshall,

It looks like your X server is seeing both GPUs but failing to start because there are no connected displays:

[    21.329] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0. 
[    21.329] (EE) NVIDIA(0):     Set AllowEmptyInitialConfiguration if you want the server
[    21.329] (EE) NVIDIA(0):     to start anyway
[    21.329] (EE) NVIDIA(0): Failing initialization of X screen 0


sudo nvidia-xconfig --use-display-device=none

should fix that up. Sorry I forgot to include that in my previous post. I edited it to add that but you probably saw it before the edit.

Once the X server is running, you can run applications on the first GPU by using DISPLAY=:0.0 and on the second one by using DISPLAY=:0.1.

There are some buggy applications that only work on screen 0. If that happens you might be able to run separate X servers simultaneously instead, but that’s not really an officially supported configuration so try it this way first.

Hi Aaron,
After setting the nvidia-xconfig command (the first full command from the first post) and making sure that DISPLAY=:0.0 or :0.1. I now get a different error that is as follows:
Invalid MIT-MAGIC-COOKIE-1 keyError: unable to open display :0.0

Thank you for your time and patience,
Marshall Stageberg
Michigan State University

How did you start the X server? Was it started with the -auth parameter? You’ll need to set XAUTHORITY to point to the xauth file if so.

To start the X server I am just using the command vncserver no extensions beyond that. If I use -auth what file should I have it point to? The .XAUTHORITY in my home directory or is there a different one it should be pointing to? Should I be using any other options?
Thank you!
Marshall Stageberg
Michigan State University

You should point XAUTHORITY at whatever was passed to the server via the -auth parameter. If you’re not starting it with a -auth parameter then I’m surprised you got an MIT-MAGIC-COOKIE-1 error.

What do you get if you run “ps aux | grep X”?

When typing the command you asked for server side I get:
root 1806 0.0 0.0 165260 58012 tty7 Ss+ 15:39 0:00 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
marshall 2686 0.0 0.0 14224 948 pts/6 S+ 15:58 0:00 grep --color=auto X

When I type that within the vncviewer when connected server side I get:

root 1806 0.0 0.0 165260 58012 tty7 Ss+ 15:39 0:00 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
marshall 2724 6.0 0.0 117456 67140 pts/6 S 16:01 0:09 /opt/TurboVNC/bin/Xvnc :1 -desktop TurboVNC: eamc162:1 (marshall) -httpd /opt/TurboVNC/bin//…/java -auth /home/marshall/.Xauthority -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/marshall/.vnc/passwd -x509cert /home/marshall/.vnc/x509_cert.pem -x509key /home/marshall/.vnc/x509_private.pem -rfbport 5901 -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1 -deferupdate 1 -auth /home/marshall/.Xauthority
marshall 3220 11.8 0.0 103252 50212 pts/6 S 16:03 0:02 /opt/TurboVNC/bin/Xvnc :2 -desktop TurboVNC: eamc162:2 (marshall) -httpd /opt/TurboVNC/bin//…/java -auth /home/marshall/.Xauthority -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/marshall/.vnc/passwd -x509cert /home/marshall/.vnc/x509_cert.pem -x509key /home/marshall/.vnc/x509_private.pem -rfbport 5902 -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1 -deferupdate 1
marshall 3619 0.0 0.0 14224 944 pts/7 S+ 16:03 0:00 grep --color=auto X

Hopefully that helps.
Thank you,
Marshall Stageberg
Michigan State University

It looks like you’re starting Xvnc and connecting to that rather than connecting to your GPU-accelerated X server. If you want to attach to an existing X server, you’ll need to use something like x11vnc instead of starting Xvnc. Xvnc acts as its own unaccelerated X server.

Oh wait, are you using the Xvnc session just to launch the applications that connect to your real X server? If so, you probably don’t want to use lightdm since it’ll try to control the X screens to display the login prompt. But if you want to try it, you’ll need to set

export DISPLAY=:0.0
export XAUTHORITY=/var/run/lightdm/root/:0

in order to use lightdm’s xauth file instead of the one for your Xvnc session.

I was told by the devs of VirtualGL/TurboVNC that I had to use a display manager other than the default MDM (Mint Display Manager) because there are bugs within VGL/TVNC that they have yet to fix to have it work with that.
I wish I had more experience with trying to forward an x-window. I am trying to run a program called VAPOR (meteorologic visualization program), that runs perfectly if I connect a monitor to the server and run it from the monitor locally but the server sits in a cold room. The creators of the software use TurboVNC to run their application on a daily basis so I know it works, Its just a matter of getting to work with my exact setup. What I was told was to ssh onto the server and launch vncserver (once I launch vncserver I get this:

Desktop ‘TurboVNC: eamc162:1 (marshall)’ started on display eamc162:1
Starting applications specified in /home/marshall/.vnc/xstartup.turbovnc
Log file is /home/marshall/.vnc/eamc162:1.log

so that way it sets up the the server for allowing the forwarding of the xwindow. I then open a new terminal and use vncviewer to connect through that set connection to have a virtual desktop come up.

When using the command: vncserver -auth XAUTHORITY (with XAUTHORITY=/var/run/lightdm/root/:0)
I get:
xauth: timeout in locking authority file /var/run/lightdm/root/:0
Desktop ‘TurboVNC: eamc162:3 (marshall)’ started on display eamc162:1
Starting applications specified in /home/marshall/.vnc/xstartup.turbovnc
Log file is /home/marshall/.vnc/eamc162:1.log

I’m not familiar with how TurboVNC or VirtualGL work, sorry. It kind of sounds like you just want to run a bare X server with something like “Xorg -noreset” and connect your client to that.

Your “vncserver” command is starting another X server using Xvnc, which won’t be accelerated. You’re trying to have it share an authority file with the Xorg X server launched by lightdm, which I guess doesn’t work.

When connecting to an X server you have to set XAUTHORITY to point to it the file passed to -auth for that particular server. I.e., XAUTHORITY=/var/run/lightdm/root/:0 when connecting to Xorg.

All I want to do is try to forward an X-window across a network so I am able to use the GUI from my visualization software. If you know of a better way or a different way to try it i’d be more than happy to do so.
Thank you,
Marshall Stageberg
Michigan State University

So I installed the Nvidia drivers using --no-opengl-files --no-x-check --disable-nouveau extentions and didn’t allow Nvidia to to run the xsettings towards the end. I now get glxgears/glxinfo through the ssh -X window and can get my visualization software to run however it refuses to use the nvidia video cards. Clearly this is a conflict between the cards and the onboard aspeed video controller. Is there a way to get them to communicate with each other effectively?

Thank you,
Marshall Stageberg

It is not fully clear what you’re trying to achieve, especially with the second GTX. But it’s clear that you’re trying too many things at once.
If you’re installing --without-opengl-files, you don’t get hardware accel, it’s probably falling back to software rendering. Why don’t you start simple and use x11vnc, as aplattner mentioned.
Steps should be:
-install the nvidia driver on the server just normally.
-create xorg.conf
-install x11vnc
-disable the display-manager so that no Xserver is started. (systemctl stop/disable display-manager)
-login over ssh
-there, create ~/.xinitrc file containing

x11vnc &
xterm &
exec /path/to/yourapplication

then you should be able to connect using vnc from your desktop, you should see your application and a terminal on a bare xserver.
then confine xorg.conf/x11vnc command line (Password!!)->https://serverfault.com/questions/174003/how-can-opengl-graphics-be-displayed-remotely-using-vnc

Hi Marshall,

You should accomplish what you’re looking for by creating a virtual display using nvidia-xconfig.
See the instructions as provided here: https://virtualgl.org/Documentation/HeadlessNV

Hope it works for you!