Skip to Content
DocsReferenceHardwareNVIDIA

NVIDIA Graphics Card

Note

This article has been initially checked against the Ubuntu 26.04 LTS April 2026 release notes. NVIDIA driver versions, Wayland behavior, and suspend/resume issues still need ongoing validation.

Check GPU Model

lspci | grep -i nvidia

Driver Installation Methods

sudo ubuntu-drivers devices sudo ubuntu-drivers autoinstall

This command will automatically detect and install the most suitable driver version for your GPU.

Method 2: Manual installation from APT

sudo apt update # Use the version recommended by `ubuntu-drivers devices`, for example: sudo apt install nvidia-driver-580

Run ubuntu-drivers devices first to see the version recommended for your hardware, then replace the version number above with that value. The 26.04 repository currently ships several series, from 580 (the LTS branch) through 590/595. When unsure, prefer the version marked recommended. To view the versions available in the repository:

apt list nvidia-driver-*

Download the .run file from the NVIDIA website . This method may conflict with the system package manager and is not recommended for regular users.

Post-Installation Verification

nvidia-smi

This should display the driver version, GPU model, and VRAM usage.

CUDA Installation

Install CUDA Toolkit

Ubuntu 26.04 ships the NVIDIA CUDA Toolkit in its official repositories:

sudo apt install cuda-toolkit

Verify installation:

nvcc --version

Install a Specific CUDA Version

If you need a specific version (e.g., for deep learning frameworks), it is recommended to use the official NVIDIA repository:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt update sudo apt install cuda-toolkit-12-8

Dual GPU Switching (PRIME)

Laptops typically have an integrated + discrete GPU configuration:

# Check current mode prime-select query # Switch to NVIDIA discrete GPU sudo prime-select nvidia # Switch to Intel integrated GPU (power saving) sudo prime-select intel # On-demand mode (recommended for laptop users) sudo prime-select on-demand

You need to log out or reboot after switching.

Common Issues

Black screen after boot

  1. At the GRUB menu, press e and add nomodeset at the end of the linux line
  2. Once in the system, remove the problematic driver:
sudo apt purge 'nvidia-*' sudo apt autoremove sudo reboot
  1. Reinstall the correct driver version

NVIDIA on Wayland

Ubuntu 26.04 uses Wayland by default. NVIDIA driver 535+ has good Wayland support. Confirm that the GBM backend is enabled:

echo $XDG_SESSION_TYPE # Should output wayland

The 26.04 Ubuntu Desktop session is Wayland-only, so the login screen no longer offers a “GNOME on Xorg” option. If you hit compatibility issues under Wayland, install another desktop that provides an X.org session (such as kubuntu-desktop or xubuntu-desktop) and pick its X.org session at the login screen. See Wayland Compatibility Issues for details.

Secure Boot and Driver Signing

If Secure Boot is enabled, you will be prompted to set a MOK password during driver installation. After rebooting, select “Enroll MOK” in the blue MOK management screen and enter the password to complete registration.

# Check Secure Boot status mokutil --sb-state

Driver Version Conflicts

# Completely remove NVIDIA drivers sudo apt purge 'nvidia-*' 'libnvidia-*' sudo apt autoremove sudo rm -f /etc/X11/xorg.conf # Ubuntu 26.04 generates the initramfs with Dracut by default: sudo dracut -f # If your system still uses the legacy initramfs-tools, use instead: # sudo update-initramfs -u sudo reboot
Last updated on