FEX-emu – Run x86 applications on ARM64 Linux devices
219 points
8 days ago
| 11 comments
| fex-emu.com
| HN
open-paren
8 days ago
[-]
> FEX allows you to run x86 applications on ARM64 Linux devices, similar to qemu-user and box64. It offers broad compatibility with both 32-bit and 64-bit binaries, and it can be used alongside Wine/Proton to play Windows games.

> It supports forwarding API calls to host system libraries like OpenGL or Vulkan to reduce emulation overhead. An experimental code cache helps minimize in-game stuttering as much as possible. Furthermore, a per-app configuration system allows tweaking performance per game, e.g. by skipping costly memory model emulation. We also provide a user-friendly FEXConfig GUI to explore and change these settings.

> On the technical side, FEX features an advanced binary recompiler that supports all modern extensions of the x86(-64) instruction set, including AVX/AVX2. The heart of this recompiler is a custom IR that allows us to generate more optimized code than a traditional splatter JIT. A comprehensive system call translation layer takes care of differences between the emulated and host operating systems and implements even niche features like seccomp. A modular core enables FEX to be used as a WoW64/ARM64EC backend in Wine.

Used by the new Steam Frame (https://store.steampowered.com/sale/steamframe) which is an ARM64 Snapdragon 8 Gen 3 that will run PC and PCVR gaming titles.

reply
geerlingguy
11 hours ago
[-]
CodeWeavers' Crossover just released a Preview version for Arm that incorporates Fex and allows games like Cyberpunk 2077 to run: https://www.codeweavers.com/blog/mjohnson/2025/11/6/twist-ou...

I've tested it on an Ampere workstation, and was trying it on a Pi, but it seems with Trixie, there may be some bugs with both that and box64 right now, I was having trouble with both of them.

reply
nialv7
8 hours ago
[-]
Hey, it's that YouTube guy with cursed Raspberry Pi setups!
reply
sitkack
12 hours ago
[-]
Not just used by, Valve is sponsoring FEX.

https://news.ycombinator.com/item?id=45903610#:~:text=Valve%...

reply
cubefox
5 hours ago
[-]
I wouldn't call this random comment reliable testimony that they are sponsoring FEX.
reply
teroshan
4 hours ago
[-]
As the random commenter I agree. By "support" I meant that they have a line of product and a strategy that relies on FEX to work and work as seamlessly as possible.

If they contribute to FEX at even a fraction of what they did to wine and Proton it is indeed huge.

reply
Lightkey
3 hours ago
[-]
https://gamersnexus.net/pc-builds-news/valve-steam-machine-d... "Valve has devoted significant resources to the development of FEX emulation."
reply
thehias
2 hours ago
[-]
Man, Fex is Valve, Valve is Fex! The steam logo is right there in the logo!

https://files.mastodon.social/accounts/headers/110/652/595/6...

Center of left side, it is a Valve product. All main devs are employed by Valve.

reply
LeonM
3 hours ago
[-]
> The heart of this recompiler is a custom IR that allows us to generate more optimized code than a traditional splatter JIT.

I didn't know what 'IR' stands for in this context, but according to ChatGPT it is 'Intermediate Representation', explaining it as follows:

> In compiler, emulator or JIT-compiler contexts, an IR is a representation of code that sits between the source (or original machine code) and the final target machine code.

For those who are not into compilers: 'JIT' stands for 'just in time', so a JIT-compiler is a compiler that compiles code during execution of the program (game), just in time for when it is needed, instead of compiling it once before executing.

reply
stevefan1999
32 minutes ago
[-]
It would be cool if we can use LLVM to lift the x86 code into LLVM bitcode and go to different platforms easily with ostate of the art optimizations, won't it?
reply
globalnode
9 hours ago
[-]
Does that mean I can run windows games on my rpi? (In theory at least)
reply
adgjlsfhk1
9 hours ago
[-]
Yes (just possibly at ~2 fps)
reply
GCUMstlyHarmls
3 hours ago
[-]
Into the Breach is back on the menu.

There's probably a mountain of x86 games that would not need to hit above 15-30fps to be fun.

reply
ThatPlayer
8 minutes ago
[-]
Into the Breach can even run on a Pi 4: https://youtu.be/jF6xGlmKVUQ
reply
cultofmetatron
12 hours ago
[-]
I'n incredibly impressed by valve's commitment to playing the long game. It makes sense to have the frame by arm since the system is lighter and its clear this is just the trojan horse to get arm linux into every gamer's house. I wouldn't be surprised if we end up with an arm steamdeck 1-2 version from now when the tech is ready.
reply
sitkack
11 hours ago
[-]
Too bad Arm doesn't allow architectural licenses, because this is exactly the kind of thing Valve and the FEX developers would want to extend the ISA to support. I bet we see a RISC-V backend to FEX in the next 6 months, it probably already exists in a private repo.

FEX is the shootstring, extra special discount budget (not maligning) version of Rosetta. Apple should sell Rosetta to Valve.

reply
jsheard
11 hours ago
[-]
My understanding is that Rosetta sidesteps a bunch of tricky memory model issues by using non-standard hardware extensions only present in Apple Silicon, so even if Apple did share Rosetta, which they certainly won't, it wouldn't work properly on Valves hardware anyway.
reply
fooblaster
10 hours ago
[-]
yeah that is correct. The m series chips can turn on total store ordering memory model solely for Rosetta. There's also some hardware extensions to arm to support x86 condition codes in the hardware because it's way more instruction efficient that way.
reply
sgerenser
10 hours ago
[-]
The latter is now an optional feature in the mainstream Arm ISA now (FEAT_FlagM and FEAT_FlagM2). Similarly the “alternate floating point mode” that Apple uses to match nuances of x86 FP semantics is a standard architectural feature as well. The TSO option though is Apples own thing.
reply
astrange
10 hours ago
[-]
If you mean FEAT_FlagM, that's standard in ARMv8.4. (There's also FlagM2 and AFP that are optional.)

The JavaScript instruction is cooler though.

https://developer.arm.com/documentation/dui0801/g/A64-Floati...

reply
astrange
10 hours ago
[-]
It's not only present in Apple Silicon, it's just not required by the ARM standard. Fujitsu also has an ARM64 CPU with TSO.
reply
lugu
3 hours ago
[-]
Nice article on this topic: https://lwn.net/Articles/970907/
reply
sitkack
2 hours ago
[-]
There are also RISC-V designs with TSO. If you are targeting x86 workloads, it makes sense to have a per thread TSO mode.
reply
wmf
9 hours ago
[-]
There are a bunch of undocumented flags and instructions beyond TSO.
reply
astrange
7 hours ago
[-]
Trust me on this one?
reply
chadaustin
3 hours ago
[-]
https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-f...

> Apple M1 has an undocumented extension that, when enabled, ensures instructions like ADDS, SUBS and CMP compute PF and AF and store them as bits 26 and 27 of NZCV respectively, providing accurate emulation with no performance penalty.

reply
astrange
2 hours ago
[-]
Oh yeah, maybe that one was too obscure for me. I don't think I've ever seen something use PF/AF…

You do want FEAT_AFP though, so you do want ARMv8.6+.

reply
bonzini
32 minutes ago
[-]
SETP is used rarely to compute parity, though it doesn't really save anything if you can use POPCNT. PF is also used by floating point comparisons with a different meaning though that is not useful for the Arm extension from Apple.

AF indeed is basically unused. The problem for both is that you need them for accurate emulation "just in case".

reply
geerlingguy
11 hours ago
[-]
Box64 already runs on RISC-V. Just, the available processors are so slow it's hard to even play 5-10 year old games.
reply
snvzz
9 hours ago
[-]
This means that, when the much faster chips implementing RVA23 arrive next year, they'll be immediately able to run Box64.
reply
JoshTriplett
11 hours ago
[-]
> Too bad Arm doesn't allow architectural licenses

QEMU exists. I doubt they want the bad press of suing an Open Source project everyone is using.

reply
happymellon
5 hours ago
[-]
ARM were perfectly fine getting the bad press for suing Qualcomm for releasing the Snapdragon that was finally performing enough despite these companies paying them a lot of money.

They seemed quite happy to destroy their eco system if they won.

https://www.rcrwireless.com/20251001/business/qualcomm-arm-2

reply
anthk
37 minutes ago
[-]
And GBA emulators. And before that, BBC Accorn ones with Risc OS.
reply
nullbyte808
10 hours ago
[-]
better yet, Apple should make it open-source on github.
reply
scotty79
7 hours ago
[-]
> Apple should sell Rosetta to Valve.

Isn't Rosetta kinda bad though? And won't get much better because it's not open source?

reply
MobiusHorizons
5 hours ago
[-]
Rosetta performance is best in class to my knowledge, although they had the benefit of being able to add custom instructions and modes to the cpu to make some parts easier. Meaning Rosetta would not have helped valve unless they built the frame on apple silicon.

As for not improving, it is likely that Apple no longer feels the need to invest in Rosetta improvements now that Apple silicon is so dominant and software support is already very strong, but nothing is stopping them from investing in it if they need it for example for gaming

reply
scotty79
4 hours ago
[-]
Rosetta is abandonware: https://developer.apple.com/documentation/apple-silicon/abou...

Why would a company on its way to the moon, entrust such an important project as translation layer between two major architectures to a single rinky-dinky corp that got rich selling common electronics marketed as luxury fluff, that's on the decline and has head so far stuck up its butt that it thinks it can do whatever it wants, instead of just write it themselves with support of the global developer community?

Apple could never do games because there are no luxury games. That's completely out of their zone of comprehensibility.

reply
dontlaugh
4 hours ago
[-]
I don’t know if the two companies have such different futures.

The games industry as a whole is in potentially terminal decline, have you seen all of the redundancies lately?

reply
kokada
3 hours ago
[-]
The AAA games industry with their multi-million budgets and "being too big to fail" mentality is on decline. It seems that anything that is not a new Call of Duty is considered not worth by the industry.

But smaller games and indie studios are thriving. We got lots of very interesting indie games this year.

reply
notepad0x90
8 hours ago
[-]
Last I heard, they don't even have bosses there, a flat hierarchy. They vote on things and pick each other to work on teams and appraise performance. Perhaps that radical culture has merit to it?
reply
systematizeD
8 hours ago
[-]
How much did Gabe own Valve, 50%?

Gabe Ownership/co-founder:

- Valve - Yacht Companies - Starfish Neuroscience (Neuralink) - Submarine Companies

reply
bbminner
7 hours ago
[-]
I've heard that to ship hl2 (or anything really) they had to stip some of that flatness somewhat.
reply
wmf
8 hours ago
[-]
Anything works when you have infinite money and the company is privately owned by a chill dude.
reply
theoldgreybeard
11 hours ago
[-]
It’s amazing what you can do when you have a business that prints money hand over first and you have no obligations to shareholders.
reply
hydroreadsstuff
26 minutes ago
[-]
Some companies like to stress the efficiency or performance of Arm SoCs, but really this is a hedge against more expensive x86 hardware. AMD has increased prices of mobile SoCs radically recently. I'm looking forward to having more affordable SoC options for laptops, handhelds and desktops, perhaps from Mediatek or other lower-cost vendors.

The history of the PC is one of commoditization. A fractured multi-polar landscape is detrimental to the ecosystem/productivity and should ultimately fail.

x86 emulation is an important puzzle piece, and I'm happy Valve recognizes this and sponsors it.

reply
Venn1
11 hours ago
[-]
I tried out FEX on a modern ARM board with a discrete GPU. Really impressed with the performance.

https://interfacinglinux.com/2025/06/30/fex-emu-gaming-on-th...

reply
roody15
10 hours ago
[-]
Wow decent results.. impressed.
reply
Plagman
7 hours ago
[-]
I would keep in mind that the results reported there are likely quite a bit lower (in terms of CPU-side performance) than what you could achieve in practice, because it's running all of x86 Steam+Proton in the emulator. In a pre-configured environment (like SteamOS for ARM), the Steam client and Proton itself would be native ARM code, and emulation would stop at the win32 API boundary (or at certain critical libraries' APIs if you're using Linux apps).
reply
Lightkey
5 hours ago
[-]
Fancy seeing the Plagman here. Last time I saw you was on Freenode (R.I.P.). So you are still working for Valve? ;-)
reply
fooblaster
10 hours ago
[-]
How does fex deal with the fact that the memory model on arm is weak and x86 is total store ordering. It seems like would need to hammer performance by putting memory barriers everywhere to handle all cases. Perhaps fex only works when there are well defined mutexes it can gain visibility into? anyone know?
reply
jsheard
10 hours ago
[-]
Looks like they do expensive conservative TSO emulation by default, but they're able to piggyback on compiler work that Microsoft did to make newer Windows x86 binaries easier to emulate. Since MSVC 2019 they annotate the executable with metadata that informs an emulator of when TSO is or isn't needed for correctness.

https://fex-emu.com/FEX-2510/

FEX also has settings which weaken or disable TSO altogether, favoring performance over correctness. You wouldn't want to rely on those for anything important but a game possibly crashing isn't the end of the world.

reply
dbdr
5 hours ago
[-]
So that optimization only works on executables produced by MSVC? Are those annotations documented and/or produced by other compilers?
reply
saagarjha
1 hour ago
[-]
No.
reply
trollbridge
9 hours ago
[-]
It would be nice to see more Arm chips adopt Apple's approach (which fixes this problem) for Rosetta 2. Basically, Apple's chips can be switched into a TSO mode and a few other minor tweaks that make x86 code run much, much faster.
reply
nialv7
10 hours ago
[-]
I think that's right, there is no better way than just adding barriers. On Apple hardware it can probably make use of the special memory ordering mode, but on normal ARM64 there's probably nothing it can do.
reply
yakaccount4
9 hours ago
[-]
I believe a lot of the folks working on FEX are also core contributors to Dolphin, the Wii/GC emulator.
reply
zozbot234
7 hours ago
[-]
Nope, Dolphin emulates PowerPC not ARM or ARM64. Totally different architecture.
reply
yakaccount4
5 hours ago
[-]
I was saying some of the top contributors of Dolphin are also top contributors of this project based on GitHub data.
reply
HelloUsername
1 hour ago
[-]
That's really cool! I didn't know, thx for your comment :)
reply
pona-a
2 hours ago
[-]
How is it different to box64? I couldn't really find much online comparing these two except a brench by box64 themselves.
reply
systematizeD
1 hour ago
[-]
No different. Box64 only drm free game first, later they support drm games.

Fex straight drm games.

reply
yonatan8070
40 minutes ago
[-]
Are you referring to Linux's Direct Rendering Manager or to Digital Rights Management in this context?
reply
skywal_l
4 hours ago
[-]
Presentation at FOSDEM2022: https://archive.fosdem.org/2022/schedule/event/fex/

A little old but still interesting.

reply
jasonjmcghee
9 hours ago
[-]
Curious how this will impact the major games that are incompatible due to denuvo type stuff
reply
paulryanrogers
9 hours ago
[-]
IIUC that DRM involves kernel level tricks and attestation, which means it'll basically never happen. Online gaming looks similarly doomed.
reply
sintax
4 hours ago
[-]
Denuvo anti-tamper DRM doesn't use kernel level tricks, it's all userspace and works just fine on Linux/Proton. It's the kernel level anti-cheats that don't work on Linux. And some user level anti cheats (like AntiCheat Expert) that only work on the Steam Deck as they check the CPU/GPU of the system and refuse to work if it's not the one in the Steam Deck (which also means those don't work on platforms like the ROG Ally).
reply
dralley
9 hours ago
[-]
Plenty of online games work fine. Rocket League, Squad, Arc Raiders etc. are just the ones that I play.
reply
rounce
1 hour ago
[-]
In the case of those which use EAC/EOS they need to be explicitly approved to run under Wine/Proton by the developer. There are some cases (eg. iRacing) where the developer refuses to enable support for whatever reason, and on those we’re still stuck.
reply
ThatPlayer
15 minutes ago
[-]
It's not just 'running under Wine', it's a different anti-cheat with different capabilities and the same name.

It's like comparing Office 2024 Excel on Windows to Excel for iPad. They're both called Excel, and share basic features, but once you start using features like VBA, it will not run on iPad Excel.

reply
sedatk
8 hours ago
[-]
That doesn't even work properly on x86 Wine, so ARM is pretty much hopeless right now.
reply
akimbostrawman
5 hours ago
[-]
That is false. Denuvo DRM works on Linux and has for many years.
reply
sedatk
4 hours ago
[-]
I didn't say it doesn't work at all, but it's been problematic. An example:

https://www.gamingonlinux.com/2025/05/denuvo-will-lock-you-o...

reply
akimbostrawman
2 hours ago
[-]
That issue only happens if there are other issue with the game unrelated to denuvo on wine which requires trying different prefixes resulting in the DRM locking you out. Its the fault of the horrible DRM.
reply
akimbostrawman
5 hours ago
[-]
Denuvo DRM works on Linux and has for many years.
reply
cubefox
5 hours ago
[-]
One problem I see is that (e.g.) Qualcomm Adreno GPUs don't even run most Windows games well when executed natively under Windows, due to games only being optimized for GeForce and Radeon. I assume this problem only gets worse when trying to run DirectX games through some sort of translation layer with FEX/DXVK.
reply
nullbyte808
10 hours ago
[-]
Now we just need a decent ARM Linux laptop.
reply
rollcat
2 hours ago
[-]
Anyone can recommend something viable for simple tasks? I don't need 32GB of VRAM, just a reliable machine for everyday tasks that's decent, lightweight, has a good battery.

(I know I'm describing an M2 Air, but I'd like to explore alternatives.)

reply
myndpage
1 hour ago
[-]
I have the azus ZenBook a14 with X Elite, 32GB ram, 1TB SSD. Overall it works great on Ubuntu concept. Only speakers and camera do not work (I heard speakers can work with some risk). I just use usb headphones instead and my webcam. The laptop itself is very light with long battery life. I expect it to be better supported at some point hopefully, but it's getting there.
reply
thehias
2 hours ago
[-]
Get a MacBook with Asahi Linux
reply
thehamkercat
2 hours ago
[-]
Asahi Linux doesn't support M3/M4/M5
reply
sitkack
1 hour ago
[-]
And? Get an M1/M2 off of ebay or craigslist.
reply
overfeed
8 hours ago
[-]
Snapdragon Elite X laptops are plenty decent.
reply
ben-schaaf
7 hours ago
[-]
Not for Linux they're not. IIRC Audio and camera don't work, and firmware is non-redistributable and so you need to mooch it off a Windows partition. On top of that the performance on Linux hasn't been great either.
reply
donkeylazy456
6 hours ago
[-]
Qualcomm's linux support is not.
reply
overfeed
6 hours ago
[-]
That's true Qualcomm in general, but is fortunately outdated for the Snapdragon Elite X (and only the X). Qualcomm has been upstreaming patches to Linus' tree[1] - but only for the Elite X - the Elite P processors get the classic Qualcomm treatment.

1. https://www.qualcomm.com/developer/blog/2024/05/upstreaming-...

reply
wtallis
2 hours ago
[-]
You're mangling Qualcomm's branding to the point that it's impossible to be sure what you're trying to say. Qualcomm's current laptop SoCs are called "Snapdragon X Elite" or "Snapdragon X Plus" or "Snapdragon X", all derived from various bins of two SoC designs, and all pretty much in the same boat for driver support purposes. "Snapdragon X2 Elite" and lesser siblings are due in the first half of next year, so a respectable degree of Linux support would mean having driver support for those chips in an upstream kernel release now so that there might be a mainstream distro supporting the hardware at some point in the quarter after the hardware ships.
reply