Skip to content

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

@Fede2782

Description

@Fede2782

Windows Version

Microsoft Windows [Version 10.0.26200.7462]

WSL Version

2.6.3.0

Are you using WSL 1 or WSL 2?

  • 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:

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
20260107_185859.mp4
20260107_192109.mp4

Diagnostic Logs

WslLogs-2026-01-07_20-10-31.zip
With Dumps: https://drive.google.com/file/d/1qr0btAgB3i2XCima286xZ5Jc_3RqtXMo/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions