I am following this page to install CUDA in Kali Linux but after the installation is complete I am getting this error when I run nvidia-smi:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
I have Kali installed on my laptop as a dual boot and here is the result of running
lspci -s 07:00.0 -v
on my machine:
07:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
Subsystem: Lenovo GK208M [GeForce GT 740M]
Flags: bus master, fast devsel, latency 0, IRQ 10
Memory at b3000000 (32-bit, non-prefetchable) [size=16M]
Memory at a0000000 (64-bit, prefetchable) [size=256M]
Memory at b0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 4000 [disabled] [size=128]
Expansion ROM at [disabled]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] Secondary PCI Express
Kernel modules: nvidia
[ 772.425] (WW) NVIDIA(0): The NVIDIA GeForce GT 740M GPU installed in this system is
[ 772.425] (WW) NVIDIA(0): supported through the NVIDIA 470.xx Legacy drivers. Please
[ 772.425] (WW) NVIDIA(0): visit Unix Drivers | NVIDIA for more
[ 772.425] (WW) NVIDIA(0): information. The 495.29.05 NVIDIA driver will ignore this
[ 772.425] (WW) NVIDIA(0): GPU. Continuing probe…
Best you install the driver through the repository, not the .run file.
See this guide (for buster, but should work with sid as well (just change buster to sid in the sources file)).
forgot…
Looks like you installed from the .run file. Before attempting a repo install, uninstall from the .run file with the --uninstall option! Otherwise you risk a messed up system.
I did but when I try to install CUDA there is no other version to be installed and it throws kernel version mismatch and replaces it after restart. By the way after installing the legacy drivers nvidia-smi still does not work
So you are trying to install full CUDA… guessing from the nvidia .run file? That would install another driver (if you do not omit that step).
You should just install cuda-toolkit instead.
What version of the legacy drivers did you install?
If you did a .run file installation again, I suggest you uninstall it with the --uninstall option. Then re-install the repo drivers. Then install cuda-toolkit.
If it does not work after that, create a new bug-report.