microsoft / microsoft/WSL

OpenGL hardware acceleration support broken on WSL2 and causes issues to whole Windows OS

Open
#14,033 15 comments 4 reactions 0 assignees View on GitHub
GPU
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.26200.7462]

### WSL Version

2.6.3.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.87.2-microsoft-standard-WSL2

### Distro Version

Ubuntu 24.04.3 LTS

### Other Software

Intel Arc Graphics GPU driver version: 32.0.101.8331 (WHQL Certified)

### Repro Steps

On a clean windows installation, enable wsl2 support and install a distro. For these tests the default distro, "Ubuntu", has been used. The command currently installs Ubuntu 24.04.3 LTS which is what has been used. All WSL2 configuration options have been left untouched and kernel being used is default one.

1) open the new distro and complete setup
2) update all packages normally with apt and reboot the instance
3) install "mesa-utils" package to check status of OpenGL support.

Checking the command output you will be able to see that OpenGL hardware acceleration will be marked as unsupported. We can also see that by default the software fallback "llvmpipe" is being used.

Image

According to various official WSL annoucements and documentation, hardware accelerated OpenGL should be supported on recent versions:
- https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps (1)
- https://github.com/microsoft/wslg/wiki/GPU-selection-in-WSLg (2)
- https://devblogs.microsoft.com/commandline/d3d12-gpu-video-acceleration-in-the-windows-subsystem-for-linux-now-available/ (3)

So, as reported in various official resources, I should be able to use accelerated GPU rendering if I have a supported distro (1) and GPU driver (3). Both conditions are satisfied but still no hardware acceleration.

We can follow instructions on 3 to officially check if GPU rendering is available. Installing tools to check and mesa drivers. An additional reboot is done. Immediately we can see that they don't even work as "/dev/dri/card0" is missing because of the "vgem" kernel driver not being loaded.

If you are wondering the "LIBVA_DRIVER_NAME=d3d12" variable is set from now on.

At this point I have added "vgem" kernel module to be loaded automatically and added my user to "video" and "render" group and rebooted again. Still no luck, "vainfo" still fails and "glxinfo" still shows software rendering and no acceleration as shown above.

Image

Looking at other issues I have tried to play with some environment variables, the only one which changed the situation has been "GALLIUM_DRIVER=d3d12". After setting this, both "vainfo" and "glxinfo" started showing the correct GPU with enabled hardware acceleration and "vainfo" output matching the expected one in (3).

Image

Image

The "GALLIUM_DRIVER=d3d12" variable is set when running every program from now on.

However this just caused all GPU hardware accelerated apps to fail and Windows OS to start having issues too. I tested Google Chrome, Microsoft Edge, blender but the most dramatic one has been glxgears.

Opening the two browsers and Blender cause the Windows display to have issues. The display initially goes all black and then reappears. This often occurs in an infinite cycle unless I kill the program. In one of the tests, trying to open Google Chrome again after closing it has caused a BSOD where the interested file is "dxgkrnl.sys". However I wasn't able to reproduce the BSOD anymore.

glxgears, on the other hand, has a totally different behiavour. As soon as it is opened the Windows OS completely freezes. No input is accepted but the cursor still moves for some time. System just hangs like this forever, trying to do CTRL+C didn't help in any way. CTRL+ALT+CANC also has no effect on the system. Only solution is a forced reboot via power button.

### Expected Behavior

According to Microsoft official resources (1), WSL2 should support GPU hardware acceleration, OpenGL in this case, by default without any user intervention. Reading document (3) we can see that some more steps are requires, yet they don't fix the issue in any way as it continues to fallback to software rendering without acceleration on clean installations of supported WSL2 instances.

I should be able to use GPU hardware acceleration in applications installed on WSL2.

### Actual Behavior

Image

https://github.com/user-attachments/assets/c3c4b659-e76e-4f1f-8ce6-619f2e926147

https://github.com/user-attachments/assets/ee00316d-6581-4df5-80f9-9d5fbfaade25

### Diagnostic Logs

[WslLogs-2026-01-07_20-10-31.zip](https://github.com/user-attachments/files/24479344/WslLogs-2026-01-07_20-10-31.zip)
With Dumps: https://drive.google.com/file/d/1qr0btAgB3i2XCima286xZ5Jc_3RqtXMo/view?usp=sharing

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with mesa-utils, vainfo, glxinfo, and the documented WSL GPU setup, then review the attached WSL diagnostic logs and dumps. Investigate the OpenGL fallback and GALLIUM_DRIVER=d3d12 behavior; done means hardware acceleration works by default without display corruption, freezes, or Windows crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
computer-graphics, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.