How to Install NVIDIA GPU Driver on Ubuntu 24.04 LTS Desktop/Server

If you have an NVIDIA GPU installed on your computer/server, installing the NVIDIA GPU drivers will be the first thing to do after installing Ubuntu 24.04 LTS.

On Ubuntu 24.04 LTS Desktop, you can install NVIDIA GPU drivers using the following methods:

  • Software & Updates app

  • APT package manager

 

On Ubuntu 24.04 LTS Server, you can install NVIDIA GPU drivers using the following methods:

 

In this article, I will show you how to install NVIDIA GPU drivers on Ubuntu 24.04 LTS desktop and server operating systems.

 

 

 

 

 

 

Checking if an NVIDIA GPU is Installed on Your Computer

I have written an article demonstrating different methods of checking for the availability of an NVIDIA GPU on your Linux system.

 

 

 

Method 1: Installing NVIDIA GPU Driver using Software & Updates App on Ubuntu 24.04 LTS Desktop

First, search for the term driver in the Ubuntu application menu[1] and click on the Additional Drivers app from the search result[2].

 

It will open the Additional Drivers tab of the Software & Updates app.

By default, Ubuntu 24.04 LTS will use the open-source Nouveau GPU driver.

 

To install and use the official NVIDIA GPU driver:

  1. Select Using NVIDIA driver metapackage from nvidia-driver-* (proprietary, tested) from the list.

  2. Click on Apply Changes.

 

Type in the login user’s password and click on Authenticate.

 

The official NVIDIA GPU driver packages are being downloaded and installed. It will take a while to complete.

 

Once the official NVIDIA GPU driver is installed, click on Restart for the changes to take effect.

 

Click on Restart to confirm the action.

 

Once your Ubuntu 24.04 LTS machine boots, check if the NVIDIA GPU driver is working.

 

 

 

Method 2: Installing NVIDIA GPU Driver on Ubuntu 24.04 LTS from the Command-Line

You can install the official NVIDIA GPU drivers from the command-line on:

  • Ubuntu Desktop 24.04 LTS

  • Ubuntu Server 24.04 LTS

 

First, update the APT package database cache with the following command:

 

To install all the patches and security updates on your Ubuntu 24.04 LTS system, run the following command:

 

To confirm the installation, press Y and then press .

 

All the updates should be downloaded and installed on your Ubuntu system.

 

For the changes to take effect, reboot your Ubuntu machine with the following command:

 

Once your Ubuntu machine boots, list all the available NVIDIA driver packages with the following command:

$ sudo ubuntu-drivers list

 

You should find the following NVIDIA driver packages:

NOTE: At the time of this writing, NVIDIA driver version 535 is available for installation on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS operating systems.

 

To install the official NVIDIA driver on Ubuntu Desktop 24.04 LTS, run the following command:

$ sudo apt install nvidia-driver-535

 

To install the official NVIDIA driver on Ubuntu Server 24.04 LTS, run the following command:

$ sudo apt install nvidia-driver-535-server

 

To confirm the installation, press Y and then press .

 

The official NVIDIA driver packages will be downloaded and installed on your Ubuntu machine. It will take a while to complete.

 

Once you see the following prompt, select and press .

 

For the UEFI firmware (with secure boot enabled) to allow the NVIDIA kernel modules to run on your Ubuntu system, you must set a UEFI secure boot password and verify it from the UEFI firmware.

Type in a password for UEFI secure boot, select , and press .

 

Retype the same password, select , and press .

 

The NVIDIA GPU driver installation should continue.

 

At this point, the NVIDIA GPU driver should be installed.

 

For the changes to take effect, reboot your Ubuntu machine with the following command:

 

Once your Ubuntu machine boots, you will see a similar shim UEFI key management window.

Press any key to perform MOK management.

 

Select Enroll MOK and press .

 

To enroll the key, select Continue and press .

Select Yes and press .

 

Type in the password that you’ve set during the NVIDIA GPU driver installation and press .

 

Select Reboot and press .

Once your Ubuntu 24.04 LTS machine boots, check if the NVIDIA GPU driver is working.

 

 

 

Checking if NVIDIA GPU Driver is Working Correctly on Ubuntu 24.04 LTS

To check if the NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS system:

  1. Open the Application Menu

  2. Search for the term nvidia

  3. Click on the NVIDIA X Server Settings app from the search result.

 

The NVIDIA Settings app should be opened. If the NVIDIA GPU driver is working, detailed information on your NVIDIA GPU should be displayed on the app.

 

To check if the NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command line, you can use the nvidia-smi command-line utility.

 

If the NVIDIA GPU driver is working, detailed usage information on your NVIDIA GPU should be displayed on the output of the nvidia-smi command.

 

 

Conclusion

In this article, I have covered the following topics:

  • (Linked) Checking if an NVIDIA GPU hardware is available on your Ubuntu 24.04 LTS system.

  • Installing NVIDIA GPU driver on Ubuntu Desktop 24.04 LTS graphically using the Software & Updates app.

  • Installing NVIDIA GPU driver on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command-line using APT package manager.

  • Checking if NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS using the NVIDIA X Server Settings app.

  • Checking if NVIDIA GPU driver is working on Ubuntu Desktop 24.04 LTS and Ubuntu Server 24.04 LTS from the command-line using the nvidia-smi utility.


Source link
Exit mobile version