How to Install/Upgrade NVIDIA 510.xx Drivers on Ubuntu 20.04 LTS

Most modern Linux Desktop systems like Ubuntu have an NVIDIA driver pre-installed in the Nouveau open-source graphics device driver for Nvidia video cards. For the most part, this is acceptable; however, if you are using your Linux system for graphical design or gaming, you may get better drivers.

Historically, the Nouveau drivers are slower than NVIDIA’s proprietary drivers, lacking the latest graphics card hardware’s latest features, software technology, and support.

Currently, NVIDIA 510 Drivers are available to install, which bring many new features improvements to the very latest and existing supported graphic cards with better Linux Kernel support, ReBAR indicator, GBM API support, and much more.

The following tutorial will teach you to install the latest bleeding-edge 510 Nvidia Graphic Card Drivers on Ubuntu 20.04 LTS using two different installation methods.

Update Ubuntu System

Update your Ubuntu operating system to make sure all existing packages are up to date:

sudo apt update && sudo apt upgrade -y

Important Notice

The NVIDIA Properiarty Drivers only support X11 and not Wayland.

The NVIDIA 510 Graphic Card drivers have been officially released, the beta was 510.37.xx, and the release versions are now from 510.47.xx onwards.

This tutorial uses a stock standard installation of the Ubuntu 20.04 LTS Focal Fossa. Heavily modified systems may encounter issues not supported in this tutorial, nor are alternative desktops or other systems.

Determine your Graphics Card

The first step for users with aging NVIDIA Graphics cards is to determine what it is and if it is supported, users with brand new cards can skip this part as no doubt they will be supported.

First, find your graphics card module.

lspci | grep -e VGA

Example output:

03:00.0 VGA compatible controller: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)

Next, visit the supported NVIDIA GPU 510 supported chips section and verify your card is listed before moving on. For example, the tutorial uses an older GeForce GTX 1650, which is still kept in that list.

Option 1. Install NVIDIA Drivers – PPA Repo (Recommended)

The first and most straightforward method for Ubuntu users is to install the PPA Graphic Drivers, which contains the latest updates to any current support stable NVIDIA drivers. The only downside to this PPA is that it does not include beta drivers, but this is not an issue for the majority.

First, import the PPA using the following command.

sudo add-apt-repository ppa:graphics-drivers/ppa -y

Next, run an APT update.

sudo apt update

Install the NVIDIA 510.xx drivers using the following command.

sudo apt install nvidia-driver-510 -y

Once installed, reboot your PC.

sudo reboot

Once logged back in, use the following command to confirm the NVIDIA drivers are installed.


Example output:

Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Alternative Method PPA – Pop!_OS Proprietary

An alternative method can be installing Pop!_OS PPA as Ubuntu is its base, so installing packages from this PPA can be very useful and works well. Another benefit is installing other packages from this PPA, such as Discord and so on.

First, import the PPA GPG KEY.

sudo apt-key adv --keyserver --recv-keys 63C46DF0140D738961429F4E204DD8AEC33A7AFF

Next, import the PPA.

sudo add-apt-repository "deb $(lsb_release -cs) main"

Next, run an apt update.

sudo apt update

Install the NVIDIA 510 drivers as follows.

sudo apt install nvidia-driver-510 -y

For users that want to install NVIDIA 510 headless, use the following command.

sudo apt install nvidia-headless-510 -y

Option 2. Download/Install NVIDIA Drivers Manually


First, visit NVIDIA’s downloads page and download the latest .run file or get the link and use the wget command.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Example command only (make sure to get the latest link):


Install Linux Headers and compilation dependencies:

sudo apt install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config dkms -y

Next, blacklist the nouveau driver create a blacklist file:

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Once inside the file, add the following:

blacklist nouveau
options nouveau modeset=0


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Save the file CTRL+O, then exit CTRL+X. You will then need to regenerate the kernel initramfs:

sudo update-initramfs -u

Warning, you will see a possible missing firmware message now. This is ok to ignore.

Now, reboot to the multi-user run level; this means for newer users that you will reboot your system in terminal mode entirely, forgoing any graphic UI while you install your NVIDIA drivers.

sudo systemctl set-default

Reboot system.

sudo reboot now

Install NVIDIA 510 Drivers – Terminal Method

When you reboot your system, you will come to the terminal UI, log in to your account and navigate to the directory you downloaded your NVIDIA 510 .run driver package.

Next, run the following bash command to start the installation process.

Example only (your version should be different in the future):

sudo bash NVIDIA-Linux-x86_64-510.{version-number}.run


sudo bash NVIDIA-Linux-x86_64-510.*.run

If the installer detects existing installations of NVIDIA drivers, a prompt will pop up advising you to abort or remove the current drivers and install the new ones.

Select Continue installation to proceed with the removal and installation of the new drivers.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

The first installation message will allow DKMS to automatically build a new module if you install or upgrade a new module.

This is an optional choice, but it is recommended to select Yes for most users.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Next, if you want to install 32-bit compatibility, select Yes or No to proceed with the following optional prompt installation choice.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Next, you will receive another prompt asking to keep default settings for the nvidia-xconfig utility or if you would like the utility to configure the files for you automatically.

This is optional, but the recommended option for fresh installs would be Yes for unsure users.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

One last prompt will appear informing you that you have successfully installed the Nvidia Drivers package.

Select Ok to exit.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Now that the drivers are installed, you need to reboot your system but first, make sure to switch back to the graphical UI interface.

sudo systemctl set-default

Now, reboot.

sudo reboot now

Verify NVIDIA 510 Drivers

After you log back into your system, you can view the status of the graphic card with the nvidia-smi” command.


Example output:

Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Alternatively, open your Nvidia X Server GUI to confirm the driver’s build version.


Install NVIDIA 510.47.xx Drivers on Ubuntu 20.04 LTS

Option 3. Install NVIDIA Drivers – NVIDIA Repo


For users who do not want the work involved in compiling kernels and manually downloading every time an update occurs, an easier way to install the latest kernel available for your system is to import the NVIDIA repository directly.

This may not be suitable for some secure systems using third-party repositories. Still, the following steps will be reasonable for most daily desktop users that are into gaming especially.

First, import the GPG key.

sudo apt-key adv --fetch-keys

Second, import the repository for your Ubuntu 20.04 system.

sudo add-apt-repository "deb /"

Next, download the PINNING file for the drivers and move it to its location.

sudo mv /etc/apt/preferences.d/cuda-repository-pin-600

Update your APT-CACHE.

sudo apt update

Next, install the latest NVIDIA drivers which are 510 series at the time of this tutorial, using the following command.

Install NVIDIA without CUDA:

sudo apt install libglvnd-dev pkg-config dkms build-essential nvidia-driver-510 nvidia-settings nvidia-utils-510 linux-headers-$(uname -r) -y

Install NVIDIA with CUDA:

sudo apt install libglvnd-dev pkg-config dkms build-essential cuda nvidia-driver-510 nvidia-settings nvidia-utils-510 linux-headers-$(uname -r)

For users that do not install CUDA on the first go, do not worry; install the CUDA package later on.

Note a possible prompt for users with pre-existing installations before the installation continues.

Select Yes to remove any existing drivers, failure to do this may cause system instability.

Once done, the installation will be complete.

Lastly, reboot your system once done.

sudo reboot

Verify the installation by running NVIDIA-SMI as the manual installation steps showed beforehand.


Example output:

Comments and Conclusion

Congratulations, you have installed the latest NVIDIA 510 Graphic Card Drivers on Ubuntu 20.04 LTS Focal Fossa Desktop using various methods.

Overall, installing the PPA methods is always recommended as they provide the best system stability, while the manual or NVIDIA repository are secondary options and are very useful for betas or developer work.


Like to get automatic updates? Follow us on one of our social media accounts!