8

I've ordered a dedicated (headless) server with an nvidia GeForce GT 710B GPU at ikoula (offsite data center). Now I am trying to get a full blown desktop gui to run on it so I can actually run what I want to run on it (streaming an AI learning a task using OBS). I got a desktop with TightVNC but it doesn't have access to the GPU using that method and thus OBS will not start.
xrdb installs and I can get a login window but when I login I simply get the default blue screen. (see images)

I have created a virtual monitor using the following command:

sudo nvidia-xconfig -a --allow-empty-initial-configuration \
--use-display-device="DFP-0" --connected-monitor="DFP-0" \
--custom-edid="DFP-0:/home/$USER/edid.txt"

and I am able to run startx without problem I just can't seem to login to a desktop.

my current /etc/X11/xorg.conf file generated from the above code: http://paste.ubuntu.com/p/HdWpJfzPvx/

I tried logging in onto root and I got a desktop. So somehow in my config I get a desktop for root but not for other users...

Ps. a monitor emulator plug is "not possible in my price range"

edit: it runs sometimes but it is very random. Does ANYONE know a proper way to boot mate or xfce4 on a remote ubuntu server with xrdp??? It just doesn't seem to work for me....

enter image description here enter image description here enter image description here

Edit: I really need help with this guys......I am about to just delete everything and leave it. I had it working yesterday but it seems to be really really inconsistent. I had it working on display :11.0 but now I can't even get it to open a display....

If anyone can get this to work I'll be eternally grateful.

/var/log/Xorg.0.log
/var/log/Xorg.1.log
/var/log/xrdp.log
/var/log/xrdp-sesman.log
/etc/X11/xorg.conf
/etc/xrdp/startwm.sh

What it currently does when I connect to xrdp and login is hang for 20 seconds and then I am back to the login screen. If you require more data let me know. enter image description here

Edit: tried x2go as suggested but got this error: enter image description here

Akisame
  • 3,313
  • 7
  • 32
  • 63
  • If you need a desktop experience, I'd suggest you look into x2go. It's basically the linux equivalent of RDP. – Robert Riedl Feb 21 '19 at 15:23
  • I need a desktop experience that also allows me to use the gpu. does x2go do this? – Akisame Feb 21 '19 at 16:29
  • x2go also does not work. – Akisame Feb 21 '19 at 18:16
  • "to use the gpu" - can you elaborate on that ? do you want to use CUDA ? or render stuff ? or game ? – Robert Riedl Feb 21 '19 at 18:18
  • to render stuff – Akisame Feb 21 '19 at 18:19
  • In normal desktops the GPU is connected to a physical monitor. The GPU queries the monitor and gets the maximum resolution it can support and you get a desktop displayed correctly. In your case the GPU does not get any feedback from the monitor that is not there. You may have to look at Add fake display when no monitor is plugged in. – user68186 Feb 21 '19 at 18:21
  • 1
    okay, if you want to use blender or something similar, it won't matter if you use vnc/x11/etc.. it would be best if you add this to your original question. – Robert Riedl Feb 21 '19 at 18:22
  • I want to use OBS to stream an AI that is working on a problem but that does require some interaction with a display. ea: record what is happening with the program @user68186 I already tried that. I need a monitor connected to nvidia and not to intel to use the gpu – Akisame Feb 21 '19 at 18:26
  • I got one step in the right direction now. It no longer hangs when I try to log in but it now shows me a black screen and crashes the RDP – Akisame Feb 21 '19 at 18:28
  • are you running X directly without a login manager? if so, you would most likely have permission issues. The normal user you try to log in with would have no access to the X session. – Anders F. U. Kiær Feb 21 '19 at 23:17
  • It did run though. I figure that my current problem is that I am missing an EDID file to trick the system into thinking that I have a monitor attached – Akisame Feb 22 '19 at 15:15
  • Related: https://askubuntu.com/questions/457850/x-server-doesnt-work-on-ubuntu-14-04-what-may-be-happening – ComputerScientist Apr 29 '20 at 18:07
  • a dummy headless monitor plug costs about $5 on amazon these days – richardwhatever May 15 '21 at 21:50
  • This is on a remote server in another country that I do not have physical access to.....They charge an insane amount for a dummy headless monitor plug. Otherwise I would have grabbed a random hdmi to vga adapter I have laying around here and build my own dummy plug – Akisame May 17 '21 at 10:51

4 Answers4

5

I fixed it.

I supplied a EDID file from https://github.com/linuxhw/EDID/tree/master/Digital/Nvidia I configured Xorg using this nvidia-xconfig line:

sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device=None \
--virtual=1920x1200 --busid {busid} --use-display-device="DFP-0" \ 
--connected-monitor="DFP-0" --custom-edid="DFP-0:/etc/X11/edid.txt"

Where busid = gpu bus id

After that simply start x sudo startx and login.

later on I found that TurboVNC works a bit more stable. I installed VirtualGL and TurboVNC

made sure to forward the gpu to the VNC session and ran this:

sudo dpkg -i virtualgl_*.deb
sudo -i
/opt/VirtualGL/bin/vglserver_config

rmmod nvidia-nomode
rmmod nvidia-nvm
rmmod nvidia
reboot
xauth merge /etc/opt/VirtualGL/vgl_xauth_key
sudo dpkg -i turbovnc_*.deb
/opt/TurboVNC/bin/vncserver -geometry 1920x1080

Final xorg.conf

Akisame
  • 3,313
  • 7
  • 32
  • 63
  • edid.txt example is here. https://superuser.com/questions/1278256/x-server-on-nvidia-card-with-no-screen/1278264#1278264 – kirin Aug 29 '19 at 13:40
  • And this will cause 10 seconds delay on establishing VNC connection. It can be fix with these commands here. https://askubuntu.com/a/1169491/379641 – kirin Aug 30 '19 at 01:06
  • I see no such pause when I establish my VNC connection. (Btw. This has been running stably since February and my config even survived a server migration) – Akisame Aug 30 '19 at 10:14
1

I had similar problems in the past. I don't know the exact solution to you're specific problem but these might help you.

  • Install the desktop version of Linux. You can always change the systemd default boot target to prevent the GUI on the host server. You don't need a running graphical gui on the host server to use XRDP.
  • Always make sure you fully logged out before connecting via XRDP, maybe consider creating an additional user only for XRDP. It's not like Windows where you can steal a session.
  • You might need to create a .Xauthority file in the users home directory (I'm not sure about this one)
  • If you have on-board graphics, use these first to configure XRDP, When this is stable. You can make the change to the other GPU. As far as I can see, the problems you have now are not GPU related.
  • In your log files. I see often following message Cannot read private key file /etc/xrdp/key.pem: Permission denied You should check the permissions on that key.pem file. I've looked on my system and this permissions should work.

     User@UbuntuUEFI:~$ ls -la /etc/xrdp/key*
     lrwxrwxrwx 1 root root 38 Feb 24 18:47 /etc/xrdp/key.pem -> /etc/ssl/private/ssl-cert-snakeoil.key
     User@UbuntuUEFI:~$ ls -la  /etc/ssl/certs/ssl-cert*
     -rw-r--r-- 1 root root 1070 Feb 11 11:35 /etc/ssl/certs/ssl-cert-snakeoil.pem
     User@UbuntuUEFI:~$
    
  • In some cases it helps to try it first on a local virtual machine before using remote hardware. It could help you find the problem.

pim
  • 3,280
  • I'm sorry but I am on a remote server hosted in a data center. I can't simply install any OS I want on this. – Akisame Feb 25 '19 at 15:03
  • You have given the most reasonable answer so far so I decided to not let the 200 points go to waste and give them to you – Akisame Feb 25 '19 at 15:35
0

Try x forwarding over ssh.

ssh -X user@host gnome-session
or
ssh -Y user@host gnome-session

If you still get blank background on remote server, ssh and install sudo apt-get install gnome-desktop or other preferred desktop.

LeonidMew
  • 2,734
  • 1
  • 21
  • 38
0

Xrdp will default to a basic xwindows session that will be different from the installed xwindows shell you already have and most times will run in a different x display like X1 not X0. By logging to xrdp you can launch a proper window manager like gnome-session or openbox but it will limit a lot of your xwindows things you can do correct. You can also fix an .xinitrc script to launch a terminal or launch a session manager like gnome-session. For me it would be better to install the group desktop environement if you already dont have, and then install a vnc root console tool to connect to the X:0 (x console) on the system. This will connect you to the default graphical interface of the ubuntu and will have better support overall. Alternative you have to tweak xrdp to connect vino the default vnc of the ubuntu like in this answer:

Use xrdp to connect to desktop session

Panos
  • 1