headless ubuntu server with desktop gui with working gpu
Solution 1
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
Solution 2
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.
Related videos on Youtube
Akisame
Updated on September 18, 2022Comments
-
Akisame over 1 year
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....
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.shWhat 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.
-
Robert Riedl about 5 yearsIf you need a desktop experience, I'd suggest you look into
x2go
. It's basically the linux equivalent of RDP. -
Akisame about 5 yearsI need a desktop experience that also allows me to use the gpu. does x2go do this?
-
Akisame about 5 yearsx2go also does not work.
-
Robert Riedl about 5 years"to use the gpu" - can you elaborate on that ? do you want to use CUDA ? or render stuff ? or game ?
-
Akisame about 5 yearsto render stuff
-
user68186 about 5 yearsIn 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.
-
Robert Riedl about 5 yearsokay, 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. -
Akisame about 5 yearsI 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 about 5 yearsI 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
-
Anders F. U. Kiær about 5 yearsare 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.
-
Akisame about 5 yearsIt 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
-
ComputerScientist about 4 yearsRelated: askubuntu.com/questions/457850/…
-
richardwhatever almost 3 yearsa dummy headless monitor plug costs about $5 on amazon these days
-
Akisame almost 3 yearsThis 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
-
-
Robert Riedl about 5 yearsFYI: x forwarding is notoriously bad for performance (input lag, etc)
-
Akisame about 5 yearsI'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 about 5 yearsYou 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
-
fx-kirin over 4 yearsedid.txt example is here. superuser.com/questions/1278256/…
-
fx-kirin over 4 yearsAnd this will cause 10 seconds delay on establishing VNC connection. It can be fix with these commands here. askubuntu.com/a/1169491/379641
-
Akisame over 4 yearsI 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)