NVIDIA NVML Driver/library version mismatch solution

Problem description : When executing nvidia-smi, the following error occurred .
Insert picture description here
Analysis of the cause : Because a driver was just installed, the original nvidia module was not uninstalled, which caused the new driver module to fail to load.

Solution : Restart, or uninstall the previously loaded driver

# 卸载加载的nvidia驱动
sudo rmmod nvidia_drm
sudo rmmod nvidia_uvm
sudo rmmod nvidia_modeset
sudo rmmod nvidia
# 再执行nvidia-smi就好了

If you encounter an error when uninstalling a mod, for example

, find the program that uses this module, and then kill it and uninstall it

sudo lsof /dev/nvidia*

The sample output is
Insert picture description here
straightforward sudo kill 37667.

Reference link:

  • https://stackoverflow.com/questions/43022843/nvidia-nvml-driver-library-version-mismatch

Guess you like

Origin blog.csdn.net/feifei3211/article/details/109201806