CUDA driver version is insufficient for CUDA runtime version on WSL2

Been attempting to fix this problem for a good few days now. Running CUDA applications and samples results in this error, despite having a driver that should support the toolkit, e.g. for driverQuery:

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Initially followed the guide at CUDA on WSL :: CUDA Toolkit Documentation which gave me the error. Then, reinstalled the WSL2 distribution and followed the steps at Failure to install CUDA on WSL 2 Ubuntu to the same effect. Made sure to not install the driver in WSL2.

My “C:\Windows\System32\lxss\lib” directory looks like this:
image

And in WSL2, my “/usr/lib/wsl/lib” directory looks the exact same.

OS: Ubuntu 18.04 LTS on WSL2
Kernel version: 5.10.60.1
GPU: GTX 1080
Driver version: 510.06
CUDA version: 10.2 (also tried 11.5 and 11.0)

Any help would be greatly appreciated.

I had similar issues with Ubuntu 20.04 on Win10 WSL2 and was able to get it to work by upgrading my Windows 10 system to new November 2021 release (21H2) today [1][2].

  • Working: Win10 19044.1348 (21H2)
  • Not working: Win10 19043.1348 (21H1)

[1] Inside this update
[2] Enable NVIDIA CUDA on WSL 2 | Microsoft Docs

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