How to Inspect and Install Proprietary Hardware Drivers in Ubuntu Using ubuntu-drivers

Deploying Ubuntu on workstations and servers equipped with dedicated graphics processing units (such as NVIDIA GeForce, RTX, or Quadro GPUs), specialized wireless network cards (such as Broadcom Wi-Fi chipsets), or proprietary RAID controllers often requires third-party binary drivers. While open-source kernel drivers (such as Nouveau for NVIDIA) provide basic display functionality, demanding workloads—including hardware-accelerated 3D rendering, machine learning inference via CUDA, and high-frame-rate video encoding—demand proprietary manufacturer drivers. Rather than navigating manual shell installer scripts or complex PPA dependencies, Ubuntu provides the dedicated ubuntu-drivers command-line utility. This tool automates hardware detection, queries certified driver repositories, and coordinates unattended driver installations directly from the terminal.

Architecture of the ubuntu-drivers Detection Framework

The ubuntu-drivers utility acts as an abstraction layer across several low-level Ubuntu subsystems:

  • PCI and USB Bus Auditing: Scans the hardware tree via libpci, matching device vendor and model IDs against Ubuntu’s internal hardware database.
  • Ubuntu Driver Manager Database: Cross-references detected hardware against verified driver metapackages available in Ubuntu’s restricted repository pool.
  • DKMS Integration: Ensures that when proprietary drivers are installed, Dynamic Kernel Module Support (DKMS) automatically compiles driver kernel modules against newly installed Linux kernels during routine security updates.

Auditing Hardware Devices Requiring Proprietary Drivers

Before installing packages, query the system hardware bus to identify which devices require proprietary firmware or drivers:

# Update the APT package repository cache
sudo apt update

# Inspect all devices on the system that have recommended proprietary drivers
ubuntu-drivers devices

The command produces a structured summary of detected hardware components, their device models, and available driver candidates:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002484sv00001043sd00008816bc03sc00i00
vendor   : NVIDIA Corporation
model    : GA104 [GeForce RTX 3070]
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-550 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

The output explicitly flags the officially tested and recommended package with the recommended tag.

Listing Available Driver Packages Non-Interactively

For automated provisioning scripts and headless server deployments, list driver package names without verbose hardware tree paths:

# Output only the available driver package names
ubuntu-drivers list

# Display only the single recommended driver package name
ubuntu-drivers list --recommended

Installing the Recommended Drivers Automatically

To let Ubuntu automatically select and install the optimal driver package for all detected hardware devices simultaneously:

# Install all recommended proprietary drivers unattended
sudo ubuntu-drivers install

The command resolves dependencies, installs required DKMS header packages (such as linux-headers-generic), and triggers background kernel module compilation.

Targeting Specific Driver Branches Manually

In enterprise production environments, machine learning pipelines may depend on a specific long-term support (LTS) or production branch rather than the latest bleeding-edge release. Specify the exact package name using APT once identified via ubuntu-drivers list:

# Install a specific production driver branch (e.g. NVIDIA 535 server headless driver)
sudo apt install -y nvidia-driver-535-server

For headless GPU compute servers without X11 or Wayland desktop environments, installing the -server variant minimizes package bloat by excluding unnecessary graphical display server dependencies.

Enrolling Secure Boot MOK Keys During Driver Installation

If UEFI Secure Boot is active on your Ubuntu system, proprietary third-party kernel modules cannot load without a trusted cryptographic signature. During package installation:

  1. The installer prompts to configure Secure Boot (MOK).
  2. Create a temporary one-time password when prompted in the terminal.
  3. Reboot the system using sudo reboot.
  4. Upon restart, the UEFI firmware launches the blue Shim UEFI Key Management (MOKManager) screen.
  5. Select Enroll MOK > Continue > Yes, enter the temporary password configured during installation, and select Reboot.

Verifying Active Driver Operation and GPU State

After rebooting into the updated environment, confirm that the proprietary kernel module has successfully bound to the hardware:

# Check active kernel driver binding for VGA and 3D controllers
lspci -nnk -d 10de: | grep -i "Kernel driver in use"

# For NVIDIA GPUs, inspect driver version, temperature, and CUDA capability
nvidia-smi

The nvidia-smi utility confirms active driver communication, displaying the driver release version, current VRAM utilization, and PCIe link generation.

Purging and Rolling Back Proprietary Drivers

If an updated driver introduces display flicker or kernel panics, roll back to open-source drivers from the recovery console:

# Remove all proprietary NVIDIA packages and revert to open-source drivers
sudo apt purge ~nnvidia -y
sudo apt autoremove -y

# Reconfigure the system to load the open-source Nouveau driver
sudo update-initramfs -u
sudo reboot

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.