Problem description : When executing nvidia-smi, the following error occurred .
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
straightforward sudo kill 37667
.
Reference link:
- https://stackoverflow.com/questions/43022843/nvidia-nvml-driver-library-version-mismatch