Skip to content

Kernel 6.18.40.1 config drops CONFIG_DRM/MTRR/X86_PAT: no /dev/dri, slow video in WSL2 distros #41792

Closed

Description

Windows Version

Microsoft Windows [version 10.0.26200.9448]

WSL Version

3.0.1.0

Are you using WSL 1, WSL 2, or WSLC?

  • WSL 2
  • WSL 1
  • WSLC

Kernel Version

6.18.40.1-1

Distro Version

Ubuntu 26.04

Other Software

No response

Repro Steps

  1. Update WSL (wsl --update) so the distro runs kernel 6.18.40.1-microsoft-standard-WSL2 (WSL ). Run wsl --shutdown, then start the distro.
  2. In the distro, check for a DRM node:
   ls -l /dev/dri
   ls /sys/class/drm
   zcat /proc/config.gz | grep -E '^(# )?CONFIG_(DRM|MTRR|X86_PAT)[ =]'
  1. Run a Mesa d3d12 / VA-API client, e.g. vainfo --display drm --device /dev/dri/renderD128, or play a VP9 1080p video in VLC 4 with hardware decoding.

Environment: Ubuntu, Mesa 26.2.2 (WSL build), libva 2.23, NVIDIA RTX PRO 2000 Blackwell Laptop GPU + Intel Arc 140T, Windows 11 . The Intel Windows driver was updated at the same time as WSL, so I isolated the kernel by swapping kernels via .wslconfig (see Actual Behavior).

Expected Behavior

/dev/dri exists and Mesa/libva can open the D3D12 backend, as with 6.18.35.2 and earlier kernels (CONFIG_DRM=y, CONFIG_DRM_VGEM=m). Video playback is smooth.

Please keep CONFIG_DRM, CONFIG_DRM_VGEM, CONFIG_MTRR and CONFIG_X86_PAT enabled in the kernel used for regular WSL2 distributions (or use separate configs for the WSLC kernel and the distro kernel). If the removal is intentional, please document it, since GPU-accelerated Linux apps rely on a DRM node.

Actual Behavior

arch/x86/configs/config-wsl in linux-msft-wsl-6.18.40.1 is much smaller than in linux-msft-wsl-6.18.35.2 (header: "6.18.35.3" vs "6.18.20.1"). DRM and MTRR are disabled, and X86_PAT is no longer selectable because it depends on MTRR.

On 6.18.40.1:

  • ls /dev/dri -> No such file or directory; /sys/class/drm missing
  • MESA-EGL: warning: failed to get driver name for fd -1
  • VLC no longer reaches libva, and playback logs more than 25 frames of late video

Kernel swap tests (same distro, same video, kernel changed via .wslconfig):

Sources Config /dev/dri Playback
6.18.35.2 tag config yes smooth
6.18.40.1 tag config no late frames
6.18.40.1 6.18.35.2 config yes smooth
6.18.40.1 40.1 config + DRM=y, DRM_VGEM=m only yes still slow
6.18.40.1 40.1 config + DRM=y, DRM_VGEM=m, MTRR=y, X86_PAT=y yes smooth

So the regression is in the config, not in the 6.18.40.1 sources. Re-enabling DRM/VGEM restores /dev/dri and libva initialisation, but not performance; MTRR+PAT does. I did not profile the cause (my guess is write-combining on CPU<->GPU copies through dxgkrnl, unverified).

The WSLC container kernel has the same reduced config:

$ wslc run --rm alpine sh -c "zcat /proc/config.gz | grep -E '^(# )?CONFIG_(DRM|MTRR)[ =]'"
# CONFIG_MTRR is not set
# CONFIG_DRM is not set

Config diff 6.18.35.2 vs 6.18.40.1 attached.

Workaround: build the tag with scripts/config -e MTRR -e X86_PAT -e DRM -m DRM_VGEM, set kernel= in .wslconfig, then modprobe vgem.

Diagnostic Logs

No response

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    Logs are required for review from WSL team

    If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
    Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

    How to collect WSL logs

    Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

    Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
    Set-ExecutionPolicy Bypass -Scope Process -Force
    .\collect-wsl-logs.ps1
    

    The script will output the path of the log file once done.

    If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

    Once completed please upload the output files to this GitHub issue.

    See Collect WSL logs (recommended method).

    If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

  2. jbyibm commented on Oct 3, 2026

    @jbyibm
    Author
  3. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor
    Diagnostic information
    .wslconfig found
    Detected appx version: 3.0.1.0
    
  4. added
    wsl2
    on Oct 9, 2026
  5. fuzun commented on Nov 3, 2026

    @fuzun

    Hello,

    If I get correctly, /dev/dri that WSL provides is through vgem, which in my understanding is not real hardware (not the GPU host uses). This would explain if the performance is not high.

    I have found this project now: https://github.com/0deep/wsl-dxgkrnl-drm-patches, it may be useful for having proper DRM (Please note that I have not tested it, and I am not aware of security risks).

  6. jbyibm commented on Nov 3, 2026

    @jbyibm
    Author

    If I get correctly, /dev/dri that WSL provides is through vgem, which in my understanding is not real hardware (not the GPU host uses). This would explain if the performance is not high.

    Yes, /dev/dri comes with WSL provides it through vgem. The needed kernel modules are no longer provided since the arrival of WSLC. For me, it used the real equipment.

    I have found this project now: https://github.com/0deep/wsl-dxgkrnl-drm-patches, it may be useful for having proper DRM (Please note that I have not tested it, and I am not aware of security risks).

    Thank you a lot; I'll look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wsl2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions