> 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.
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.
They make CrossOver, which is a productized version of Wine that lets you run Windows software on MacOS. They also work closely with Valve, who have just announced Steam Frame (a device that runs SteamOS on ARM).
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.
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?
Been there, done that during my PhD (code: [1]). Works reasonably well, except for compile times (for which I implemented a caching strategy). However, due to calling conventions, using LLVM isn't going to give the best possible performance. Some features like signal handling are extremely hard to implement with LLVM (I didn't, therefore). Although the overall performance results have been good, it's not an approach that I could strongly recommend.
Sadly compile times of LLVM-based recompilers make it impractical for competitive x86 emulation. We're not just talking a few single-frame stutters here and there, but considerable startup delays and pauses in-game.
LLVM's optimization passes also are less useful than you might think, since the vast majority of them is motivated by source->binary translation (like clang). They don't have much effect when recompiling an already optimized binary to another architecture.
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.
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.
ARM already has most stuff required for this on board. Two proprietary extensions are used by Rosetta: one emulates the parity (rarely used) and half-carry (obsolete) flags, which can also be emulated conventionally. The other implementa TSO memory ordering, which can either be ignored or implemented with explicit barriers; some other chips apparently have a similar setting.
The other stuff is all present in ARMv8.5 I think.
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.
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.
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.
> 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.
Perhaps another interesting aspect of this is that it’ll be Apple with their vertical stack that will decide when to physically remove this logic from the chips.
macOS 26 is the last OS with an Intel build. Presumably this means that in all likelihood, M6 chips will remove this functionality.
Why do you assume that dropping support for Intel hardware from the OS will coincide with dropping hardware features that help support for x86 applications? Have you not seen Apple's documentation that states they plan to retain some Rosetta functionality beyond macOS 27 for the sake of x86 games?
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".
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.
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
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.
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.
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?
FEX is a CPU JIT, so your GPU settings are irrelevant to it, it is translated but not by FEX, and there is no real perf hit for the GPU
The old games don't really matter with regards to FEX perf, so the only relevant bit is the semi newer games at 30/40 fps, which seems very slow to me, given that you are only running at 1080p/Medium, so you likely have a CPU bottleneck there.
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).
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?
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.
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.
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.
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.
There’s one trick: run those threads on one cpu. But that may be slower than barriers on multiple CPU’s, unless the code uses a lot of library code that can be emulated directly, separately on other cpus.
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.
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).
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.
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.
Also does it even work in Wine? Last I checked EAC only worked in Proton with the env variable to enable it being PROTON_EAC_RUNTIME
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.
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.)
Lenovo Chromebook Plus 12 or Acer - Chromebook Plus Spin 514. Both have an M2 equivalent MediaTek Kompanio ARM CPU/GPU, and comes with native Debian VM built in (Crostini) that runs standard Linux desktop apps. Battery life and performance are great. You can even get it pretty loaded up with RAM to run smaller LLMs if that's your jam.
As you can tell from my past comments about Chromebooks as Linux workstations here, I'm a daily user and very happy with them.
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.
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.
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.
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.
My apologies to you and the entire Qualcomm marketing team for my brand-guideline violations - I was going off the top of my head. What I meant in my inscrutable comment was: "Elite X" => "X Elite", "Elite P" => "X Plus", I really should not have mangled the products using such an elegant and intuitive naming convention.
Ok, so having clarified the naming, it still looks like you're wrong about which chips are getting driver support upstreamed, because the Snapdragon X Plus parts are (with maybe one exception, IIRC) literally the same chip as the Snapdragon X Elite parts. Do you really believe that the upstream Linux kernel would accept patches that are specifically crafted to only work on certain bins of the chip, or to fail to enable a peripheral if not enough of the CPU cores are enabled?
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.
> 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