NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

nvidia-smi keeps giving me this error message: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. after installing nvidia toolkit, Im using Linux WSL-Ubuntu with Ubuntu version 22.04.3: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local, here is the nvidia bug report:
nvidia-bug-report.log.gz (58.2 KB)

when i run the command dpkg -l | grep nvidia it gives me the following output:


ii libnvidia-cfg1-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-525 525.147.05-0ubuntu0.22.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-545:amd64 545.23.08-0ubuntu1 amd64 NVIDIA libcompute package
ii libnvidia-decode-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.9-1.1 amd64 Wayland EGL External Platform library – shared library
ii libnvidia-encode-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-extra-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-525:amd64 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii nvidia-compute-utils-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-545 545.23.08-0ubuntu1 amd64 NVIDIA compute utilities
ii nvidia-dkms-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-545 545.23.08-0ubuntu1 amd64 NVIDIA DKMS package
ii nvidia-driver-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-525 525.147.05-0ubuntu0.22.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-545 545.23.08-0ubuntu1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA kernel source package
ii nvidia-modprobe 545.23.08-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 545.23.08-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-525 525.147.05-0ubuntu0.22.04.1 amd64 NVIDIA binary Xorg driver

I have edited and attached a nvdia bug report, please help:
nvidia-bug-report.log.gz (58.2 KB)

When using WSL, you mustn’t install the driver, it doesn’t have a real gpu. Please uninstall and follw the guide:
https://docs.nvidia.com/cuda/wsl-user-guide/index.html

its still not working, I uninstalled all nvidia drivers and nvidia-toolkit with these 2 commands: sudo apt-get --purge remove "*cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \ "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" and sudo apt-get --purge remove "*nvidia*" "libxnvctrl*", after that i follow the documentation to install only wsl toolkit: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local, however when i run nvidia-smi in my wsl command line, it shows


Command ‘nvidia-smi’ not found, but can be installed with:
sudo apt install nvidia-utils-390 # version 390.157-0ubuntu0.22.04.2, or
sudo apt install nvidia-utils-418-server # version 418.226.00-0ubuntu5~0.22.04.1
sudo apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470 # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525 # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525-server # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535 # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535-server # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-510 # version 510.60.02-0ubuntu1
sudo apt install nvidia-utils-510-server # version 510.47.03-0ubuntu3

c/p from the guide:

Use /usr/lib/wsl/lib/nvidia-smi or manually add /usr/lib/wsl/lib/ to the PATH).

its not working at all, nvidia-smi doesnt locate in /usr/lib/wsl/lib, when i run ls command to see if nvidia-smi locates in there, i only received this in command line:


/usr/lib/wsl/lib$ ls
libd3d12.so libd3d12core.so libdxcore.so

Then you need to update your Windows driver. That path should be a mount from your windows filesystem.