My successful story in setting up NVIDIA driver on g4dn.xlarge ubuntu (AWS) / connecting via nomachine (remote desktop)

Hi

I would like to share my experience in installing a “shadow pc” with ubuntu 18.04 as guest OS.

You’re interested in this I will tell you more.

Here is my successful recipe :

on the aws server:

sudo apt update

wait two minutes after the end of the update

sudo apt install pulseaudio pavucontrol ubuntu-desktop mate mesa-utils glmark2 libopenal1
sudo passwd ubuntu
sudo apt upgrade
wget https://download.nomachine.com/free/linux/64/deb -O nomachine.deb
sudo apt install ./nomachine.deb
sudo ubuntu-drivers autoinstall
sudo reboot

sudo apt install lightdm
sudo reboot

sudo systemctl get-default
sudo systemctl isolate graphical.target
sudo reboot

on my PC

Launch nomachine client and point it to the instance Public IP

via the nomachine client

ps aux | grep X | grep -v grep
glxinfo | grep -i “opengl.*version”
sudo nvidia-xconfig --preserve-busid --enable-all-gpus
sudo systemctl isolate multi-user.target
sudo systemctl isolate graphical.target
sudo reboot

Here you should have a fully fonctionnal Ubuntu gaming PC

glxinfo | grep -i “opengl.*version”
ubuntu@ip-172-31-10-147:~$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
12969 frames in 5.0 seconds = 2592.448 FPS
13946 frames in 5.0 seconds = 2788.973 FPS
13696 frames in 5.0 seconds = 2739.193 FPS

glmark2 Score: 2399

When I change the remote software from Nomachine to DVC.

On aws you can find a customized template :
“Ubuntu 18.04 LTS Desktop with NICE DCV (GPU Gaming Driver)”

I got twice more FPS.

Unbelievable !