sudo mkdir -p /etc/X11/xorg.conf.d
echo 'Section "Device"
Identifier    "Default Device"
Driver        "nvidia"
Option        "NoLogo"    "True"
Option        "ModeValidation" "NoTotalSizeCheck"
EndSection' | sudo tee /etc/X11/xorg.conf.d/20-nvidia.conf
sudo apt install -y nvidia-340