Introduction
I heard about Asahi Linux back in the early days and became one of its followers/supporters. I believe having the arm ecosystem and an option to run linux on mac systems a must first step in many developments including fully adapability in an newer architecture. This guide is for owners of M1 or M2 macs running fedora linux 40 in order to run steam games.
For the past little while I have been diving into this Linux stack trying to replicate the rumored steam installation and running of various games on Fedora Linux on a mac. The source of this material is from slp's blog and also Rob Clark’s XDC 2022 talk about Virtgpu DRM native context, a novel technique that brings close-to-native GPU performance to VMs.
The problem with Asahi Linux is a paging size problem in running steam which requires 4k pages while the operating system uses 16k pages. The x86_64 games on steam runs on 4k size pages. Understand the experimental nature of doing this. Do not bug the Asahi Liux Developers about this. This guide can break at any time. It is working as of May 2024.
The Guide
Install Fedora Remix 40
https://asahilinux.org/fedora/
Install Distrobox
sudo dnf copr enable alciregi/distroboxsudo dnf install distrobox
Use distrobox to create image
distrobox create --image quay.io/fedora/fedora-toolbox:40-aarch64 --name asahi-krun --volume ~/.config/pulse
Enter Distrobox
distrobox enter asahi-krunInstall krun and dependencies inside the container
sudo dnf copr enable slp/asahi-mesa-wipsudo dnf copr enable teohhanhui/asahi-krun
sudo dnf --best install alsa-lib alsa-plugins-pulseaudio alsa-utils dhclient eglinfo glmark2 glx-utils libkrun mesa-demos mesa-dri-drivers passt pipewire-libs pulseaudio pulseaudio-libs pulseaudio-utils sommelier virglrenderer xorg-x11-server-Xwayland --exclude pipewire
cd ~/Downloads
git clone https://github.com/slp/krun.git
cd krun
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. ~/.cargo/env
sudo dnf group install c-development
sudo dnf install clang-devel libkrun-devel llvm-devel
cargo build --release
sudo cp target/release/krun{,-guest} /usr/local/bin/
sudo chmod +x /usr/local/bin/krun{,-guest}
sudo chown -R $USER: ~/.config/pulse