How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

Most modern Linux Desktop systems such as Ubuntu come with 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 proprietary drivers are slower than Nvidia’s, which lacks the latest graphics card hardware’s latest features, software technology, and support. In most situations, upgrading your Nvidia Drivers using the following guide is more beneficial than not doing it. In some cases, you may see some substantial improvements overall.

In the following tutorial, you will learn how to install Nvidia Graphic Drivers from the Nvidia Proprietary Repository, a PPA repository, or manually using the beta drivers for an example, thus giving you the latest in software available.

Prerequisites

  • Recommended OS: Ubuntu 21.10
  • User account: A user account with sudo or root access.

Update Operating System

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

sudo apt update && sudo apt upgrade -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@ubuntu ~]$ sudo whoami
root

To set up an existing or new sudo account, visit our tutorial on adding a User to Sudoers on Ubuntu.

To use the root account, use the following command with the root password to log in.

su
Advertisement

Option 1. Install NVIDIA Drivers using Terminal

The first option to install NVIDIA drivers for your Ubuntu 21.10 operating system is to use the command line. Advanced users prefer using command-based commands, but the beginner can quickly achieve this also with the following:

Open your terminal CTRL+ALT+T and find out information on your graphics card firstly.

ubuntu-drivers devices

Example output:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

From the example output, you can see our operating system module is TU117 [GeForce GTX 1650]“, and the recommended Nvidia driver is Nvidia-driver-470. Remember, this is just an example. Everyone will have different Nivida graphic cards. Look for the recommended option if there is one.

Next, we will install the nvidia-driver-470 driver package. This can be done in two ways.

First, if you are happy with the recommended version, use this command:

sudo ubuntu-drivers autoinstall

Second, specify it below if you want to install the driver package directly or choose another version.

sudo apt install nvidia-driver-470

Once installed, you will need to reboot your Ubuntu operating system, enter the following command:

reboot

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

nvidia-smi

Example output:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

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

Example:

Option 2. Install Nvidia Drivers with PPA

Suppose you require the latest Nvidia packages because your graphics card is a new module. You cannot find driver support in the existing default repositories from Ubuntu; add the following Nvidia PPA, which updates its repositories more frequently.

Open your terminal CTRL+ALT+T and install the following.

sudo apt install software-properties-common
sudo add-apt-repository ppa:graphics-drivers/ppa -y

Note, these drivers are often classed as beta. Install at your own risk. Make sure to back up everything first, as this isn’t an official Ubuntu repository.

Next, type in the terminal command to bring up recommendations on your graphics card.

sudo apt update
ubuntu-drivers devices

Example output:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

As you can see, there is a recommendation for a driver package to install. Currently, given the time of this tutorial, both with Ubuntu 21.10 being released, both options 1 and 2 have the same 470 drivers, but this will change in time.

To install, run the autoinstall command.

sudo ubuntu-drivers autoinstall

Second, specify it below if you want to install the driver package directly or choose another version.

sudo apt install nvidia-driver-470

Once done, finalize the installation by rebooting your PC.

reboot

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

nvidia-smi

Example output:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri
Advertisement

Option 3. Install Nvidia 495 Beta Drivers

Currently, the Nvidia 495 Drivers are still in beta and have not made their way onto any official or PPA repository at the current moment. However, for those enthusiasts that would like to install the beta drivers and keep them up to date manually, the following steps will help you achieve this goal.

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

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

wget https://us.download.nvidia.com/XFree86/Linux-x86_64/495.29.05/NVIDIA-Linux-x86_64-495.29.05.run

Install Linux Headers and compilation dependencies:

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

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

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

sudo update-initramfs -u

Example output:

update-initramfs: Generating /boot/initrd.img-5.13.0-20-generic

Now, reboot to the multi-user run level. This will disable the GUI user after reboot:

sudo systemctl set-default multi-user.target
sudo reboot now

Login to your account; it will be a terminal-only screen. Navigate to the directory if needed where you downloaded the .run file too. Next, run the following bash command to start the installation process.

Example only (your version will be different and more updated in the future):

sudo bash NVIDIA-Linux-x86_64-495.29.05.run 

If everything has been set correctly, you will see a screen and loading bar for building the kernel. After a few minutes, you will see your first prompt.

Select and press the “ENTER KEY” on the “Continue Installation” selection to proceed with the installation.

Example:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

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

Example:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

Next, you will receive another prompt asking to keep default settings; the recommended option for fresh installs would be Yes.

Example:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

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

Example:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

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

sudo systemctl set-default graphical.target
sudo reboot now

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

nvidia-smi

Example output:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

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

Example:

How to Install or Upgrade Nvidia Drivers on Ubuntu 21.10 Impish Indri

Congratulations, you have installed the latest Nvidia Beta Drivers. Do not forget to keep checking for updated packages through the download link. If new beta drivers come out, you will repeatedly run the same process to install the drivers over the existing ones.

Comments and Conclusion

In the tutorial, you learned how to install the latest stable or beta drivers on your Ubuntu 21.10 Impish Indri system using stable, latest, or bleeding edge options.

Further information on Nvidia Drivers for Ubuntu can be found by visiting the Ubuntu troubleshooting section.

Subscribe
Notify of
4 Comments
Inline Feedbacks
View all comments

Unfortunately, after following the 495 instructions with a fresh install, SDDM refuses to start.

nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

4
0
Would love your thoughts, please comment.x