Operations

GPU Driver Updates on Linux: Safe Update Procedure

A cautious driver-update workflow with compatibility checks, rollback planning, and post-update verification.

By Hostnot GPU ·

A Linux NVIDIA driver update is a host maintenance change. It can affect the kernel, CUDA applications, containers, display sessions, and every GPU user on that host. Update for a documented compatibility or security requirement, rather than because a package has a larger version number.

Decide who owns the driver

In a managed GPU instance or a rented container, the provider may own the underlying kernel and driver. A root shell inside a container does not give you a safe host-upgrade path. Request a compatible image or host intervention. The remaining maintenance steps apply only to a machine you administer with explicit authority and recovery access.

Inventory before selecting a release

uname -r
nvidia-smi --query-gpu=name,driver_version --format=csv
modinfo -F version nvidia
modinfo -F vermagic nvidia
dkms status

modinfo inspects the module on disk, which can differ from the currently loaded module during an incomplete update. dkms may be absent on a precompiled-module installation; absence is not itself a fault. Record the OS release, boot kernel, package source, driver branch, GPU model, container image digests, and framework CUDA build. Use the OS package inventory for exact installed versions.

Check the target driver's supported GPU list, OS/kernel matrix, and application compatibility. Verify whether the GPU and branch require open or proprietary kernel modules. If Secure Boot is enabled, follow the distribution's signing and key-enrollment procedure; disabling Secure Boot is not the default remedy for an unsigned module. Kernel headers must match the kernel for which a module is built.

Prepare an actual rollback

  1. Validate the target combination on a disposable host or image using a representative small workload.
  2. Save checkpoints and externally verify valuable artifacts. Drain jobs and prevent automatic rescheduling during maintenance.
  3. Retain the known-good image or full kernel/driver package set, with a supported boot/recovery route. An SSH-only rollback plan fails if the network or boot is broken.
  4. Use the existing supported package installation method and review the transaction before confirming it. Do not mix a vendor .run installation with distribution-managed driver packages or blindly purge all NVIDIA packages.
  5. Apply the distribution's documented activation/reboot procedure in the maintenance window. Do not unload busy modules or reset all GPUs while jobs are using them.

There is intentionally no universal apt install nvidia-driver-NNN command: package names, branches, module flavors, and kernel integration vary. NVIDIA's distribution chapters and version-locking guidance supply the correct transaction for your selected platform.

Verify every layer after activation

Repeat the inventory, confirm the expected boot kernel and device count, and inspect a bounded kernel-log window where authorized:

journalctl -k -b --since '-10 minutes' --no-pager
nvidia-smi -L
nvidia-smi

Then verify container visibility, a small CUDA tensor operation, and your own model or training step. nvidia-smi alone does not validate custom extensions or communication libraries. Compare error rates, memory, and elapsed time with the pre-change baseline before restoring normal traffic.

Recover by symptom

A driver/library mismatch often indicates incomplete package activation; first compare loaded and installed versions. A module-load failure needs kernel, signing, and build-log review. A framework-only error points toward its wheel or extension compatibility. If the host fails its acceptance test, roll back the coordinated kernel/driver image through the recovery path; do not iterate random installers on the failed production machine.

Maintenance and replacement can incur idle or overlapping instance costs. Set a bounded validation window, retire the old allocation only after data verification, and reconcile actual usage. Next: understand compatibility layers and collect crash evidence.

Technical references