现象:

执行nvidia-smi提示Driver/library version mismatch

root@shgpu02:~# nvidia-smi

Failed to initialize NVML: Driver/library version mismatch

解决:

依次rmmod nvidia_uvm nvidia_drm  nvidia_modeset  nvidia,再次执行nvidia-smi就正常了

root@shgpu02:~# rmmod nvidia

rmmod: ERROR: Module nvidia is in use by: nvidia_uvm nvidia_modeset

root@shgpu02:~# rmmod nvidia_uvm

root@shgpu02:~# rmmod nvidia

rmmod: ERROR: Module nvidia is in use by: nvidia_modeset

root@shgpu02:~# rmmod nvidia_modeset

rmmod: ERROR: Module nvidia_modeset is in use by: nvidia_drm

root@shgpu02:~# rmmod nvidia_drm

root@shgpu02:~# rmmod nvidia_modeset

root@shgpu02:~# nvidia-smi

Failed to initialize NVML: Driver/library version mismatch

root@shgpu02:~# rmmod nvidia

root@shgpu02:~# nvidia-smi