Operations 7 min read

How to Install NVIDIA Drivers on Ubuntu 22.04: Complete Step‑by‑Step Guide

This guide walks you through preparing your Ubuntu 22.04 system, disabling the Nouveau driver, removing old NVIDIA packages, and installing the latest NVIDIA driver using either the graphical Software & Updates tool or command‑line methods, followed by verification and troubleshooting tips.

Raymond Ops
Raymond Ops
Raymond Ops
How to Install NVIDIA Drivers on Ubuntu 22.04: Complete Step‑by‑Step Guide

Ubuntu 22.04 NVIDIA Driver Installation Guide

1. Preparation

Update the system Ensure all packages are up‑to‑date: sudo apt update && sudo apt upgrade -y Disable the open‑source Nouveau driver Edit the blacklist file: sudo nano /etc/modprobe.d/blacklist.conf Add at the end:

blacklist nouveau
options nouveau modeset=0

Update initramfs and reboot:

sudo update-initramfs -u
sudo reboot

Verify with lsmod | grep nouveau (no output means success).

Remove old NVIDIA drivers (if any)

sudo apt purge nvidia-*
sudo apt autoremove

2. Install NVIDIA Driver (two methods)

Method 1: Ubuntu Software & Updates (beginner friendly)

Open Software & Updates .

Switch to the Additional Drivers tab.

Select the recommended proprietary NVIDIA driver.

Click Apply Changes , wait for installation, then reboot.

Method 2: Command‑line (recommended)

Add the official graphics‑drivers PPA and update:

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

List available drivers and note the one marked “recommended” (e.g., nvidia-driver-535): ubuntu-drivers devices Install the chosen driver: sudo apt install nvidia-driver-535 Reboot the system:

sudo reboot

3. Verify Installation

Run nvidia-smi – it should display GPU model, driver version, and CUDA version.

Check that the graphical desktop works without black screens or flickering.

4. Manual Installation (for specific driver versions)

Download the .run installer from the NVIDIA website.

Stop the display manager (e.g., sudo systemctl stop gdm3 or lightdm).

Make the installer executable and run it without OpenGL files:

sudo chmod +x NVIDIA-Linux-x86_64-*.run
sudo ./NVIDIA-Linux-x86_64-*.run --no-opengl-files --no-x-check --no-nouveau-check

Reboot:

sudo reboot

5. Common Issues & Solutions

Black screen / no GUI

Ensure the monitor is connected to the discrete GPU port.

Disable Secure Boot in BIOS.

Switch display manager:

sudo apt install lightdm
sudo dpkg-reconfigure lightdm

Driver‑kernel version conflict

sudo apt install build-essential linux-headers-$(uname -r)

Driver breaks after kernel update

sudo apt install --reinstall nvidia-driver-535

6. Precautions

Prefer the system‑recommended driver to avoid compatibility problems.

Avoid running sudo apt upgrade after installation unless you reinstall the driver, as kernel upgrades may invalidate it.

For dual‑GPU laptops, use prime-select nvidia to switch to the discrete GPU or prime-select intel for the integrated one.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxGPUNvidiaSystem AdministrationUbuntudriver installation
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.