Hi, I previously made a post about running fex-emu months ago on my Snapdragon X Elite laptop which didn’t work at all, since then Fedora 42 launched with support for x86 emulation built-in, provided by using FEX, muvm, and binfmt-dispatcher.
So I decided to test it out on my laptop again and it still doesn’t work but acts slightly different. I am running Fedora 42 KDE Plasma which is supposed to have everything needed to run x86 and x86_64 programs OOBE. It only seems to have binfmt-dispatcher which does tell you need FEX and installs it for you (plus muvm which I don’t think is needed on 4K page systems like the Snapdragon X Elite?) whenever you run an x86 program directly so that’s cool UX to prevent increasing the file size of the distro by default.
But the current distribution of FEX is still broken in seemingly the same way. The official fedora rootfs is downloaded but isn’t loaded into FEX by default and trying to set it manually using FEXConfig from fex-emu-utils also still doesn’t work. The fedora rootfs is a .erofs and the configuration expects .sqsh or .ero.
So after renaming it to .ero it sort of starts to work but even just running uname is still broken.
$ FEXBash uname
erofsfuse 1.8.6
<W> erofs: /usr/share/fex-emu/RootFS/default.ero mounted on /run/user/1000/.FEXMount12166-JvBxXO with offset 0
[binfmt_dispatcher] Using FEX
pipe:[117070]: command not found
Previously when I ran uname it would bring up an error about libc:
But now it seems like errors are intercepted by binfmt_dispatcher? Removing muvm and then running uname inside of FEXBash again seems to make binfmt think it’s missing dependencies and tries to install muvm again
$ FEXBash uname
erofsfuse 1.8.6
<W> erofs: /usr/share/fex-emu/RootFS/default.ero mounted on /run/user/1000/.FEXMount12432-VKhdHt with offset 0
[binfmt_dispatcher] Will attempt to install missing requirements for FEX
Updating and loading repositories:
Repositories loaded.
Package Arch Version Repository Size
Installing:
muvm aarch64 0.4.1-1.fc42 updates 2.8 MiB
Installing dependencies:
libkrun aarch64 1.11.2-1.fc42 updates 3.8 MiB
libkrunfw aarch64 4.9.0-1.fc42 updates 20.9 MiB
virglrenderer aarch64 1.1.0-2.fc42 fedora 1.2 MiB
Transaction Summary:
Installing: 4 packages
Again, I don’t think muvm is needed on my laptop specifically, fex-emu has worked on Ubuntu before.
Also a bug I noticed is you can’t cancel out of installing fex-emu or it’s dependencies if you try running a x86 appimage by double clicking it. The binfmt_dispatcher pop up shows up with only an OK button and no way to close it visually. Closing it via the desktop overview or pressing esc makes it proceed anyways and after cancelling dnf the pop up comes back. There is some weird behavior with appimages where if they fail the system keeps on trying to run them. Starting an appimage from the terminal will show a bunch of [binfmt_dispatcher] Using FEX
messages before failing with fuse: socketpair() failed: Too many open files
Additionally, I think your build of FEX might only work on ARMv8.4+ systems? I don’t know how to check this, I am just basing it off someone’s experience trying to run FEX on their Libre Computer Alta (Cortex A73 + A53: ARMv8 only) in which they kept getting segmentation errors.