✅ What you should know first
- There are two main kinds of NVIDIA driver packages:
- Unified Driver Architecture (UDA) — more “general purpose”, used for desktops/gaming.
- Enterprise Ready Drivers (ERD) / “-server” suffix — optimized for servers / compute workloads.
- If Secure Boot is enabled, you’ll need signed kernel modules or enroll a Machine Owner Key (MOK).
- Always check which kernel you’re running and make sure kernel headers for that version are installed. Without matching headers, driver modules may fail to compile.
🔧 Installation Methods
Here are the common ways to install, with pros & cons.
| Method | Pros | Caveats |
|---|---|---|
Using ubuntu-drivers tool (recommended) | Easy, handles dependencies; works well with Secure Boot; automatically picks a compatible driver. (Ubuntu Documentation) | Less control over specific version if you need something non-standard. |
Manual install via APT packages (nvidia-driver-..., kernel modules, etc.) | More control; can pick server vs non-server branch; good for fine-tuning. (Ubuntu Documentation) | More steps; risk of mismatch; need kernel headers; Secure Boot handling can be trickier. |
| run script from NVIDIA website | Sometimes only way to get latest drivers or support for very new/edge hardware. | More risk: clashes with packages; you must manage updates yourself; more manual work; not always recommended. |
🛠 Step-by-Step (Ubuntu’s Recommended Route)
Here’s a streamlined version using Ubuntu’s ubuntu-drivers tool and APT.
- Update system
sudo apt update sudo apt upgrade - Check current driver version (if any)
cat /proc/driver/nvidia/version - List drivers available for your hardware
- For generic desktop/gaming:
sudo ubuntu-drivers list - For server / GPGPU / compute workloads:
sudo ubuntu-drivers list --gpgpu
nvidia-driver-535,nvidia-driver-535-server, etc. - For generic desktop/gaming:
- Install the driver
- To let Ubuntu pick the best match (desktop/gaming):
sudo ubuntu-drivers install - To install a specific version:
sudo ubuntu-drivers install nvidia:535 - For server / compute:
sudo ubuntu-drivers install --gpgpuor specify version +-server:sudo ubuntu-drivers install --gpgpu nvidia:535-server
- To let Ubuntu pick the best match (desktop/gaming):
- Install additional utils (optional/if needed)
Especially for server drivers, you might want things likenvidia-utils-<version>, or for special hardwarenvidia-fabricmanagerorlibnvidia-nscq. (Ubuntu Documentation) - Reboot
After installation, reboot to ensure the driver modules get loaded.sudo reboot - Verify installation
Use commands like:nvidia-smito check GPU is recognized, see driver version, etc.
⚠️ Handling Secure Boot
If Secure Boot is active:
- The kernel module you install must be signed. Ubuntu’s packaged drivers usually handle this.
- If using manual / external installers or if you build your own modules (via DKMS), you’ll likely need to enroll a MOK (Machine Owner Key).
🧹 Removing / Switching Drivers
If things go wrong, or you want to switch versions:
- Purge existing NVIDIA drivers
sudo apt --purge remove '*nvidia*' sudo apt autoremove - Optionally clean up configs or leftover kernel modules.
- Then install the new one via above methods.
