Cannot get Cuda Toolkit to correctly install on WSL 2

Hi, I have tried to follow CUDA on WSL :: CUDA Toolkit Documentation
The install doesn’t give any errors but there are no files in the /usr/lib/wsl/lib or /usr/lib/wsl/drivers directories. So naturally there is no nvidia-smi or anything. I have tried resetting WSL and starting from scratch a few times and this didn’t help.

OS: Windows 10 x64, 21H2 Build 19044.1706
GPU: RTX 2080 Ti
CPU: i7-8700k
Driver: Game Ready 512.95
WSL 2, Kernel
WSL OS: Ubuntu 20.04


From your data you shared, there doesn’t seem to be anything obviously wrong. Could you check the following just to be sure?:

  • Check if your WSL distribution is running WSL 2 by running “wsl -l -v”. This can happen if you move to WSL 2 and didn’t update existing environment or if the default version was not change to WSL 2. If it is WSL 1 you can simply upgrade that distribution to WSL 2.
  • Check if the subsystem is up to date by running “wsl --update”. Make sure to read the output and verify it succeed, the update might fail for instance if you force disabled Windows Update services.
  • Last if all of the above still doesn’t work could you run dxdiag.exe and share the output. We can look at those logs to see if somethings look off.

Thanks !

Thank you, I had fully upgraded the kernel and set the default version prior to setting up the WSL OS using ‘wsl --set-default-version 2’ but it looks like it did not use WSL 2 by default… running ‘wsl --set-version Ubuntu-20.04 2’ and then re-installing Cuda toolkit resolved the issue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.