NVIDIA Drivers Not Working

Black screen, low resolution, or GPU not detected? This is one of the most common Linux issues. Here's how to fix it.

Symptoms

Quick Fix

First, check if your system even sees your NVIDIA card:

lspci | grep -i nvidia

If that shows your GPU, install the proprietary driver for your distro:

Ubuntu / Linux Mint / Pop!_OS

Ubuntu has a built-in driver tool that picks the right version for your card:

# See what drivers are available
sudo ubuntu-drivers list

# Auto-install the recommended driver
sudo ubuntu-drivers autoinstall

# Reboot
sudo reboot

If that doesn't work, you can install a specific version manually:

# Add the graphics drivers PPA for newer drivers
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

# Install a specific version (check ubuntu-drivers list for the right one)
sudo apt install nvidia-driver-550
sudo reboot
Pop!_OS users: Pop comes with NVIDIA drivers pre-installed if you downloaded the NVIDIA ISO. If you used the Intel/AMD ISO, run: sudo apt install system76-driver-nvidia
Fedora

You need RPM Fusion enabled first (it's not in Fedora's default repos):

# Enable RPM Fusion (if you haven't already)
sudo dnf install -y \
  https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
  https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

# Install the NVIDIA driver (builds a kernel module via akmod)
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

# IMPORTANT: Wait for the kernel module to finish building
# This can take a few minutes. Check with:
modinfo -F version nvidia

# Reboot
sudo reboot
Don't reboot too soon. The akmod-nvidia package compiles a kernel module in the background. If you reboot before it finishes, you'll get a black screen. Wait until modinfo -F version nvidia returns a version number.
Arch Linux / Manjaro

Arch has the NVIDIA driver in the official repos:

# For the current kernel
sudo pacman -S nvidia nvidia-utils nvidia-settings

# If you use the LTS kernel
sudo pacman -S nvidia-lts nvidia-utils nvidia-settings

# If you use a custom kernel, use DKMS
sudo pacman -S nvidia-dkms nvidia-utils nvidia-settings

# Reboot
sudo reboot

Manjaro users: Use Manjaro's hardware detection tool instead:

sudo mhwd -a pci nonfree 0300
openSUSE

Add the NVIDIA community repository:

# For Tumbleweed
sudo zypper addrepo --refresh \
  https://download.nvidia.com/opensuse/tumbleweed NVIDIA

# For Leap
sudo zypper addrepo --refresh \
  https://download.nvidia.com/opensuse/leap/$(. /etc/os-release; echo $VERSION_ID) NVIDIA

# Install the driver
sudo zypper install-new-recommends --repo NVIDIA
sudo reboot

Why This Happens

Why doesn't NVIDIA just work on Linux?

Short answer: NVIDIA doesn't open-source their drivers.

When you install Linux, it comes with an open-source driver called nouveau. It's reverse-engineered by the community because NVIDIA doesn't help. Nouveau works for basic display, but it can't properly manage GPU power, clocks, or 3D acceleration on most modern cards.

To get proper performance, you need NVIDIA's proprietary driver, which you have to install separately. This driver is a binary blob that NVIDIA builds outside the Linux kernel, so it can break when your kernel updates.

Good news: NVIDIA has recently started open-sourcing their kernel modules (for Turing and newer GPUs, GTX 1600+/RTX 2000+). This is slowly improving the situation, but it will take years before things "just work" like AMD does.

AMD and Intel GPUs use open-source drivers built into the Linux kernel. They work out of the box with no extra steps. If you're buying a new GPU for Linux, AMD is the easier choice.

Wayland vs X11 with NVIDIA

Modern Linux desktops are moving from X11 (the old display system) to Wayland (the new one). NVIDIA's support for Wayland has been a pain point, but it's gotten much better.

If you're having Wayland issues with NVIDIA, add these kernel parameters:

# Edit your GRUB config
sudo nano /etc/default/grub

# Add to GRUB_CMDLINE_LINUX_DEFAULT:
nvidia-drm.modeset=1

# Then rebuild GRUB config
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
Quick escape: If Wayland is giving you trouble, you can switch back to X11 at the login screen. On GDM (GNOME), click your username, then click the gear icon in the bottom-right and select "GNOME on Xorg."

Laptop Hybrid Graphics

Many laptops have two GPUs: an integrated Intel/AMD GPU for battery life, and a discrete NVIDIA GPU for performance. Linux needs extra setup to switch between them.

PRIME Render Offload (recommended, built-in)

Modern NVIDIA drivers (470+) support PRIME render offload. This keeps the integrated GPU active for normal use and lets you run specific apps on the NVIDIA GPU:

# Run a specific application on the NVIDIA GPU
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia your-application

# For Vulkan applications (games)
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only your-game

# Create a shortcut alias in your shell config (~/.bashrc or ~/.zshrc)
alias nvrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia'

# Then just use:
nvrun glxgears

To check which GPU an app is using:

# Should say your integrated GPU
glxinfo | grep "OpenGL renderer"

# Should say your NVIDIA GPU
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep "OpenGL renderer"
optimus-manager (Arch-based distros)

If you're on Arch or Manjaro, optimus-manager gives you a simple way to switch between GPUs:

# Install from AUR
yay -S optimus-manager optimus-manager-qt

# Enable the service
sudo systemctl enable --now optimus-manager

# Switch to NVIDIA GPU
optimus-manager --switch nvidia

# Switch to integrated GPU
optimus-manager --switch integrated

# Use hybrid mode (like PRIME offload)
optimus-manager --switch hybrid
Note: Switching GPUs with optimus-manager logs you out. Save your work first.
system76-power (Pop!_OS)

Pop!_OS has built-in hybrid graphics switching:

# Switch to NVIDIA
sudo system76-power graphics nvidia

# Switch to integrated
sudo system76-power graphics integrated

# Hybrid mode (default)
sudo system76-power graphics hybrid

# Check current mode
sudo system76-power graphics

You can also switch from the system tray on Pop!_OS - no terminal needed.

If You're Still Stuck

Black screen recovery: how to get back to a working desktop

If you installed NVIDIA drivers and now get a black screen, here's how to recover:

  1. At the black screen, press Ctrl+Alt+F2 to switch to a text console (TTY)
  2. Log in with your username and password
  3. Remove the NVIDIA driver:
# Ubuntu/Debian
sudo apt remove --purge 'nvidia-*'
sudo apt autoremove
sudo reboot

# Fedora
sudo dnf remove 'akmod-nvidia*' 'xorg-x11-drv-nvidia*'
sudo reboot

# Arch
sudo pacman -Rns nvidia nvidia-utils
sudo reboot

This will put you back on the nouveau driver. From there, try installing the NVIDIA driver again following the steps above.

Check your driver status
# Is the NVIDIA module loaded?
lsmod | grep nvidia

# What driver version is installed?
nvidia-smi

# Is nouveau running instead?
lsmod | grep nouveau

# Check for errors in the log
dmesg | grep -i nvidia
journalctl -b | grep -i nvidia