Ubuntu - GPU - NVIDIA GPU - Setup - Setup using a PPA Repository

Add the repository:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

Then check all the devices and drivers.

sudo ubuntu-drivers devices

Optionally, choose to auto detect and install all the device drivers

sudo ubuntu-drivers autoinstall

or, install any specific driver:

sudo apt install nvidia-driver-470

Restart the system

sudo init 6