if Cuda and Nvidia drivers mismatch, the nvidia-smi command mismatches with Nvidia NVML Driver/library version mismatch, and needs to check the version of the Nvidia Driver to see if it matches.
enter the command as follows:
ubuntu-drivers devices
will show:
driver: nvidia-driver-418-server-distro non-free
driver: nvidia-driver-440-server-distro non-free:
driver: nvidia-driver-435-distro non-free
driver: nvidia-driver-440-distro non-free
Distro free builtin
driver: xserver-xorg-video-nouveau-distro free builtin
directly install all, command as follows:
sudo ubuntu-drivers autoinstall
then reboot p>
sudo reboot
use nvidia-smi command, found that you can see the graphics card information, and CUDA model 10.2, Driver version 440, successful match.
Tue Aug 4 21:05:21 2020
+—————————————————————————–+
Driver Version: 440.95.01 CUDA Version: 10.2 |
|——————————-+———————-+———————-+
| GPU Name Persistence-M| bb-id disp.a | Volatile uncorr.ecc |
| Fan Temp Perf Pwr:Usage/Cap| memory-usage | gpu-util Compute m. |
|===============================+======================+======================|
| 0 GeForce RTX 208… Off | 00000000:7 p.m. Off | 0 N/A | p>
23 c | 41% P8 2 12 mib/11019 w/260 w | mib | 0% Default | p>
+——————————-+———————-+———————-+