Skip to content

Does WSL2 support GPU acceleration for launching Android emulators? #13671

@HappySeaFox

Description

@HappySeaFox

Is your feature request related to a problem? Please describe.

I built an AOSP Android image based off Android 14.0.0_r66. I launch the built emulator with cvd start --report_anonymous_usage_stats=n --daemon --start_webrtc=true --run_adb_connector=true. Everything works fine, except that it complains the GPU acceleration is not available and switches to a software rendering.

cvd start --report_anonymous_usage_stats=n --daemon --start_webrtc=true --run_adb_connector=true

...

GPU auto mode: did not detect prerequisites for accelerated rendering support, enabling --gpu_mode=guest_swiftshader.
GPU vhost user auto mode: not needed for --gpu_mode=guest_swiftshader. Not enabling vhost user gpu.

Describe the solution you'd like
Not sure why cvd start cannot detect the GPU acceleration. It should detect it automatically.

Describe alternatives you've considered
Running with --gpu_mode=gfxstream

Additional context

> 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.6899
wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-24.04    Running         2

In Ubuntu:

$ ls -l /dev/dxg
crw-rw-rw- 1 root root 10, 125 Nov  4 20:43 /dev/dxg

$ vulkaninfo | grep -E "apiVersion|deviceName"
        apiVersion        = 1.4.305 (4210993)
        deviceName        = llvmpipe (LLVM 20.1.2, 256 bits)

My laptop has two graphics adapters: Intel (display only) and nVidia (render only). dxdiag is attached.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions