Cuda-gdb can't step into kernel code in WSL2

Problem I encountered

As the topic says, I keep encountering this issue:

[Detaching after vfork from child process 5146]
WARNING: Debug interface is not enabled. Please see https://docs.nvidia.com/cuda/cuda-gdb/index.html#supported-platforms for more details.

My environment

🦄  uname -r
6.6.87.1-microsoft-standard-WSL2
🦄  nvidia-smi
Tue Oct  7 22:43:46 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64.01              Driver Version: 576.80         CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3070 ...    On  |   00000000:01:00.0  On |                  N/A |
| N/A   53C    P5             21W /  125W |    1450MiB /   8192MiB |      8%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A              33      G   /Xwayland                             N/A      |
+-----------------------------------------------------------------------------------------+

I already set `Allow access to the GPU performance counters to all users` in NVIDIA Control Panel.

And I already set all the related environment variables.

PS C:\WINDOWS\system32> reg query "HKLM\SOFTWARE\NVIDIA Corporation\GPUDebugger" /v EnableInterface

HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\GPUDebugger
    EnableInterface    REG_DWORD    0x1

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrDelay

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrDelay    REG_DWORD    0x3c

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrDdiDelay

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrDdiDelay    REG_DWORD    0x3c

PS C:\WINDOWS\system32> reg query "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /v TdrLevel

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
    TdrLevel    REG_DWORD    0x0

Hi, @1154330861

Sorry for the issue you met.

How do you access WSL2 in this case ?

I have tried :

  1. Use powershell directly.
  2. Use VS Code to connect to WSL2.

In powershell, are you using “$wsl” to enter directly ?
Asking this because we have known issue if enter into WSL by remote SSH.

I type “ubuntu” in Windows start menu, and uses the powershell terminal it provides.
I’m not sure if it has the same effect as the way you mentioned.

Hi, @1154330861
Thanks for the response ! Then this is not the same issue as I mentioned.
There is an known debugger issue with windows driver 576.80.
Can you please try with a previous driver 576.57 to have a try Driver Details | NVIDIA, thanks !

Thank you!
Is a specific version of the CUDA Toolkit required to use cuda-gdb on WSL2—such as 12.x?
I’m currently on CUDA 11.8, but I was told that cuda-gdb only works with CUDA 12.x in WSL2.

I’m using a RTX 3070ti GPU, it seems that 576.57 it’s not supported on this device.

Hi, @1154330861

You’d better use aligned CUDA version.
We didn’t test CUDA 11.8 with R575 internally, so this is not guaranteed to work.

Thanks! I’ll give it a shot.

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