Fedora Linux 42 includes an x86 emulation layer for ARM PCs, much like Apple’s Rosetta 2 compatibility layer for Apple Silicon Mac computers. It allows ARM Linux PCs to run many applications and games that haven’t been ported to ARM yet, including Windows software through the Wine compatibility layer.

Fedora’s x86 emulation was originally built for Fedora Asahi Remix, the Linux distribution for Apple Silicon Mac computers. It could already run Windows games like Control, Hollow Knight, Fallout 4, The Witcher 3, and Portal 2 with decent performance on an M1 Mac. Fedora has now ported that work to regular the other ARM editions of Fedora Linux as an installable package, and it’s installed by default in Fedora KDE Plasma Desktop 42.

The emulation layer uses three tools: the FEX emulator for translating x86 instructions to ARM, the nuvm tool for running software in micro virtual machines, and binfmt-dispatcher for picking the right emulator when an x86 application is opened. This works for both 32-bit x86 and 64-bit x86_64 (also known as ‘amd64’) software. Running x86 Windows software also adds Wine, or one of its forks like Proton, to the stack. You can also swap FEX for other emulators, like box64 or QEMU, if needed.

Related

Fedora Linux Is Getting a New Installer

The installer for Fedora Linux isn’t perfect. Now, the Fedora team is working on a replacement that aims to be less confusing and more useful. The developers behind Fedora Linux are working on a new interface for the operating system’s ‘Anaconda’ installer, replacing the current design that has stuck around for 25 years.

2

The Fedora team said in a blog post, “With this setup, when a non-native program is run, the kernel invokes binfmt-dispatcher via the binfmt_misc interface. The dispatcher picks the best emulator to use. This is based on the program, the system it’s running on, and its own configuration. By default, we use the FEX emulator, which provides the best compromise between performance and compatibility for most programs. FEX only support host systems running a 4k page-size kernel. Thus, when running on a system with different page-size (such as Apple Silicon Macs running Fedora Asahi Remix 42, which use a 16k page-size), the dispatcher will automatically run FEX inside muvm. This will spin up a microVM with a 4k page-size kernel for compatibility.”

The Need for x86

Most popular Linux applications and utilities have offered ARM-native versions for years, largely because of the popularity of the Raspberry Pi and other ARM boards. Apple Silicon-powered Mac computers and ARM-based servers have also encouraged more investment in ARM Linux software.

There’s still a lot of x86-only software, though. Most proprietary applications for Linux only have x86 versions, like Discord, Slack, and Steam. Windows software is still primarily only available for x86 processors, including nearly all Windows games. Emulation helps plug some of the functionality gaps on ARM hardware, just like it does with ARM-based Windows PCs.

This kind of emulation can have performance and stability drawbacks, but it’s still incredibly useful and worth checking out if you have an ARM Linux device. It can also be used outside of a traditional computer setup—the above video shows Celeste for Windows running on a phone with postmarketOS Linux.

Try it Out

The x86 emulation layer is preinstalled on Fedora KDE Plasma Desktop 42, as well as the KDE and GNOME versions of Fedora Asahi Remix. On other ARM Fedora editions, you can run this command to install the feature:

sudo dnf install @x86-emulation

This is only for x86 emulation on ARM PCs. The blog post said, “It’s also worth noting that while we have specifically targeting x86 emulation on ARM hosts, the same approach could be used for other hosts and targets in the future.”

Source: Fedora Magazine