Recently on XDC 2024, Alyssa Rosenzweig announced support for Vulkan 1.3 in Mesa, as well as gaming in Steam, using muvm (ex krunvm) and FEX: https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/

Vulkan

To get started, you need to run apt update && apt upgrade and should get:
mesa 24.2.0~pre20241006-1asahi2.24.04

Mesa should bring you Vulkan 1.3 support:

$ vulkaninfo | grep -C1 HoneykrispWARNING:
 driverID         = DRIVER_ID_MESA_AGXV
 driverName       = Honeykrisp
 driverInfo       = Mesa 24.2.0~pre20241006-1asahi2.24.04

Steam

Steam is a bit more complicated, as it depends on multiple components, which are not all packaged in Ubuntu yet.
We'll install them to /usr/local for now.

Virglrenderer

apt install virglrenderer should install virglrenderer 1.0.1~asahi-20240925-1asahi1.24.04

Sommelier

Based on https://src.fedoraproject.org/rpms/chromiumos-platform/blob/rawhide/f/chromiumos-platform.spec

$ mkdir -p asahi
$ cd asahi
$ git clone https://chromium.googlesource.com/chromiumos/platform2.git sommelier
$ cd sommelier
$ git checkout 67bc17ea79b4ff1b449053e5fcf3375ff6b30690
$ cd sommelier/vm_tools/sommelier

$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0001-Revert-sommelier-bump-up-CROSS_DOMAIN_MAX_IDENTIFIER.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0002-vm_tools-sommelier-align-mem-operations-to-16K.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0003-vm_tools-sommelier-don-t-call-to-fixup_plane0.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0004-vm_tools-sommelier-Do-not-assert-on-unsued-wayland-i.patch
$ patch -p3 <0001-Revert-sommelier-bump-up-CROSS_DOMAIN_MAX_IDENTIFIER.patch 
$ patch -p3 <0002-vm_tools-sommelier-align-mem-operations-to-16K.patch 
$ patch -p3 <0003-vm_tools-sommelier-don-t-call-to-fixup_plane0.patch 
$ patch -p3 <0004-vm_tools-sommelier-Do-not-assert-on-unsued-wayland-i.patch

$ mkdir build
$ meson -Dxwayland_path=/usr/bin/Xwayland -Dgamepad=true -Dquirks=true -Dwith_tests=false build
$ ninja -C build
$ sudo cp build/sommelier /usr/local/bin/sommelier

Rust

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
$ . "$HOME/.cargo/env"

libkrunfw

$ cd asahi
$ git clone https://github.com/containers/libkrunfw.git
$ cd libkrunfw
$ GPU=1 VIRGL_RESOURCE_MAP2=1 BLK=1 NET=1 SND=1 make
$ sudo make install

libkrun

$ cd asahi
$ git clone https://github.com/containers/libkrun.git
$ cd libkrun
$ echo '    println!("cargo:rustc-link-arg=-L/usr/local/lib64");' >> src/libkrun/build.rs
$ make
$ sudo make install

muvm

$ cd asahi
$ git clone https://github.com/AsahiLinux/muvm.git
$ cd muvm
$ echo '    println!("cargo:rustc-link-arg=-L/usr/local/lib64");' >> crates/krun-sys/build.rs
$ cargo build --release
$ sudo cp target/release/muvm /usr/local/bin/
$ sudo cp target/release/muvm-guest /usr/local/bin/
$ sudo cp target/release/muvm-server /usr/local/bin/

hidpipe

$ cd asahi
$ git clone https://github.com/AsahiLinux/hidpipe.git
$ cd hidpipe
$ cargo build --release
$ sudo cp target/release/hidpipe-client /usr/local/bin/
$ sudo cp target/release/hidpipe-server /usr/local/bin/

FEX

$ sudo add-apt-repository ppa:fex-emu/fex
$ sudo apt install fex-emu-armv8.4 fex-emu-binfmt64 fex-emu-binfmt32

FEX root fileystem

FEX needs a root filesystem based on the same Ubuntu release that is running locally, but with i386 and amd64 packages, in order to support 32 and 64 bit applications.

A FEX root fs can be created with https://github.com/FEX-Emu/RootFS but needs to few customizations, in order to have the same mesa version in the VM as locally.

TODO

Steam

Based on https://pagure.io/fedora-asahi/steam/blob/main/f/steam.spec

$ cd asahi
$ git clone https://pagure.io/fedora-asahi/steam.git
$ sudo apt install python3-pyqt6

Launch Steam

Run a Python wrapper to start hidpipe, FEXBash inside muvm and execute Steam's launch script at ~/.local/share/fex-steam/steam-launcher/bin_steam.sh

$ LD_LIBRARY_PATH=/usr/local/lib64 python3 asahi/steam/shim.py

Unfortunately, this doesn't work properly yet, because the FEX root fs has a known bug causing dhcpcd to not create /etc/resolv.conf, resulting in failing DNS resolution in FEX. So you won't be able to install/update anything in Steam.

For now, we'll have to do things a bit manually:

$ echo '~/.local/share/fex-steam/steam-launcher/bin_steam.sh -cef-force-occlusion -cef-force-opaque-backgrounds -gamepadui' >~/.local/share/fex-steam/steam-launcher/launch.sh
$ chmod +x ~/.local/share/fex-steam/steam-launcher/launch.sh
$ hidpipe-server &
$ LD_LIBRARY_PATH=/usr/local/lib64 muvm bash
$ echo "nameserver 1.1.1.1" >/etc/resolv.conf
$ FEXBash -c ~/.local/share/fex-steam/steam-launcher/launch.sh