Nvidia L40S on Windows Server 2025 and WSL2: Failed to initialize NVML: GPU access blocked by the operating system
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.26100.32370]
### WSL Version
2.6.3.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
Linux version 6.6.87.2-microsoft-standard-WSL2 (root@439a258ad544) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
### Distro Version
Ubuntu 24.04
### Other Software
_No response_
### Repro Steps
Windows Server 2025, installed Nvidia drivers (latest version): 32.0.15.9159 in Data Center mode: WSL doesn't see Nvidia L40S card.
Under pure Windows ollama.exe works, in powershell nvidia-smi reports working of card as it should but when I try to use nvidia-smi it returns:
```
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
```
When trying to start any docker image containing AI workload it reports: CUDA not available
### Expected Behavior
Expected:
- regular nvidia-smi output
- CUDA found by eg. WebUI
### Actual Behavior
```
$ nvidia-smi
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
```
### Diagnostic Logs
[WslLogs-2026-03-03_07-48-34.zip](https://github.com/user-attachments/files/25707880/WslLogs-2026-03-03_07-48-34.zip)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the attached WslLogs-2026-03-03_07-48-34.zip and the reported WSL 2, kernel, Ubuntu, and NVIDIA driver versions. Reproduce the nvidia-smi failure and check whether the same GPU access problem affects the mentioned Docker AI workload. Done means nvidia-smi returns regular output and CUDA is available to the workload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100