Skip to content

Operator task guide

How to fix CUDA driver version insufficient, NVML mismatch, and Docker GPU errors

Both CUDA driver version is insufficient for CUDA runtime version and Failed to initialize NVML: Driver/library version mismatch come from host driver vs user-space or container library drift. Unattended apt kernel/driver upgrades leave an older nvidia.ko module loaded in memory alongside newly installed user-space libraries, or a container bundles a CUDA runtime newer than the host driver.

Check the loaded kernel driver version (/proc/driver/nvidia/version) against user-space tools and container CUDA tags first. Reboot only to load a freshly upgraded kernel module, or match your container CUDA tag (or NVIDIA forward compatibility package) to the host driver.

Reviewed . Reference guidance is not a diagnosis of your workload.

Step-by-step method

  1. 1

    Compare loaded kernel module version against nvidia-smi and container CUDA

    Read /proc/driver/nvidia/version directly so you see the driver currently running in the kernel even when nvidia-smi itself fails with NVML Driver/library version mismatch.

    cat /proc/driver/nvidia/version
    dpkg -l | grep -E 'nvidia-driver|libnvidia-ml|cuda-compat'
    nvidia-smi
  2. 2

    Resolve NVML Driver/library version mismatch without breaking running jobs

    If apt upgraded libnvidia-compute/nvidia-utils in the background while the old nvidia kernel module remained loaded, either hold unattended NVIDIA updates and reboot on a maintenance window, or reload unused kernel modules if zero GPU processes are active.

    # Inspect what updated recently in apt history
    grep -i nvidia /var/log/dpkg.log | tail -n 20
    # Prevent unexpected live driver drift on Ubuntu servers:
    sudo apt-mark hold nvidia-driver-* nvidia-dkms-* libnvidia-compute-*
  3. 3

    Fix CUDA driver version is insufficient inside Docker or Kubernetes

    Match the host driver minimum table for your container CUDA runtime version, or mount NVIDIA forward compatibility (cuda-compat) when upgrading host drivers is blocked.

    docker run --rm --gpus all nvidia/cuda:12.6.0-base-ubuntu24.04 nvidia-smi
    # Check NVIDIA Container Toolkit CDI / runtime config
    nvidia-ctk --version
    sudo systemctl restart docker
  4. 4

    Debug nvidia-smi: No devices were found on Ubuntu 24.04

    When nvidia-smi reports No devices were found, check PCIe enumeration (lspci | grep -i nvidia), dmesg module load errors (Secure Boot unsigned module, missing kernel headers, or open vs proprietary kernel module mismatch on Ada/Hopper/Blackwell).

    lspci -nn | grep -i nvidia
    dmesg -T | grep -iE 'NVRM|nvidia|secureboot|module verification' | tail -n 30

Driver, NVML, and Docker error matrix

Signals, meanings and actions for how to fix cuda driver version insufficient, nvml mismatch, and docker gpu errors.
SignalWhat it meansNext action
Failed to initialize NVML: Driver/library version mismatchKernel nvidia.ko version disagrees with user-space libnvidia-ml.so.Compare /proc/driver/nvidia/version vs dpkg, reload modules or reboot in maintenance window.
CUDA driver version is insufficient for CUDA runtime versionHost NVIDIA driver is older than the container CUDA runtime.Upgrade host driver, pick matching container tag, or configure cuda-compat.
No devices were found on Ubuntu 24.04Kernel driver failed to bind GPU (Secure Boot, open/proprietary mismatch, or PCIe drop).Check lspci and dmesg for NVRM init errors or Xid 79 / open-kernel requirement.
nvidia-container-toolkit: failed to initialize NVML: unknown errorContainer runtime cgroup/systemd driver tracking or stale library mount.Check nvidia-ctk config (no-cgroups / CDI) and restart containerd or docker.

Evidence checklist

  • cat /proc/driver/nvidia/version and dpkg NVIDIA package list
  • Exact container image tag and CUDA runtime version
  • lspci -nn | grep -i nvidia output
  • dmesg -T NVRM and module load lines
  • /etc/nvidia-container-runtime/config.toml settings

Common mistakes

Leaving unattended-upgrades enabled on GPU nodes

Automatic apt upgrades bump libnvidia-ml on disk while the old nvidia.ko stays in RAM, breaking every new job with NVML version mismatch.

Using proprietary kernel modules on Blackwell/Hopper configurations requiring open modules

Verify NVIDIA driver open vs proprietary support for your exact GPU generation.

Reinstalling PyTorch to fix a host CUDA driver mismatch

The host kernel driver ceiling applies to every container unless forward compatibility is explicitly configured.

Frequently asked questions

Why does nvidia-smi say Driver/library version mismatch without a reboot?

An automatic package update upgraded the NVIDIA user-space libraries on disk while the previous NVIDIA kernel module remained loaded in RAM. Rebooting or cleanly unloading and reloading NVIDIA kernel modules resolves the mismatch; use apt-mark hold to stop recurrence.

How do I fix CUDA driver version is insufficient in Docker?

Either upgrade the NVIDIA driver on the host OS, switch to a container built against an older CUDA toolkit matching your host driver, or install the matching cuda-compat package inside the container.

Why does Ubuntu 24.04 report No devices were found after installing NVIDIA drivers?

Common causes are Secure Boot blocking unsigned DKMS kernel modules, missing linux-headers for the active kernel, or needing nvidia-driver-open modules on newer GPU generations.

What causes nvidia-container-toolkit failed to initialize NVML unknown error?

Frequently systemd cgroup driver reload issues after a Docker/containerd upgrade. Regenerate the CDI spec or set no-cgroups=false cleanly and restart Docker/containerd.

Live diagnosis, no signup

Upload your GPU log. Find what happened first.

Get the likely cause, supporting evidence, and next safe steps with the same cloud reasoning used by paid plans. A crash the engine recognizes is answered in seconds, then checked by an independent AI review that updates this page when it finishes. A crash it does not recognize waits for the AI's own answer, which can take a few minutes. No account, card, or installation. Logs are masked at Denpex API ingress and are not saved to account history.

Before uploading, review cloud data handling and local options.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

Try Denpex for 30 days. FREE.

No credit card. No automatic subscription. See whether Denpex helps with an incident you already understand.

Start your free 30-day Team evaluation

Up to 50 diagnoses a day for 30 days. Verify your work email to activate an eligible company evaluation, then replay a resolved incident and compare the evidence and next steps with your team's confirmed cause.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.

Apply the method to your incident

Use the three free diagnoses to review your error and relevant evidence. Keep reference guidance separate from the cause and recovery status of your own workload.

Diagnose your incident