Nvidia-smi error, Failed to initialize NVML: Driver/library version mismatch

$ “nvidia-smi” results in error:
Failed to initialize NVML: Driver/library version mismatch

Unable to view GPUs using the “nvidia-smi” command. Unknown driver mismatch. Could you please advise? Additional outputs are below. Thanks!

$ “cat /proc/driver/nvidia/version”
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.01 Wed Jul 20 14:00:58 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)

$ “lsmod | grep nvidia”
nvidia_drm 61440 0
nvidia_modeset 1142784 1 nvidia_drm
nvidia 40796160 1 nvidia_modeset
drm_kms_helper 184320 4 mgag200,nvidia_drm
drm 495616 8 drm_kms_helper,drm_vram_helper,nvidia,mgag200,nvidia_drm,ttm

$ “dpkg -l | grep nvidia”
iU libnvidia-cfg1-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-450 450.51.06-0ubuntu1 all Shared files used by the NVIDIA libraries
ii libnvidia-common-515 515.65.01-0ubuntu1 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-450:amd64 450.51.06-0ubuntu1 amd64 NVIDIA libcompute package
iU libnvidia-compute-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
iU libnvidia-decode-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVIDIA Video Decoding runtime libraries
iU libnvidia-encode-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVENC Video Encoding runtime library
iU libnvidia-extra-515:amd64 515.76-0ubuntu0.20.04.1 amd64 Extra libraries for the NVIDIA driver
iU libnvidia-fbc1-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
iU libnvidia-gl-515:amd64 515.76-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ml-dev 10.1.243-3 amd64 NVIDIA Management Library (NVML) development files
rc nvidia-compute-utils-450 450.51.06-0ubuntu1 amd64 NVIDIA compute utilities
iU nvidia-compute-utils-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
ii nvidia-cuda-dev 10.1.243-3 amd64 NVIDIA CUDA development files
ii nvidia-cuda-doc 10.1.243-3 all NVIDIA CUDA and OpenCL documentation
ii nvidia-cuda-gdb 10.1.243-3 amd64 NVIDIA CUDA Debugger (GDB)
ii nvidia-cuda-toolkit 10.1.243-3 amd64 NVIDIA CUDA development toolkit
rc nvidia-dkms-450 450.51.06-0ubuntu1 amd64 NVIDIA DKMS package
iU nvidia-dkms-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA DKMS package
iU nvidia-driver-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
rc nvidia-kernel-common-450 450.51.06-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-515 515.65.01-0ubuntu1 amd64 Shared files used with the kernel module
iU nvidia-kernel-source-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA kernel source package
ii nvidia-modprobe 515.65.01-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-prime 0.8.16~ all Tools to enable NVIDIA’s Prime
ii nvidia-profiler 10.1.243-3 amd64 NVIDIA Profiler for CUDA and OpenCL
ii nvidia-settings 515.65.01-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
iU nvidia-utils-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA driver support binaries
ii nvidia-visual-profiler 10.1.243-3 amd64 NVIDIA Visual Profiler for CUDA and OpenCL
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
iU xserver-xorg-video-nvidia-515 515.76-0ubuntu0.20.04.1 amd64 NVIDIA binary Xorg driver

$ “dkms status”
Does not create an output…

There was a mis-match due to an overlapping CUDA 11.0 and 11.7 install. I fixed the issue by fully uninstalling CUDA and then reinstalling the latest version. To perform the uninstall, 1) ran “sudo apt remove autoremove”, and 2) followed the directions for the install of CUDA 11.x on CUDA Toolkit 11.8 Downloads | NVIDIA Developer

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.