GPU Limitations in WSL2¶
VRAM Sharing¶
GPU VRAM is shared between Windows and WSL2. There is no partitioning or reservation mechanism.
- Windows desktop compositing (DWM): ~200-500 MB
- Effectively ~15.5 GB available for CUDA workloads with the 16 GB RTX 4060
.wslconfigmemorysetting controls system RAM, not VRAM
nvidia-smi Limitations¶
nvidia-smi in WSL2 returns incomplete data vs bare metal:
| Metric | Available? |
|---|---|
| GPU name, driver version | Yes |
| Temperature, power draw | Yes |
| VRAM total/used/free | Yes |
| GPU utilization % | No |
| Active process list | No |
| Clock speeds | Partial |
For monitoring, use nvitop or gpustat with caveats about missing utilization data.
Vulkan¶
- No native NVIDIA Vulkan in WSL2.
- Vulkan is available only through Mesa's experimental Dozen driver (D3D12-to-Vulkan translation layer). Not conformant, testing-only.
- Dozen driver does not ship in standard distro packages; requires rebuilding Mesa
from source with
-D vulkan-drivers=microsoft-experimental. - No official timeline from Microsoft for proper Vulkan support.
- Impact: Vulkan-based renderers and some game engines won't work. CUDA compute is unaffected.
OpenGL¶
- OpenGL is available through WSLg (Wayland/X11 forwarding via RDP).
- Not GPU-accelerated for display rendering -- uses software rendering (llvmpipe) or D3D12 Mesa backend.
- OpenGL-CUDA interop is not supported.
- Impact: negligible for headless compute. Affects only GUI OpenGL applications.
Display Output¶
- WSL2 has no direct display output from the GPU.
- GUI apps render through WSLg (remote desktop protocol to Windows desktop).
- For headless compute (your use case), this is irrelevant.
CUDA Feature Gaps¶
| Feature | Status |
|---|---|
| Unified Memory (full managed) | Not available |
| Concurrent CPU/GPU access to managed memory | Not supported |
| Pinned system memory | Restricted availability |
| CUDA IPC (legacy APIs) | Requires driver R510+ |
| OpenGL-CUDA interop | Not supported |
| Multi-GPU device selection in containers | Only --gpus all |
Performance Overhead¶
- Compute-bound: 5-10% overhead (long GPU kernels, matrix ops)
- Kernel-launch-heavy: Up to 33% overhead (many small GPU kernels)
- I/O-bound: Higher overhead due to WSL2 filesystem virtualization
- Recommendation: Store data on ext4 (
/home/...), not NTFS (/mnt/c/...)
NVML and Monitoring Tools¶
The NVIDIA Management Library (NVML) has reduced functionality in WSL2.
Tools that depend on NVML (like some Prometheus exporters) may not report
all metrics. nvidia-smi dmon and nvidia-smi pmon have limited output.
Windows Driver Updates¶
The GPU driver exists only on the Windows side. WSL2 automatically gets updated stubs when the Windows driver is updated. You don't need to (and must not) update any driver inside WSL2.
If GPU access breaks after a Windows driver update, wsl --shutdown and
restart usually fixes it.