RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Errors / Driver issues / WSL2: torch.cuda.is_available() returns False
Driver issues
Verified by owner

WSL2: torch.cuda.is_available() returns False

torch.cuda.is_available() == False and "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver" inside WSL2
By Fredoline Eruo · Last verified Jun 12, 2026

Cause

Environment: Windows 11 + WSL2 (Ubuntu) running PyTorch / vLLM / llama.cpp.

Severity: high — GPU is invisible to the WSL distro.

  • Windows host driver too old (must be ≥ 470.76 for CUDA-on-WSL)
  • Recent Windows kernel update broke /dev/dxg passthrough (a known recurring issue)
  • WSL kernel too old (wsl --update not run since Windows install)
  • User installed Linux NVIDIA driver inside WSL — this conflicts with the host passthrough
  • Distro is WSL1 not WSL2 (wsl -l -v to verify)
  • Custom kernel without DXGKRNL support

Solution

1. Update WSL kernel from PowerShell (admin):

wsl --update
wsl --shutdown

Restart WSL afterwards.

2. Update the Windows NVIDIA driver to the latest Game Ready or Studio driver (≥ 535+):

# Verify from Windows side first
nvidia-smi

If that fails on Windows, fix host before touching WSL.

3. Verify /dev/dxg exists inside WSL:

ls -la /dev/dxg
# Should exist; if missing, kernel doesn't support GPU passthrough

4. If you installed Linux NVIDIA drivers by mistake, remove them:

sudo apt purge 'nvidia-*' libnvidia-*
sudo apt autoremove
# Reboot WSL: wsl --shutdown (from PowerShell)

5. Reinstall CUDA toolkit (NOT the driver) for compilation only:

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-4

6. Confirm:

nvidia-smi  # Should show the GPU
python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

Alternative solutions

Caveat: if a recent Windows update broke GPU-on-WSL (this has happened multiple times in the 11-26100 series), the workaround is sometimes to roll back the Windows update or install an Insider Preview build with the fix. Watch the WSL GitHub issue tracker for current advisories.

Related errors

  • CUDA driver version is insufficient for CUDA runtime version
  • PyTorch CUDA error: driver version is insufficient for CUDA runtime
  • WSL2: nvidia-smi works but PyTorch sees no CUDA / libcuda.so missing
  • WSL2 GPU not detected — nvidia-smi missing or empty
  • nvidia-smi: command not found

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.