Note: I haven't documented CUDA here. I'm lazy (and haven't tested on Arch). See https://documentation.ubuntu.com/wsl/en/latest/howto/gpu-cuda for that on Ubuntu.
So I got this working on both Ubuntu, and Arch. First, start with a fresh install (of archlinux from https://gitlab.archlinux.org/archlinux/archlinux-wsl or Ubuntu from
wsl --install Ubuntuor https://apps.microsoft.com/detail/9pdxgncfsczv).
- Install
mesaandvulkan-dzn. - Run
echo "L+ /tmp/.X11-unix - - - - /mnt/wslg/.X11-unix" | sudo tee /etc/tmpfiles.d/wslg.conf. (Thanks to microsoft/wslg#43 (comment) for this.) - Create your user account as per https://wiki.archlinux.org/title/Users_and_groups#User_management and confgure it as the default user for WSL as per https://wiki.archlinux.org/title/Install_Arch_Linux_on_WSL#Set_default_user.
suinto the user or open a new terminal tab/window.- Run:
cat << EOF
export GALLIUM_DRIVER=d3d12
for i in "/mnt/wslg/runtime-dir/"*; do
[ "$XDG_RUNTIME_DIR" = "$HOME" ] && XDG_RUNTIME_DIR="/var/run/user/$UID"
if [ ! -L "$XDG_RUNTIME_DIR$(basename "$i")" ]; then
[ -d "$XDG_RUNTIME_DIR$(basename "$i")" ] && rm -r "$XDG_RUNTIME_DIR$(basename "$i")"
ln -s "$i" "$XDG_RUNTIME_DIR$(basename "$i")"
fi
done
EOF | sudo tee /etc/profile.d/wslg.sh`
- Restart WSL with
wsl --shutdownfrom CMD/PowerShell and you should see the following (given you install the relevant packages):
$ glxinfo | grep Device
Device: D3D12 (NVIDIA GeForce RTX 4080 SUPER) (0xffffffff)
$ vulkaninfo | grep "GPU id"
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id : 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)):
GPU id : 1 (llvmpipe (LLVM 19.1.7, 256 bits)):- OpenGL should already be working. We'll add Vulkan support.
- Go to https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/.
- Look for
mesa-vulkan-drivers_*.deb. - You'll see
...<LETTER>_<ARCH>.deb. The letter corresponds to your Ubuntu version codename. In your case, "n" for Noble. - Copy the link for the right package,
https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.debin your case. - Run
wget https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/pool/main/m/mesa/mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.debanywhere you have write access to on the Ubuntu WSL instance. - Run
sudo apt install <PACKAGE>(in your case,sudo apt install mesa-vulkan-drivers_25.0.1~kisak1~n_amd64.deb. - Run:
cat << EOF
export GALLIUM_DRIVER=d3d12
for i in "/mnt/wslg/runtime-dir/"*; do
[ "$XDG_RUNTIME_DIR" = "$HOME" ] && XDG_RUNTIME_DIR="/var/run/user/$UID"
if [ ! -L "$XDG_RUNTIME_DIR$(basename "$i")" ]; then
[ -d "$XDG_RUNTIME_DIR$(basename "$i")" ] && rm -r "$XDG_RUNTIME_DIR$(basename "$i")"
ln -s "$i" "$XDG_RUNTIME_DIR$(basename "$i")"
fi
done
EOF | sudo tee /etc/profile.d/wslg.sh`
- You should see the following (given you install
mesa-utilsandvulkan-tools):
$ glxinfo | grep Device
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization
Device: D3D12 (NVIDIA GeForce RTX 4080 SUPER) (0xffffffff)
$ vulkaninfo | grep "GPU id"
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id = 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER))
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
GPU id : 0 (Microsoft Direct3D12 (NVIDIA GeForce RTX 4080 SUPER)):
GPU id : 1 (llvmpipe (LLVM 19.1.7, 256 bits)):
The reason we're using just the Vulkan driver from Kisak's repo. is that the mesa package causes llvmpipe to be used instead of D3D12. Maybe overring GALLIUM_DRIVER would work - I didn't try.


Hi, thanks by the gist.
Some tips:
1- We can add the PPA to Ubuntu and install from apt, like (It is also recommended to have the environment variables configured for the installation):
2- For cases where the computer has integrated video and a dedicated graphics card, it will probably be necessary to specify which MESA to use (https://github.com/microsoft/wslg/wiki/GPU-selection-in-WSLg), like:
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIANow my problems hehe, I did the procedure, but I still have an error...
Ubuntu 24.02
$ glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Microsoft Corporation (0xffffffff) Device: D3D12 (NVIDIA GeForce RTX 3080 Ti) (0xffffffff) Version: 25.1.4 Accelerated: yes Video memory: 43659MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 Memory info (GL_ATI_meminfo): VBO free memory - total: 11302 MB, largest block: 11302 MB VBO free aux. memory - total: 0 MB, largest block: 0 MB Texture free memory - total: 11302 MB, largest block: 11302 MB Texture free aux. memory - total: 0 MB, largest block: 0 MB Renderbuffer free memory - total: 11302 MB, largest block: 11302 MB Renderbuffer free aux. memory - total: 0 MB, largest block: 0 MB Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 12086 MB Total available memory: 43659 MB Currently available dedicated video memory: 11302 MB OpenGL vendor string: Microsoft Corporation OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3080 Ti) OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.1.4 - kisak-mesa PPA OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.1.4 - kisak-mesa PPA OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL ES profile version string: OpenGL ES 3.1 Mesa 25.1.4 - kisak-mesa PPA OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10Arch
# glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Microsoft Corporation (0xffffffff) Device: D3D12 (NVIDIA GeForce RTX 3080 Ti) (0xffffffff) Version: 25.1.4 Accelerated: yes Video memory: 43659MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 Memory info (GL_ATI_meminfo): VBO free memory - total: 11302 MB, largest block: 11302 MB VBO free aux. memory - total: 0 MB, largest block: 0 MB Texture free memory - total: 11302 MB, largest block: 11302 MB Texture free aux. memory - total: 0 MB, largest block: 0 MB Renderbuffer free memory - total: 11302 MB, largest block: 11302 MB Renderbuffer free aux. memory - total: 0 MB, largest block: 0 MB Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 12086 MB Total available memory: 43659 MB Currently available dedicated video memory: 11302 MB OpenGL vendor string: Microsoft Corporation OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3080 Ti) OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.1.4-arch1.1 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.1.4-arch1.1 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL ES profile version string: OpenGL ES 3.1 Mesa 25.1.4-arch1.1 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10