Cuda device driver in WSL disappeared

I used to have a working CUDA environment on my wsl2 ubuntu 20.04 box, but after trying to install tensorflow, something broke.

My Windows build is 21327.1010, windows nvidia driver version is 470.05 and I did reinstall cuda 11.2 (from the .run file without installing the native driver).

deviceQuery returns with

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

Running strace, I can confirm that deviceQuery looks for for libcuda in /usr/lib/wsl/lib, but it fails to open
/dev/dxg, which does not exist anymore in my wsl system.

output from dmesg |grep dxg gives the following:
[ 7.557913] dxgk:err: dxg_drv_init Version: 5
[ 7.557917] hv_vmbus: registering driver dxgkrnl

If I reinstall the driver ( 470.05_gameready_win10-dch_64bit_international.exe) from the windows system, while the wsl box is open, /dev/dxg reappears and deviceQuery works (as well as any other CUDA application).

But after rebooting the host system, /dev/dxg is gone again.

I suspect it is caused by issues with this windows build - 21327 - more discussion of this here:

1 Like

Get same failure with build 21354.1 [no /dev/dxg with dxgk:err: dxg_drv_init Version: 5]

Nvidia drivier 470.14
Environment: ubuntu 20.04 on wsl2
Kernel: 5.4.91-microsoft-standard-WSL2
Cuda 11.1 installed from the .run file wo/ driver

Same here. winver shows build 21354.1
no /dev/dxg

How/where are you seeing that “dxgk:err: dxg_drv_init Version: 5” error?

Also, I installed nvidia drivers on Windows, not WSL. So I didn’t use the .run file. I see my CUDA version listed as 11.3… Is that valid? Am I on some beta which I lucked into? I couldn’t find any trace of 11.3 anywhere on the drivers site.

I think dmesg will show the errors - If build 21354 is the latest build, you have to roll it back to make the driver work again I think.

I did install the most recent upgrade a few days ago and it nuked the driver again.
I rolled back to 21343, which works.

nice… I need to figure out how to rollback too… Still new at Windows Insider builds…

oooh… I mistakenly deleted the “older builds” to get back a considerable amount of space on my primary disk… Guess I’ll have to wait for the next WIP…