How to Install NVIDIA Drivers on Ubuntu 24.04

Installing the right NVIDIA drivers on your Ubuntu 24.04 system is crucial for optimizing your graphics card’s performance. Whether you’re gaming, designing, or using graphic-intensive applications, the proper driver can make a significant difference. This guide covers four methods to install NVIDIA drivers, ensuring compatibility and enhancing your system’s graphics capabilities.

In this tutorial you will learn:

  • How to install NVIDIA drivers using the GNOME GUI
  • Steps to install NVIDIA drivers via the command line
  • Method to install NVIDIA Beta drivers using a PPA repository
  • Manual installation process using the official NVIDIA.com driver
How to Install NVIDIA Drivers on Ubuntu 24.04
How to Install NVIDIA Drivers on Ubuntu 24.04
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 24.04 LTS
Hardware NVIDIA Graphics Card
Other Internet connection for downloading drivers
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Method 1: GNOME GUI Nvidia Installation

  1. Accessing Software & Updates: Launch the Software & Updates application. Navigate to the “Additional Drivers” tab. Here, you’ll find a list of proprietary NVIDIA drivers available for installation.
    Select the NVIDIA driver of your choice.

    This method is user-friendly and recommended for those who prefer a graphical interface for driver installation.

Method 2: Command Line Nvidia Installation

  1. Identify Your Graphics Card: Begin by determining your NVIDIA graphics card model and the recommended driver. Execute:
    $ ubuntu-drivers devices
    == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
    modalias : pci:v000010DEd00002206sv00001458sd0000403Fbc03sc00i00
    vendor   : NVIDIA Corporation
    model    : GA102 [GeForce RTX 3080]
    driver   : nvidia-driver-470 - distro non-free
    driver   : nvidia-driver-535 - distro non-free recommended
    driver   : nvidia-driver-545-open - distro non-free
    driver   : nvidia-driver-470-server - distro non-free
    driver   : nvidia-driver-545 - distro non-free
    driver   : nvidia-driver-535-server-open - distro non-free
    driver   : nvidia-driver-535-server - distro non-free
    driver   : nvidia-driver-535-open - distro non-free
    driver   : xserver-xorg-video-nouveau - distro free builtin

    Your output will display available drivers, with recommendations tailored to your specific graphics card.

  2. Driver Installation: Agree with the recommendation? Install all recommended drivers with:
    $ sudo ubuntu-drivers autoinstall

    Alternatively, to install a specific driver version, use:

    $ sudo apt install nvidia-driver-535
  3. Reboot Your System: Finalize the installation by rebooting your system.
    $ sudo reboot

    This ensures the changes take effect, completing the installation process.

Method 3: Automatic Install using PPA repository

  1. Add the PPA Repository: To get started with beta drivers, add the graphics-drivers PPA to your system:
    $ sudo add-apt-repository ppa:graphics-drivers/ppa

    This step makes the latest NVIDIA beta drivers available for installation, albeit with a higher risk of system instability.

    Add the third-party NVIDIA graphics-drivers PPA to your system
    Add the third-party NVIDIA graphics-drivers PPA to your system
  2. Identify Your Graphics Card: Just like in Method 2, determine your graphics card model and the recommended driver by running:
    $ ubuntu-drivers devices
    == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
    modalias : pci:v000010DEd00002206sv00001458sd0000403Fbc03sc00i00
    vendor   : NVIDIA Corporation
    model    : GA102 [GeForce RTX 3080]
    driver   : nvidia-driver-470 - distro non-free
    driver   : nvidia-driver-535-open - distro non-free
    driver   : nvidia-driver-545-open - distro non-free
    driver   : nvidia-driver-470-server - distro non-free
    driver   : nvidia-driver-535 - distro non-free recommended
    driver   : nvidia-driver-535-server-open - distro non-free
    driver   : nvidia-driver-535-server - distro non-free
    driver   : nvidia-driver-545 - distro non-free
    driver   : nvidia-driver-550 - third-party non-free
    driver   : nvidia-driver-550-open - third-party non-free
    driver   : xserver-xorg-video-nouveau - distro free builtin
    



  3. Install the NVIDIA Driver: Install the recommended drivers automatically or choose a specific version:
    $ sudo ubuntu-drivers autoinstall

    Or for a specific driver:

    $ sudo apt install nvidia-driver-550
  4. Reboot Your Computer: Complete the installation process with a system reboot.
    $ sudo reboot

    This step is crucial for applying the new driver settings.

Method 4: Manual Install using the Official Nvidia.com Driver

NVIDIA MANUAL INSTALL: CAUTION ADVISED
Manual installation of NVIDIA drivers on Ubuntu, particularly from the official NVIDIA.com source, is not recommended for all users due to potential compatibility issues with future kernel updates. This approach requires manual recompilation or reinstallation of the driver each time the kernel is updated, as the NVIDIA kernel module may not automatically adapt to the new kernel version. Such updates can lead to system instability, the inability to boot into the graphical interface, or the driver ceasing to function entirely. Opting for drivers provided through Ubuntu’s repositories or via a PPA is generally safer, ensuring smoother updates and system stability.
  1. Identify Your NVIDIA VGA Card: Start by identifying your Nvidia card model. Use one of the following linux commands:
    $ lshw -numeric -C display
    $ lspci -vnn | grep VGA
    $ ubuntu-drivers devices

    This information is necessary for downloading the correct driver version.

  2. Download the Official Nvidia Driver: Visit the official Nvidia website and download the appropriate driver for your graphics card. Alternatively, if you’re confident in your selection, you can directly download the driver from the Nvidia Linux driver list. Once downloaded, you should have a file named similarly to “NVIDIA-Linux-x86_64-550.67.run”.
    $ ls
    NVIDIA-Linux-x86_64-550.67.run
    Search for the appropriate NVIDIA driver based on your NVIDIA card model.
    Search for the appropriate NVIDIA driver based on your NVIDIA card model.
    Download the official NVIDIA driver.
    Download the official NVIDIA driver.

    Make sure the downloaded file is accessible in your directory for the next steps.

  3. Install Prerequisites: Before installing the driver, you must install the necessary packages to compile and install the Nvidia driver:
    $ sudo apt install build-essential libglvnd-dev pkg-config

    These prerequisites are essential for a successful installation.

  4. Disable Nouveau Nvidia Driver: The default Nouveau Nvidia driver must be disabled before installing the official Nvidia driver. This step is crucial for preventing conflicts between drivers.
    Follow this provided guide or documentation on disabling the Nouveau driver in Ubuntu.

    WARNING
    Depending on your Nvidia VGA model your system might misbehave. At this stage be ready to get your hands dirty. After the reboot you may end up without GUI at all. Be sure that you have the SSH enabled on your system to be able login remotely or use CTRL+ALT+F2 to switch TTY console and continue with the installation.

    Reboot your system before continuing to the next step.

  5. Stop the Desktop Manager: To install the new Nvidia driver, you need to stop the current display server. Switch to runlevel 3 using the telinit command:
    $ sudo telinit 3

    Remember to save all current work before proceeding, as this will stop your desktop environment. Switch to a TTY1 session by pressing CTRL+ALT+F1 and log in.

  6. Install the Nvidia Driver: With the display server stopped, you can now install the Nvidia driver. Execute the downloaded driver file with root privileges and follow the installation wizard:
    $ sudo bash NVIDIA-Linux-x86_64-550.67.run

    Follow the on-screen instructions to complete the driver installation. The wizard may complain that another NVIDIA driver method is available, in that case simply ignore and hit continue.

  7. Reboot Your System: After installing the driver, reboot your system to apply the changes:
    $ sudo reboot

    This step is necessary to initialize the new driver.

  8. Configure NVIDIA X Server Settings: Upon reboot, you can configure your NVIDIA settings. Access the NVIDIA X Server Settings app from the Activities menu to adjust your graphics settings as desired.

    Configure NVIDIA X Server Settings
    Configure NVIDIA X Server Settings

Conclusion

Installing NVIDIA drivers on Ubuntu 24.04 can significantly enhance your system’s graphics performance, whether for gaming, professional design, or general use. This guide has introduced four methods to install NVIDIA drivers, from the straightforward GUI approach to the more detailed manual installation. Choose the method that best suits your preferences and technical comfort level. Remember, keeping your drivers up to date ensures optimal performance and access to the latest features and improvements.