microsoft / microsoft/WSL

Building new WSL2 Linux Kernel 6.6 disables /dev/dri (and VA-API)

Open
#11,837 11 comments 1 reaction 0 assignees View on GitHub
feature
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.20348.2582] (Windows Server 2022)

### WSL Version

2.2.4.0

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

- [X] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.36.3-microsoft-standard-WSL2

### Distro Version

Ubuntu 24.04

### Other Software

_No response_

### Repro Steps

1. Build the new [WSL2 Linux 6.6.36.3](https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-6.6.36.3) kernel release
2. Spin up a Ubuntu 24.04 (or even Ubuntu 22.04) WSL2 instance
3. Observe that `/dev/dri` is not there

### Expected Behavior

`/dev/dri` should be present just like before using the older kernel

### Actual Behavior

`/dev/dri` is missing and this makes VA-API impossible.

# Workaround
I think the issue seems to be around the way the kernel [config ](https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.6.y/arch/x86/configs/config-wsl) is set up. After much debugging, I found that `/dev/dri` is mapped using `VGEM` as described in this [commit](https://github.com/intel/libva/commit/29ac033a2998eb012b2a98fea46fc43dcdec35e4). I then noticed that in the config for the kernel, `CONFIG_DRM_VGEM=m` instead of `CONFIG_DRM_VGEM=y` like in the older WSL2 kernels. After changing the `m` to `y` for `CONFIG_DRM_VGEM` and rebuilding the WSL2 kernel, `/dev/dri` seems to show up again.

This should probably be fixed directly in the config.

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linux-msft-wsl-6.6.36.3 release and the arch/x86/configs/config-wsl file, then compare CONFIG_DRM_VGEM with the older WSL2 kernel configuration. Rebuild the kernel with the configuration change and verify that /dev/dri appears in Ubuntu 24.04 or 22.04 and that VA-API works.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.