Hi all,
I’m trying to get CUDA working in WSL 2 (Ubuntu 22.04) with an NVIDIA GeForce RTX 3080 Ti on Windows 11 Education (24H2), but I’m running into issues where the GPU is not being recognized in WSL.
When I run nvidia-smi
inside WSL, I get:
$ nvidia-smi
Unable to determine the device handle for GPU0: 0000:C1:00.0: Unknown Error
Unable to determine the device handle for GPU1: 0000:E1:00.0: Unknown Error
No devices were found
On Windows I have successfully installed cuda_12.8.1_572.61_windows. (The driver version is 572.61.) I have also tried the latest driver 576.52 without success.
I would be very grateful for any suggestion on how to further troubleshoot the problem. Below I have already collected a bunch of system information, I hoped might be helpful.
I followed the following installation guide for setup:
The Windows-native nvidia-smi
version works as expected:
$ /mnt/c/Windows/system32/nvidia-smi.exe
Sat May 24 14:55:46 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 572.61 Driver Version: 572.61 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA T1000 TCC | 00000000:C1:00.0 Off | N/A |
| 70% 83C P0 N/A / 50W | 571MiB / 4096MiB | 100% E. Process |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 1 NVIDIA GeForce RTX 3080 Ti WDDM | 00000000:E1:00.0 On | N/A |
| 0% 47C P8 23W / 350W | 1975MiB / 12288MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 1 N/A N/A 844 C+G ...eafile\bin\seafile-applet.exe N/A |
Note: What appears as NVIDIA T1000 is my GRAID RAID adapter.
$ wsl --version
WSL version: 2.4.13.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.4061
WSL Kernel in Ubuntu:
$ uname -r
5.15.167.4-microsoft-standard-WSL2
$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce RTX 3080 Ti) (0xffffffff)
Version: 23.2.1
Accelerated: yes
Video memory: 77367MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 4.2
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3080 Ti)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
$ ls /usr/lib/wsl/lib/
libcuda.so libnvcuvid.so libnvidia-opticalflow.so
libcuda.so.1 libnvcuvid.so.1 libnvidia-opticalflow.so.1
libcuda.so.1.1 libnvdxdlkernels.so libnvoptix.so.1
libcudadebugger.so.1 libnvidia-encode.so libnvoptix_loader.so.1
libd3d12.so libnvidia-encode.so.1 libnvwgf2umx.so
libd3d12core.so libnvidia-ml.so.1 nvidia-ngx-updater
libdxcore.so libnvidia-ngx.so.1 nvidia-smi
Docker on Windows also fails to access the GPU:
PS C:\Users\XXX> docker run --gpus all -it --rm nvidia/cuda:12.3.1-base-ubuntu20.04 nvidia-smi
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: detection error: nvml error: unknown error: unknown
[...]
PS C:\Users\XXX> docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
[...]