NVIDIA GPU Compatibility
How to get the most out of your NVIDIA graphics card on Linux.
Current State of NVIDIA on Linux
NVIDIA on Linux has improved dramatically in recent years. The proprietary driver is mature and performant, open kernel modules are now available for newer GPUs, and Wayland support is largely functional. That said, NVIDIA still requires more setup than AMD or Intel GPUs, which work out of the box with open source drivers.
The short version: NVIDIA cards work well on Linux, but you need to install the right driver. The default open source driver (nouveau) is fine for basic display output but lacks the performance and features of the proprietary driver.
Driver Options
| Driver | Type | Performance | When to Use |
|---|---|---|---|
| nouveau | Open source (reverse-engineered) | Basic -- no reclocking on most GPUs, poor 3D performance | Fallback only. Useful for initial display output before installing proprietary drivers. |
| nvidia (proprietary) | Closed source | Full performance, feature-complete | The recommended driver for gaming, CUDA, professional work. Supports all features. |
| nvidia-open | Open source kernel modules (by NVIDIA) | Same as proprietary for supported GPUs | Turing (RTX 20xx) and newer. Preferred on newer hardware. Required for some features on Ada Lovelace+. |
Installation Per Distro
Ubuntu / Linux Mint
# The easiest method -- Ubuntu's driver manager
sudo ubuntu-drivers autoinstall
# Or install a specific version
sudo apt install nvidia-driver-560
# After installation
sudo reboot
# Verify
nvidia-smi
Ubuntu also offers this through the "Additional Drivers" GUI in Software & Updates.
Fedora
# Enable RPM Fusion (required)
sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# Install the NVIDIA driver
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
# Wait for the kernel module to build (important!)
# Check with: modinfo -F version nvidia
# This can take a few minutes after install
sudo reboot
Fedora builds the kernel module on your system via akmod. Do not reboot until modinfo -F version nvidia returns a version number.
Arch Linux
# For the latest stable kernel
sudo pacman -S nvidia nvidia-utils nvidia-settings
# For the LTS kernel
sudo pacman -S nvidia-lts nvidia-utils nvidia-settings
# For the open kernel modules (Turing+)
sudo pacman -S nvidia-open nvidia-utils nvidia-settings
# Regenerate initramfs
sudo mkinitcpio -P
sudo reboot
Add nvidia-drm.modeset=1 to your kernel parameters for proper Wayland support. In /etc/default/grub, add it to GRUB_CMDLINE_LINUX_DEFAULT, then run sudo grub-mkconfig -o /boot/grub/grub.cfg.
Manjaro
# Manjaro has a hardware detection tool
sudo mhwd -a pci nonfree 0300
# Or install manually
sudo mhwd -i pci video-nvidia
# Reboot
sudo reboot
# Verify
mhwd -li
Manjaro's MHWD tool handles driver selection and installation automatically in most cases.
Pop!_OS
Pop!_OS offers a dedicated NVIDIA ISO that comes with drivers pre-installed. This is the easiest path.
# If you installed the Intel/AMD ISO and need NVIDIA drivers later:
sudo apt install system76-driver-nvidia
sudo reboot
Pop!_OS also handles NVIDIA/integrated GPU switching through the system tray -- no manual configuration needed.
Wayland Support
NVIDIA Wayland support has gone from "completely broken" to "mostly working" over the past few years. Here is the current status:
- GNOME on Wayland -- Works well with driver 535+. GBM backend is supported. This is the most polished experience.
- KDE Plasma on Wayland -- Works well with driver 535+. Some edge cases with multi-monitor and VRR, but usable as a daily driver.
- Sway / wlroots compositors -- Require
nvidia-drm.modeset=1. Works, but may have occasional glitches. Use the--unsupported-gpuflag for Sway. - XWayland -- Hardware acceleration in XWayland apps works with driver 535+. Older drivers render XWayland apps in software.
nvidia-drm.modeset=1 and nvidia-drm.fbdev=1. Also set the environment variable GBM_BACKEND=nvidia-drm if your compositor does not pick it up automatically.
CUDA and Compute
NVIDIA CUDA works well on Linux and is often considered better supported than on Windows for serious compute workloads.
Installing CUDA toolkit
# Ubuntu / Mint
sudo apt install nvidia-cuda-toolkit
# Fedora
sudo dnf install cuda
# Arch
sudo pacman -S cuda
# Verify installation
nvcc --version
nvidia-smi
For machine learning frameworks (PyTorch, TensorFlow), install CUDA via the framework's own instructions or use conda/pip packages that bundle the right CUDA version. You typically do not need a system-wide CUDA install for ML work.
Container-based CUDA (recommended for ML)
# Install NVIDIA Container Toolkit
# This lets Docker/Podman containers access your GPU
# Ubuntu
sudo apt install nvidia-container-toolkit
# Then run GPU containers:
docker run --gpus all nvidia/cuda:12.3.1-runtime-ubuntu22.04 nvidia-smi
Using containers for CUDA workloads avoids version conflicts and makes environments reproducible.
Laptop Hybrid Graphics (NVIDIA Optimus)
Most NVIDIA laptops have both an integrated GPU (Intel or AMD) and a discrete NVIDIA GPU. This is called "hybrid graphics" or "NVIDIA Optimus." Linux handles this through PRIME.
How it works
- Integrated GPU handles the display and lightweight tasks (battery efficient)
- NVIDIA GPU activates on demand for games, CUDA, etc.
- PRIME render offload lets you run specific apps on the NVIDIA GPU while the integrated GPU handles the display
Running an app on the NVIDIA GPU
# PRIME render offload (driver 435+)
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia your-app
# Or use the prime-run wrapper (if your distro provides it)
prime-run your-app
# For Vulkan apps
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only your-app
Switching modes
Some distros offer GUI switching:
- Pop!_OS -- System tray toggle between Integrated, NVIDIA, Hybrid, and Compute modes
- Ubuntu -- NVIDIA X Server Settings has a PRIME Profiles section
- Arch / others -- Use
envycontrolorsupergfxctl(ASUS laptops) for power management
nvidia-powerd or use envycontrol to force the GPU off when not needed.
Gaming Performance Tips
- Use the latest driver -- NVIDIA frequently adds game-specific optimizations and Proton fixes in new driver releases
- Enable Vulkan -- In Steam, force Proton for Windows games. Vulkan via DXVK/VKD3D-Proton gives the best performance
- Disable compositor -- On X11 with KDE, "unredirect fullscreen windows" is enabled by default. On other DEs, disable compositing for fullscreen games to reduce latency
- Use GameMode -- Install Feral Interactive's GameMode to automatically apply performance optimizations when games launch
- Shader cache -- Set
__GL_SHADER_DISK_CACHE=1and__GL_SHADER_DISK_CACHE_PATH=/tmp/nv_cacheto reduce shader compilation stuttering - MangoHud -- Install MangoHud for an in-game performance overlay (FPS, CPU/GPU usage, temps)
# Install gaming extras on Ubuntu
sudo apt install gamemode mangohud
# Run a game with MangoHud overlay
mangohud %command% # (add to Steam launch options)
# Run a game with GameMode
gamemoderun %command% # (add to Steam launch options)