Driver issues

WSL2 GPU not detected — nvidia-smi missing or empty

Command 'nvidia-smi' not found, or NVIDIA-SMI failed because it couldn't communicate with the NVIDIA driver
By Eruo Fredoline · Last verified Jun 12, 2026

Cause

WSL2 doesn't expose your Windows-host NVIDIA GPU automatically. You need:

  • A recent Windows 11 (or Windows 10 21H2+) build
  • The NVIDIA Windows driver (NOT a Linux driver inside WSL2)
  • A WSL2 distro updated past kernel 5.10
  • Optional: nvidia-container-toolkit if you want Docker-on-WSL2 GPU access

Common mistakes:

  • Trying to install nvidia-driver-XXX inside the WSL2 distro (don't — Windows driver passes through)
  • Old WSL2 kernel that predates GPU passthrough
  • WSL1 instead of WSL2 (wsl -l -v to check; only WSL2 supports GPU)

Solution

1. Update Windows + WSL2. Run from PowerShell as admin:

wsl --update
wsl --shutdown

2. Install (or update) the NVIDIA Windows driver from nvidia.com. Even datacenter drivers work via the GeForce app.

3. Verify GPU is visible from Windows side first (cmd or PowerShell):

nvidia-smi

If this fails, fix Windows-side first.

4. Now check inside WSL2:

# WSL2 should pick up the Windows GPU automatically
nvidia-smi

5. CUDA toolkit inside WSL2 (if needed for compilation):

# Install CUDA toolkit (NOT the driver) inside WSL2
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update && sudo apt install -y cuda-toolkit-12-6

6. Docker-on-WSL2 GPU access: install nvidia-container-toolkit per the Linux local AI guide. Docker Desktop with WSL2 backend respects this.

For deployment paths, Linux is the production-default — use WSL2 for development, native Linux for production.

Related errors

Did this fix it?

If your case was different, email Contact support with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.