The “nvidia-smi” command works well in the windows system. However, in wsl2 system it gets the following error
NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH
As I further look into this issue, the “libnvidia-ml.so library” is missing in the supposed path. Moreover, in the “/dev/dxg” path the GPU is not visible. The wsl2 system seems fail to detect the GPU. I also get the issue that the Nvidia driver can not be uninstalled or reinstalled in the Windows system.
I never saw that particular error, but I was banging my head against the wall for a while trying to get WSL to work before discovering that it was running in WSL v1 mode instead of v2.
If you run dmesg and it only gives a few lines, you’re probably in v1 mode.
I have run several commands to confirm the WSL kernel version. These are what I got: (Sorry for the misrepresentation in this topic. I use Ubuntu 18.04 instead of Ubuntu 20.04)
cat /proc/sys/kernel/osrelease
5.15.90.1-microsoft-standard-WSL2
wsl --list --verbose
NAME STATE VERSION
* Ubuntu-18.04 Running 2
I also tried to run “dmesg” and it also began with “Linux version 5.15.90.1-microsoft-standard-WSL2”. But I am confused with the output of the following command:
Is the output supposed to contain something like “microsoft-standard-WSL2”?
I guess that this nvidia error is related to the version of WSL2 kernel. I will try to downgrade the WSL2 kernel in the few days and I will update this topic soon.
Thank you again for your kind help! Have a nice day:)
Sorry, I’m not here often, and I’m not sure how to address your main issue, but that last one at least is an easy one… (Let’s see if I can figure out how to make a code section.)