When I run nvidia-smi
I get the following message:
Failed to initialize NVML: Driver/library version mismatch
An hour ago I receiv
These answers not worked for me:
https://stackoverflow.com/a/43023000/1179925
https://stackoverflow.com/a/45319156/1179925
https://stackoverflow.com/a/54349675/1179925
dmesg
NVRM: API mismatch: the client has the version 418.67, but
NVRM: this kernel module has the version 430.26. Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.
Uninstall old driver 418.67
and install new driver 430.26
(download NVIDIA-Linux-x86_64-430.26.run
):
sudo apt-get --purge remove "*nvidia*"
sudo /usr/bin/nvidia-uninstall
chmod +x NVIDIA-Linux-x86_64-430.26.run
sudo ./NVIDIA-Linux-x86_64-430.26.run
[ignore abort]
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 430.26 Tue Jun 4 17:40:52 CDT 2019
GCC version: gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
This also happened to me on Ubuntu 16.04 using the nvidia-348
package (latest nvidia version on Ubuntu 16.04).
However I could resolve the problem by installing nvidia-390
through the Proprietary GPU Drivers PPA.
So a solution to the described problem on Ubuntu 16.04 is doing this:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-390
Note: This guide assumes a clean Ubuntu install. If you have previous drivers installed a reboot migh be needed to reload all the kernel modules.
For completeness, I ran into this issue as well. In my case it turned out that because I had set Clang as my default compiler (using update-alternatives
), nvidia-driver-440
failed to compile (check /var/crash/
) even though apt
didn't post any warnings. For me, the solution was to apt purge nvidia-*
, set cc
back to use gcc
, reboot, and reinstall nvidia-driver-440
.
I have to restart my kernels and remove all the packages that I have installed previously(during the first installation), please make sure to delete all the packages, even after removing packages by command below
sudo apt-get --purge remove "nvidia"
the packages like "libtinfo6:i386" doesn't get removed
I'm using Ubuntu 20.04 and Nvidia-driver-440 for that you have to remove all the packages shown below image
List of all the packages that need to be remove:
as shown in the image, make sure that the package you're installing is of the correct size that is 207 Mb for Nvidia-driver-440, if it's less it means you haven't removed all the packages.
I got the error failed to initialize NVML: Driver/Library version mismatch
from my nvidia-gpu-temperature-indicator. And nvidia-smi failed to print any info. I tried to find if there were other versions of nvidia driver installed in my ubuntu. But I just found nvidia-driver-390. In the end, reboot
helped me solve the problem.
I had reinstalled nvidia driver: run these commands in root
mode:
systemctl isolate multi-user.target
modprobe -r nvidia-drm
Reinstall Nvidia driver: chmod +x NVIDIA-Linux-x86_64–410.57.run
systemctl start graphical.target
and finally check nvidia-smi
Thanks to: How To Install Nvidia Drivers and CUDA-10.0 for RTX 2080 Ti GPU on Ubuntu-16.04/18.04
How to unload kernel module 'nvidia-drm'?