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.

@teohhanhui
Copy link
Author

teohhanhui commented Jul 15, 2024

@neo773 Hmm... Looks like it cannot find some of the DLLs. Maybe they're not in BOX64_LD_LIBRARY_PATH. I'll check.

@yuv418
Copy link

yuv418 commented Jul 15, 2024

The unshare -pfr --user --mount --kill-child /usr/bin/bash returns an error of basename: missing operand but still drops me to a root shell. After that, if I try to use the chroot script unbreak_chroot.sh, it drops me to a bash chroot but there are DNS issues (so I can't install anything).

It's also worth noting that mounting sys and dev have permission denied problems when mounting in the unbreak_chroot.sh script.

EDIT: Fixed, my network is weird and blocked the default 8.8.8.8 DNS server in resolv.conf.

@Preston-S
Copy link

Hey! Has anyone else had this pop up when running: krun FEXRootFSFetcher:

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server

Then prompts show up

LATER then after doing the y, 1, 1, y following the promts I get this error:
Got error or hangup (mask 5) on X connection, exiting

@teohhanhui
Copy link
Author

@Preston-S All of those error messages are "normal". Don't worry. Just proceed with the rest.

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 2, 2024

For running steam in box64 I would use krun -e WINEDLLOVERRIDES=libglesv2.dll=d as that’s the only way for steam to get further without vulkan/dxvk with the new wow64 mode in wine

@teohhanhui
Copy link
Author

@m1m1k4tz Thank you. I'll give it a try and update the guide.

@teohhanhui
Copy link
Author

@teohhanhui
Copy link
Author

teohhanhui commented Aug 3, 2024

@m1m1k4tz Unfortunately, the Windows version of Steam is still not able to connect to the Internet with this setup (following this guide)... So it doesn't even reach the next step yet. Haha...

IIRC, your setup is different, right? I wonder what makes it work for you but not in our case...

bootstrap_log.txt: https://gist.github.com/teohhanhui/0e35d451e37a83e22d19162d40278082

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 3, 2024

I use this to compile it and then copy it over to my m1 mac then I run wine from the wine build folder ptitSeb/box64#487 (comment)

@teohhanhui
Copy link
Author

@m1m1k4tz Hmm okay. I guess I just need to update my wine build to a newer version then...

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 4, 2024

@m1m1k4tz Unfortunately, the Windows version of Steam is still not able to connect to the Internet with this setup (following this guide)... So it doesn't even reach the next step yet. Haha...

IIRC, your setup is different, right? I wonder what makes it work for you but not in our case...

bootstrap_log.txt: https://gist.github.com/teohhanhui/0e35d451e37a83e22d19162d40278082

The only thing I do differently is I don’t install it I just copy it over I think you should install the native version of wine also to get the dependencies for box64

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 4, 2024

It could be something weird with your network setup also that’s not playing well with krun

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 4, 2024

Also right now there’s a bug with asahi that if you update wpa supplicant it breaks your wifi right now

@teohhanhui
Copy link
Author

@m1m1k4tz I definitely have connectivity in krun and FEX. Maybe it's missing dependencies in the /x86_64 installroot like you said.

@teohhanhui
Copy link
Author

I think you should install the native version of wine also to get the dependencies for box64

@m1m1k4tz Oh you mean aarch64 wine huh... That'd be really weird. I don't see how that could be the case.

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 5, 2024

I think it uses the dependencies for dynarec and that’s an easy way to install them all also the guide says box64 requires wine to be installed manually

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 7, 2024

Oh also I don’t install the version of bash you do I use the one that comes with box64

@m1m1k4tz
Copy link

m1m1k4tz commented Aug 8, 2024

I think it’s probably the way you compiled and packaged wine though I would just compile it on an x86 machine then download it if steam was 64 bit you could run it thru box64 and it would do all that for you ValveSoftware/steam-for-linux#3518

@teohhanhui
Copy link
Author

I think it’s probably the way you compiled and packaged wine

@m1m1k4tz It's just simply Fedora's wine packaging, adapted for the new wow64 mode. I don't see what could be causing the connectivity issue.

@m1m1k4tz
Copy link

Can you run ping thru bash run by box64 I remember you posting an issue with bash compiled on fedora with box64

@m1m1k4tz
Copy link

If not try using the bash that comes with box64 in the tests folder

@nik012003
Copy link

error: failed to run custom build command for `krun-sys v1.9.1 (/home/nik/repos/krun/crates/krun-sys)`

Caused by:
  process didn't exit successfully: `/home/nik/repos/krun/target/release/build/krun-sys-b7c1bf88974d194d/build-script-build` (exit status: 127)
  --- stderr
  /home/nik/repos/krun/target/release/build/krun-sys-b7c1bf88974d194d/build-script-build: error while loading shared libraries: libclang.so.16: cannot open shared object file: No such file or directory

Solved by installing the package clang16-devel. you might wanna update the gist with that

@teohhanhui
Copy link
Author

@nik012003 I have recreated the container from scratch following this guide, and cannot reproduce the problem. krun-sys compiles perfectly fine for me with clang-devel-18.1.6-3.fc40.aarch64

@LeaveNhA
Copy link

Has anyone ever managed to run Apex Legends? I really wanna do it.

@MicahBird
Copy link

@LeaveNhA As far as I know, Apex Legends doesn't support OpenGL as a graphics backed, and OpenGL is the only graphics API (currently) supported on Asahi Linux. Your best bet would be to install VMWare Fusion (it's free for personal use) and install Apex there. Although, beware of the anti-cheat.
https://www.applegamingwiki.com/wiki/Apex_Legends

@LeaveNhA
Copy link

Actually, for Fex I have an alternative, Rosetta. It might be not legal tho, be warned. Also, I couldn't manage to run it with it because it requires x-server and this guide leads a wayland setup.
Also, for Vulkan, I tried to compile mesa from source with the HoneyKrisp branch. But no luck at all because of the FEX.
@MicahBird, I am literally out-of-options. Any help would be greatly appreciated.

@teohhanhui
Copy link
Author

@LeaveNhA Just wait for the Asahi devs to release Honeykrisp. Patience is key here. There's still a lot of work that needs to happen in many things (krun, FEX, etc.)...

@LeaveNhA
Copy link

LeaveNhA commented Aug 17, 2024

@teohhanhui, I don't wanna sit and wait, no offense. I wanna contribute their work but my background is completely theoretical on programming languages.
Would you (or any of you guys) suggest a starting point on how to contribute on FEX or any key-point software in this pipeline? So I can really relax and feel that I am not wasting oxygen.

@teohhanhui
Copy link
Author

@LeaveNhA Try asking in the Matrix room then... Or on Mastodon? But really, don't mention Rosetta. They might ban you real quick 😆

@LeaveNhA
Copy link

@teohhanhui, FYI, I cannot join their IRC, it says, failed.

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