This guide covers switching between NVIDIA's proprietary driver and the open-source Nouveau driver on Ubuntu/Debian-based systems.
- Pros: Best performance, CUDA support, full feature set, power management
- Cons: Closed-source, potential compatibility issues with kernel updates
- Use cases: Gaming, ML/AI workloads, professional graphics work
- Pros: Open-source, built into kernel, better Wayland support, no licensing concerns
- Cons: Lower performance, limited power management, no CUDA support
- Use cases: Basic desktop use, troubleshooting, avoiding proprietary software
lspci | grep -i vga
lspci | grep -i nvidia
lsmod | grep -E "(nvidia|nouveau)"
nvidia-smi
# Or check version
cat /proc/driver/nvidia/version
glxinfo | grep "OpenGL renderer"
# Or
inxi -G
- Open "Software & Updates"
- Go to "Additional Drivers" tab
- Select "Using X.Org X server -- Nouveau" driver
- Click "Apply Changes"
- Reboot system
# Remove NVIDIA proprietary driver
sudo apt purge nvidia-* libnvidia-*
# Update package database
sudo apt update
# Install Nouveau (usually already included)
sudo apt install xserver-xorg-video-nouveau
# Regenerate initramfs
sudo update-initramfs -u
# Reboot
sudo reboot
# Create blacklist file
sudo nano /etc/modprobe.d/blacklist-nvidia.conf
# Add these lines:
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
alias nvidia off
alias nvidia-drm off
alias nvidia-modeset off
alias nvidia-uvm off
# Update initramfs and reboot
sudo update-initramfs -u
sudo reboot
- Open "Software & Updates"
- Go to "Additional Drivers" tab
- Select recommended NVIDIA driver (usually highest version)
- Click "Apply Changes"
- Reboot system
# Install recommended driver automatically
sudo ubuntu-drivers autoinstall
# Or list available drivers first
ubuntu-drivers devices
# Install specific version
sudo apt install nvidia-driver-535 # Replace with desired version
# Add NVIDIA package repository
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt update
# Install driver
sudo apt install nvidia-driver-535 # Latest stable version
# Download driver from NVIDIA website
# Make runfile executable and run
chmod +x NVIDIA-Linux-x86_64-*.run
sudo ./NVIDIA-Linux-x86_64-*.run
Create a script to easily switch:
#!/bin/bash
# save as switch-gpu-driver.sh
case "$1" in
nvidia)
echo "Switching to NVIDIA proprietary driver..."
sudo rm -f /etc/modprobe.d/blacklist-nvidia.conf
sudo ubuntu-drivers autoinstall
;;
nouveau)
echo "Switching to Nouveau driver..."
sudo apt purge nvidia-* libnvidia-*
sudo tee /etc/modprobe.d/blacklist-nvidia.conf << EOF
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
EOF
;;
*)
echo "Usage: $0 {nvidia|nouveau}"
exit 1
;;
esac
sudo update-initramfs -u
echo "Reboot required to complete driver switch"
# Install nvidia-prime
sudo apt install nvidia-prime
# Switch to NVIDIA
sudo prime-select nvidia
# Switch to Intel/AMD integrated graphics
sudo prime-select intel
# Check current selection
prime-select query
Nouveau supports most NVIDIA cards but with limitations:
- Full support: GeForce 8 and newer (Tesla, Fermi, Kepler, Maxwell, Pascal)
- Limited support: Turing, Ampere (RTX 20/30 series) - basic display only
- No support: Ada Lovelace (RTX 40 series) - very limited
# Check GPU codename
lspci -v | grep -A 12 VGA
# Visit nouveau.freedesktop.org/FeatureMatrix.html for compatibility
# Boot into recovery mode or TTY (Ctrl+Alt+F2)
# Reinstall display manager
sudo apt install --reinstall gdm3 # or lightdm/sddm
# Regenerate X11 config
sudo nvidia-xconfig # for NVIDIA
# or remove xorg.conf for Nouveau
sudo rm /etc/X11/xorg.conf
# Enable GPU reclocking (experimental)
sudo nano /etc/default/grub
# Add to GRUB_CMDLINE_LINUX_DEFAULT:
nouveau.pstate=1
sudo update-grub
sudo reboot
# Check secure boot status
mokutil --sb-state
# If secure boot is enabled, sign the driver or disable secure boot
# Disable secure boot in BIOS/UEFI settings
# Enable Wayland support for NVIDIA (driver 495+)
sudo nano /etc/gdm3/custom.conf
# Uncomment: WaylandEnable=true
# Add kernel parameters
sudo nano /etc/default/grub
# Add: nvidia-drm.modeset=1
# OpenGL performance
glxgears -info
# Detailed GPU info
glxinfo | grep -E "(OpenGL vendor|OpenGL renderer|OpenGL version)"
# Gaming benchmarks
sudo apt install mesa-utils
# Run specific game benchmarks or synthetic tests
/etc/modprobe.d/
- Driver blacklist files/etc/X11/xorg.conf
- X11 configuration/usr/share/X11/xorg.conf.d/
- X11 config snippets/var/log/Xorg.0.log
- X11 log file
# Before making changes
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo cp -r /etc/modprobe.d/ /etc/modprobe.d.backup/
- Always reboot after driver changes
- Keep a live USB handy for recovery
- Test thoroughly after switching
- Consider your use case when choosing drivers
- Nouveau is improving but still lags behind proprietary drivers for performance
For the latest information, check:
- Ubuntu documentation
- NVIDIA developer documentation
- Nouveau project website
- Your specific GPU's compatibility matrix