Skip to content

Instantly share code, notes, and snippets.

@teohhanhui
Last active December 23, 2024 09:18
Show Gist options
  • Save teohhanhui/042a395010d9946ceee14768736e3780 to your computer and use it in GitHub Desktop.
Save teohhanhui/042a395010d9946ceee14768736e3780 to your computer and use it in GitHub Desktop.
Asahi Linux - krun + FEX + Steam

Nothing to see here.

What you want is https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/

But if you have previously followed this guide, use the following to switch:

Cleanup

rm -rf ~/.fex-emu
rm ~/.local/bin/{asahi-krun-overlay-fex-rootfs,FEXBash,krun,krun-guest,steam}
rm ~/.local/share/applications/steam.desktop
rm -rf ~/.local/share/asahi-krun
DBX_CONTAINER_MANAGER=podman distrobox rm asahi-krun

Install Steam (on the host)

sudo dnf upgrade --refresh
sudo dnf install --best --setopt=allow_vendor_change=true steam
sudo dnf remove dhcpcd

You might have to reboot the system.

@D3fus
Copy link

D3fus commented Aug 21, 2024

@Pickles888 i used the nixpkgs-unstable to pull libclang in a nix shell. But it depends how your nixos is setuped.

nix shell nixpkgs#distrobox nixpkgs#llvm_18 nixpkgs-unstable#libclang

@teohhanhui
Copy link
Author

teohhanhui commented Aug 21, 2024

Heads up... I need to figure out how to make Steam / Proton (successfully) use the asahi driver with this new setup... So, gaming is mostly broken for now. Oops... 🙇

EDIT: Done.

@teohhanhui
Copy link
Author

@aqrln I see Prisma is hiring a Rust developer (again). Trying my luck once again... But geographical / timezone discrimination is very real, even if I'm open to relocation and/or willing to work within the specified timezones... 🙈

@naanlizard
Copy link

Anyone have any luck with dota 2? Considering taking the plunge with my macbook m1 max, but don't want to spend a day to find out it doesn't work haha

@MicahBird
Copy link

MicahBird commented Aug 24, 2024

Heads up to anyone encountering the "Something went wrong while attempting to sign you in. Please try again later." error with an error code of "c-ftac". I had to temporarily (you must leave it disabled) disable Steam Guard for Steam to actually sign in. Hope this helps!
Screenshot_20240824_163304

@waterdragon78
Copy link

I don't think I can make a pull request but very minor, could you add installing dhclient somewhere for fexfsrootfetcher? It needs it.

@waterdragon78
Copy link

Also for "unshare -pfr --user --mount --kill-child /usr/bin/bash" does anyone else get

basename: missing operand
Try 'basename --help' for more information.

@teohhanhui
Copy link
Author

teohhanhui commented Aug 26, 2024

@waterdragon78 We use dhcpcd, not dhclient which has been deprecated for a long time.

Please share the specific error messages if it doesn't work for you.

basename: missing operand

That's fine. Just ignore it.

@eetgeenappels
Copy link

Steam launches and I am able to navigate ui but consumes a ton of memory and eventually crashes. Got anyone an idea of how to fix it?

@teohhanhui
Copy link
Author

@eetgeenappels It's being fixed / will be fixed eventually. For now, just make sure you allocate enough zram (at least 16G), and keep an eye on the memory consumption with a widget or something... Not running a Web browser at the same time really helps.

@teohhanhui
Copy link
Author

If you end up here while fex-emu is not in the Fedora stable repo yet, you can download fex-emu-2408-1.fc40.aarch64.rpm from https://koji.fedoraproject.org/koji/buildinfo?buildID=2537498 and do

sudo dnf install ~/Downloads/fex-emu-2408-1.fc40.aarch64.rpm --exclude erofs-fuse --exclude erofs-utils

@m1m1k4tz
Copy link

Box64 is working on something called box32 which should be kinda like wow64 for Linux I would try packaging steam like you did for wine to use with box64 only 64 bit games would work until proton is updated to use wow64

@m1m1k4tz
Copy link

I’m also tracking this here ptitSeb/box64#1780

@Spidy123222
Copy link

Seems to be steam doesn’t boot with this setup anymore for me. Tried even a full reinstall with no fix. I tried to see if it was SElinux or steam runtime but couldn’t get it going.

run.sh[376]: steam-runtime-identify-library-abi --ldconfig-paths failed, falling back to ldconfig run.sh[376]: Warning: An unexpected error occurred while executing “/sbin/ldconfig -XNv”, the status was 139
mkdir: /home/asahiuser/local/share/Steam/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu/libselinux.so.1: no version information available (required by mkdir)

@teohhanhui
Copy link
Author

teohhanhui commented Sep 6, 2024

@Spidy123222 Is that a copy and paste error in the error output? It's supposed to be ~/.local/share/Steam, not ~/local/share/Steam 🤔

By the way, did you make sure to use the updated versions of all the wrapper scripts from this gist? (e.g. ~/.local/bin/steam)

@orange200213
Copy link

orange200213 commented Sep 10, 2024

Hi,thank you for doing a lot for us!
When I installed box64 and wine and try to install a windows version steam,it says

0024:err:environ:init_peb starting L"Z:\\home\\orange\\SteamSetup.exe" in experimental wow64 mode
wine: failed to load L"\\??\\C:\\windows\\syswow64\\ntdll.dll" error c0000135

And I found there is no file generated in .wine/drive_c/windows/syswow64
What should I do? I regenerated wineprefix but it does not work.

@teohhanhui
Copy link
Author

@orange200213 I'm not sure, but the file is there for me. Anyway, I didn't manage to get the Windows version of Steam working.

@orange200213
Copy link

@orange200213 I'm not sure, but the file is there for me. Anyway, I didn't manage to get the Windows version of Steam working.
I tried wine-9.17-wow64, steam can be installed but when steam upgrades, it seems that it can not find ProgramData so it can not be upgraded.But I think we will soon play steam games on asahi in the future.Thank you!

@jih9uhuuh9
Copy link

jih9uhuuh9 commented Sep 13, 2024

"No IPv6 nameserver available for NDP/DHCPv6
Using default interface naming scheme 'v255'.
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: configure event loop: 0.000354208 seconds
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: drm device: 0.0461986 seconds
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: connect display: 2.0542e-05 seconds
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: client create: 1.7083e-05 seconds
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: display implementation: 2.209e-06 seconds
INFO sommelier-scope-timer.cc:30 ~ScopeTimer: spawn xwayland: 0.000210708 seconds
Failed to execute "FEXRootFSFetcher" as child process: No such file or directory (os error 2)
The XKEYBOARD keymap compiler (xkbcomp) reports:

Warning: Unsupported maximum keycode 708, clipping.
X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
FATAL sommelier.cc:2960 sl_handle_x_connection_event: got error or hangup (mask 5) on X connection, exiting"
I get this error when running the rootfs command
I cannot do the RootFS step, and this command worked before but not anymore.

@jih9uhuuh9
Copy link

but how to follow this guide?

@teohhanhui
Copy link
Author

teohhanhui commented Sep 14, 2024

@jih9uhuuh9 Read from top to bottom (sometimes there are links that jump you back to a previous section because I don't want to repeat myself). Run one command at a time. You can stop when you come to the optional sections.

@Lao-Ben
Copy link

Lao-Ben commented Sep 17, 2024

Thank you for writing this guide ! I succeeded to run steam and games using it a few weeks ago.
But now i'm unable to complete the FEX RootFS step on a new install of Asahi Fedora Remix.

krun FEXRootFSFetcher -y -x --distro-name=fedora --distro-version=40 returns

Failed to execute "FEXRootFSFetcher" as child process: No such file or directory (os error 2)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
FATAL <sommelier.cc:2960> sl_handle_x_connection_event: got error or hangup (mask 5) on X connection, exiting

Should I use an older version of FEX ?
@jih9uhuuh9 Have you found a solution for that error ?

EDIT:
It worked with that version of fex-emu

If you end up here while fex-emu is not in the Fedora stable repo yet, you can download fex-emu-2408-1.fc40.aarch64.rpm from https://koji.fedoraproject.org/koji/buildinfo?buildID=2537498 and do

sudo dnf install ~/Downloads/fex-emu-2408-1.fc40.aarch64.rpm --exclude erofs-fuse --exclude erofs-utils

@nr23730
Copy link

nr23730 commented Sep 17, 2024

You have to install fex-emu-utils.

@TheScreechingBagel
Copy link

krun seems to be packaged in fedora now

@m1m1k4tz
Copy link

I just tried to follow this guide in a fedora toolbox using the packaged krun but I get /home/alex/.local/bin/krun: line 25: exec: distrobox-host-exec: not found is there any reason why it couldn't be shouldn't be compatible with toolbox as well? I think it has a similar command called toolbox run

@m1m1k4tz
Copy link

To get it to use version 40 you need to do -r 40 because for some reason toolbox is stuck on 38 on asahi linux

@Pickles888
Copy link

📦[asynth@asahi-krun krun]$ krun FEXRootFSFetcher -y -x --distro-name=fedora --distro-version=40
thread '<unnamed>' panicked at src/vmm/src/builder.rs:361:49:
called `Result::unwrap()` on an `Err` value: TooLarge
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 4282217296
Aborted (core dumped)

I'm getting an error on the Set up FEX RootFS step.

@garethwebber
Copy link

garethwebber commented Oct 4, 2024

Hi

Running Fedora/Plasma/FEX. Install through two errors - filesystem and dbus. I get a dbus error on steam startup. Is there anything i can do apart from start again?

(zenity:392): Gtk-WARNING **: 19:52:42.824: Unable to acquire session bus: Error spawning command line ?dbus-launch --autolaunch=1a6323469f774f3286abe8442f995381 --binary-syntax --close-stderr?: Child process exited with code 1

Gareth

@teohhanhui
Copy link
Author

@garethwebber:

I get a dbus error on steam startup.

That's "normal". If Steam is not running for you, you'd have to find the relevant error messages... (You can check in the Steam logs to see more of what's actually going on.)

Side note: I haven't been updating this guide lately, so YMMV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment