How to Install Nvidia Drivers on Ubuntu 24.04 LTS
Step-by-step guide to install Nvidia drivers on Ubuntu 24.04 LTS using ubuntu-drivers, official PPA, Secure Boot MOK enrollment, and nvidia-smi.

6 min read
Step-by-step guide to install Nvidia drivers on Ubuntu 24.04 LTS using ubuntu-drivers, official PPA, Secure Boot MOK enrollment, and nvidia-smi.
- Prerequisites and Supported Releases
- Step 1: Identifying Your Nvidia GPU Model and Current Active Driver
- Step 2: Preparing System Packages and Installing Build Tools
Whether configuring an AI machine learning workstation, high-performance video editing suite, or dedicated Linux gaming rig, knowing how to install nvidia drivers on ubuntu 24.04 is crucial for unlocking your hardware's full computing power. Ubuntu installs the open-source Nouveau display driver by default, which provides basic 2D display functionality but lacks modern 3D graphics acceleration, clock speed management, and CUDA compute framework support.
Ubuntu 24.04 LTS streamlines proprietary driver deployment through automated driver detection utilities, kernel Dynamic Kernel Module Support (DKMS), and tight integration with UEFI Secure Boot. This guide covers automated installation via standard repositories, bleeding-edge driver deployment through the official graphics PPA, Secure Boot key enrollment, and GPU performance verification.
Installing proprietary graphics drivers maximizes gaming performance, CUDA compute capabilities, and display stability. This comprehensive tutorial demonstrates how to install Nvidia drivers on Ubuntu 24.04 LTS using the official Ubuntu repositories, automated ubuntu-drivers detection, PPA repositories, UEFI Secure Boot MOK enrollment, and prime-select GPU switching.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A desktop, workstation, or server equipped with an Nvidia GeForce, Quadro, RTX, or Tesla graphics card.
- An active installation of Ubuntu 24.04 LTS with administrative sudo privileges.
- An active Internet connection to download driver packages and kernel modules.
- Access to system reboot and physical display (or IPMI/KVM console for headless servers).
Step 1: Identifying Your Nvidia GPU Model and Current Active Driver
If the output indicates Kernel driver in use: nouveau, your system is running the reverse-engineered open-source driver. If no driver is listed or an existing Nvidia driver requires updating, proceed to system preparation.
# Identify your graphics controller and currently loaded driver module
lspci -k | grep -EA3 'VGA|3D'
# Example output on an Nvidia RTX system:
# 01:00.0 VGA compatible controller: NVIDIA Corporation AD106 [GeForce RTX 4060 Ti] (rev a1)
# Subsystem: ZOTAC International (MCO) Ltd. Device 2670
# Kernel driver in use: nouveau
# Kernel modules: nvidiafb, nouveau
Step 2: Preparing System Packages and Installing Build Tools
Proprietary Nvidia drivers compile kernel interface modules directly against your running Linux kernel headers. Missing compiler dependencies or outdated kernel headers can lead to failed driver installations or broken boot configurations.
Update your package index and install build-essential, dkms, and matching kernel headers.
# Update repository cache and upgrade existing packages
sudo apt update && sudo apt upgrade -y
# Install compilation prerequisites and dynamic kernel module support
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
Step 3: Detecting Recommended Drivers with ubuntu-drivers
The utility outputs a list of candidate packages, such as nvidia-driver-535, nvidia-driver-550, or open-kernel variations, clearly tagging the tested option with the label recommended.
# Scan hardware and list recommended proprietary driver packages
ubuntu-drivers devices
Step 4: Method 1 — Automated Installation via Official Repositories (Recommended)
For maximum stability and guaranteed compatibility with Ubuntu kernel security updates, install the recommended driver identified by Canonical.
You can allow ubuntu-drivers to automatically install the optimal package, or install your preferred driver branch explicitly using APT.
# Option A: Automatically install the recommended driver package
sudo ubuntu-drivers install
# Option B: Or install a specific driver branch explicitly (e.g., driver 550)
sudo apt install -y nvidia-driver-550 nvidia-utils-550
Proprietary vs Nvidia Open-Kernel Drivers
On newer Turing, Ampere, Ada Lovelace, and Hopper architectures (RTX 2000 series and newer), Nvidia provides open-source kernel modules designated with the -open suffix (e.g., nvidia-driver-550-open).
For consumer desktop gaming and workstation applications, both standard proprietary and open-kernel variants perform identically. If you operate enterprise data center GPUs or prefer open-source kernel components, choose the open-kernel branch.
Step 5: Method 2 — Installing Cutting-Edge Drivers via Graphics PPA
Once you identify the target version (such as nvidia-driver-555 or nvidia-driver-560), install the driver and utility package using apt install.
# Add the official Graphics Drivers PPA
sudo add-apt-repository ppa:graphics-drivers/ppa -y
# Refresh package index
sudo apt update
# Inspect the latest driver branches available in the PPA
apt-cache search '^nvidia-driver-[0-9]+$' | sort -V
Step 6: Handling UEFI Secure Boot and Enrolling the MOK Key
After confirming the password on the blue MOK management screen, choose Reboot. Ubuntu will boot normally, and the kernel will securely load the verified Nvidia drivers.
| Stage | User Action | Technical Operation |
|---|---|---|
| 1. Debconf Prompt | Enter a temporary password | Creates a local private/public MOK certificate pair and signs the compiled nvidia.ko module. |
| 2. Confirm Password | Retype temporary password | Stores the certificate in NVRAM ready for firmware validation upon the next reboot. |
| 3. Reboot Computer | Execute sudo reboot | Transfers execution to the blue UEFI Shim / MOK management screen. |
| 4. Blue Shim Menu | Select 'Enroll MOK' > 'Continue' | Validates the certificate signature with your temporary password. |
Step 7: Verifying Driver Installation with nvidia-smi
The output table displays your Driver Version, supported CUDA Version, active GPU model, running processes, current temperature, and VRAM utilization. If this table renders without errors, your driver is operational.
# Query the GPU status and driver version
nvidia-smi
Step 8: Configuring Hybrid Graphics on Laptops with prime-select
Laptops equipped with dual GPUs (integrated Intel/AMD processor graphics and discrete Nvidia GPU) use Ubuntu's PRIME display multiplexing framework to balance battery life against performance.
You can query and toggle graphics modes using the prime-select command.
# Check current graphics profile
prime-select query
# Set to on-demand mode (uses integrated GPU normally, offloads heavy 3D apps to Nvidia)
sudo prime-select on-demand
# Force full-time discrete Nvidia GPU (maximum performance)
sudo prime-select nvidia
# Force integrated power-saving GPU (maximum battery life)
sudo prime-select intel
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
Black screen or blinking cursor after rebooting.
Cause: Nouveau driver conflict or Wayland display manager compatibility issue on older hardware.
Resolution: Switch to a TTY virtual console by pressing Ctrl+Alt+F3, log in, ensure Nouveau is blacklisted, and switch GDM to X11 mode by editing /etc/gdm3/custom.conf.
sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf
nvidia-smi outputs: 'NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver'.
Cause: Kernel modules were not loaded, often caused by missed Secure Boot MOK enrollment or missing kernel headers.
Resolution: Check Secure Boot status via mokutil --sb-state and rebuild the DKMS modules for your current kernel.
sudo dkms autoinstall
System resolution is locked at low 640x480 or 1024x768 resolution.
Cause: Kernel modesetting (DRM KMS) is disabled or the driver fell back to standard VESA software rendering.
Resolution: Enable Nvidia DRM modesetting in your GRUB default configuration and update GRUB.
echo 'options nvidia-drm modeset=1' | sudo tee /etc/modprobe.d/nvidia-graphics-drivers.conf && sudo update-initramfs -u
Security Best Practices and Hardening
Always install graphics drivers through official Ubuntu repositories or verified Launchpad PPAs.
Do not execute .run installer shell binaries downloaded directly from the web, as manual .run scripts bypass package managers and break silently during kernel updates.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install Google Chrome Web Browser on Ubuntu 24.04 — Configure hardware video decoding and GPU acceleration in Chromium-based desktop browsers.
- How to Check Your Ubuntu Version — Confirm kernel versions and architecture before compiling custom graphics drivers.
- How to Add APT Repository in Ubuntu — Learn how Launchpad PPAs and third-party software sources are structured and managed.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
.run file is strongly discouraged on Ubuntu. It overwrites system OpenGL libraries, lacks DKMS kernel tracking by default, and frequently breaks your graphical desktop whenever an automated kernel security update is applied. Always use ubuntu-drivers or APT packages.sudo apt purge '*nvidia*' followed by sudo apt install --reinstall xserver-xorg-video-nouveau and reboot your computer.libcuda.so). However, if you need the full CUDA development toolkit (including nvcc), you can install it via sudo apt install -y nvidia-cuda-toolkit.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!