Skip to content

WSLg fails to initialize AMD Radeon Graphics on Ryzen 5 7520U (dxgkrnl Ioctl failed: -22) #13460

Description

Windows Version

Microsoft Windows [Version 10.0.26100.4946]

WSL Version

WSL version: 2.5.10.0 Kernel version: 6.6.87.2-1 WSLg version: 1.0.66 MSRDC version: 1.2.6074 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.1742

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 6.6.87.2-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 12.3.0, GNU ld (GNU Binutils) 2.40.0.20230214) #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025

Distro Version

Arch Linux (Rolling Release)

Other Software

  • Hyprland (Wayland Compositor)
  • mesa-utils (specifically glxinfo)
  • kitty (Terminal Emulator)

Repro Steps

  1. On a system with an AMD Ryzen 5 7520U APU, ensure the latest official AMD Adrenalin drivers are installed on the Windows host.
  2. Install a fresh instance of Arch Linux for WSL (ArchWSL).
  3. Inside Arch, install a Wayland compositor that requires hardware acceleration, such as Hyprland (sudo pacman -S hyprland).
  4. Attempt to launch the compositor by running Hyprland in the terminal.
  5. Observe the crash and check the WSL kernel logs for driver errors by running dmesg | grep -i 'dxg'.

Expected Behavior

When launching a Wayland compositor like Hyprland, it should start successfully. The underlying graphics stack should detect and utilize the host's AMD Radeon(TM) Graphics via the D3D12 backend, providing full hardware acceleration.

The dmesg log should show a clean and successful initialization of the dxgkrnl driver without any Ioctl failed errors. The output of glxinfo -B should report the device as D3D12 (AMD Radeon(TM) Graphics).

Actual Behavior

The Wayland compositor (Hyprland) fails to launch and crashes immediately with a CBackend::create() failed! error. The application log indicates that it is only able to see the Microsoft Corporation Basic Render Driver, not the actual AMD GPU.

This is corroborated by the WSL kernel log (dmesg), which shows multiple critical errors during the initialization of the dxgkrnl driver:

misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22

As a result of this low-level driver failure, the entire graphics stack falls back to software rendering. glxinfo -B confirms this, reporting the renderer as llvmpipe with Accelerated: no.

Diagnostic Logs

The core of the issue seems to be a low-level failure in the WSL kernel driver (dxgkrnl) responsible for GPU communication. The dmesg log shows repeated ioctl failed errors when querying the host adapter. This indicates a fundamental communication breakdown between the WSL2 kernel and the host driver.

dmesg log showing kernel-level driver failure:

[ 0.554884] hv_vmbus: registering driver dxgkrnl
[ 2.427304] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
[ 2.431788] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 2.432490] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 2.433162] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 2.434074] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2

System Hardware & Driver Information:

  • CPU/APU: AMD Ryzen 5 7520U with Radeon Graphics
  • AMD Driver: Adrenalin Edition, Version 32.0.21025.1024 (Date: 7/24/2025)

Hyprland Crash Log (Symptom):

[LOG] GPU information:
8c56:00:00.0 3D controller [0302]: Microsoft Corporation Basic Render Driver [1414:008e]

...

terminate called after throwing an instance of 'std::runtime_error'
what(): CBackend::create() failed!

glxinfo Output (Symptom):

direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0xffffffff)
Device: llvmpipe (LLVM 20.1.8, 256 bits) (0xffffffff)
Version: 25.2.1
Accelerated: no
...
OpenGL renderer string: llvmpipe (LLVM 20.1.8, 256 bits)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions