Given the significant interest from Phoronix readers about how well Apple M2 performs on Linux, especially after it was noted Linus Torvalds using an Apple MacBook Air M2, here are the first of many benchmark articles to come looking at how well Apple’s M2 performs under Linux against Intel/AMD x86_64 competition. The new Apple MacBook Air with M2 was benchmarked for this article against the AMD Ryzen 7 PRO 6850U “Rembrandt” Zen 3+, Intel Core i7 1280P “Alder Lake P”, an AMD Ryzen 9 5900HX “Cezanne H”, and also for reference an Apple Mac Mini M1 model. All of these laptops were tested under Arch Linux (x86_64) and the Arch-based Asahi Linux (M1/M2).
It was just last month that Asahi Linux introduced experimental M2 support after a few weeks of Hector Martin and others hacking the newly-released Apple M2 wares. In trying out the latest (experimental) Asahi Linux, the experience went surprisingly smooth considering the youth of this port. The setup experience was as smooth as with the Apple M1 and in a short time was able to dual-boot into Linux on the Apple M2.
It’s important to note though that getting the Apple M2 going on Linux requires basically using Asahi Linux with the kernel changes still to be upstreamed, etc. As of writing, Asahi Linux developers still haven’t yet worked out or finished the PMU support, DisplayPort Alternate Mode, Thunderbolt, USB3, SEP, Neural Engine, TouchID, keyboard backight, web camera, video encode/decode, ProRes Codec, microphone support, internal speaker support, and other elements. The current M1 / M2 hardware support status can be found via the Asahi Linux Wiki.
The big elephant in the room when it comes to the M1/M2 support on Linux is, of course, the GPU. Running Asahi Linux on the Apple Silicon devices will lead to just the LLVMpipe-based software OpenGL implementation. That software-accelerated experience can be “good enough” for basic desktop tasks, terminal use, running a text editor or IDE, and basic web browsing. But for those expecting to do gaming, running workstation visualizations, or even wanting to play a lot of videos using the software-fallbacks, you’re better off waiting until the open-source Linux graphics stack is in good shape for the Apple Silicon… Hopefully next year?
There are also other gotchas with Linux on the Apple M2/M1 support like no sensor support for the SoC power consumption / RAPL / PowerCap interfaces so as such was not able to monitor just the SoC power usage during benchmarking. Thus for today’s article is solely looking at the raw performance of the Apple M2 up against the Intel/AMD competition.
The M2 system was the 2022 MacBook Air with M2 SoC and 8GB of system memory — the $1199 USD base model. But before getting to the Intel/AMD comparison benchmarks, let’s first have a look at how the macOS 12.5 vs. Asahi Linux performance was on this MacBook Air for seeing how the Linux CPU performance is against the latest official macOS release.
This is a long article with lots of benchmarks… If enjoying Phoronix content and wishing to view the entire article on a single page, consider joining Phoronix Premium.
Before getting to the multi-system benchmarks, first up were some initial benchmarks for gauging the macOS vs. Asahi Linux performance on the very same MacBook Air using the default compilers on each OS and other system defaults.
Considering the early state of Asahi Linux on the M2, it came as a surprise to find Asahi Linux quite competitive in many of the CPU benchmarks. In some tests Asahi Linux won, possibly due to compiler differences and other factors, but even when losing it tended to still be in the same ballpark as macOS.
OpenJDK Java workloads were one of the areas where macOS 12.5 was performing a heck of a lot better.
But as you can see across many different workloads, Asahi Linux on the Apple M2 was in surprisingly good shape against macOS 12.5 when originally thinking power management issues or other problems could plague the M2 on Linux.
Overall I was pleased with the CPU performance in these benchmarks between Asahi Linux and macOS. Granted, none of these benchmarks make use of the M2’s Neural Engine or GPU, which are unsupported at this point under Linux. But when looking at the raw CPU benchmark performance, Asahi Linux was in surprisingly good shape for their experimental M2 build being less than one month old.
Now that we know the M2 CPU performance on Asahi Linux isn’t wildly bad or strangely different from macOS, let’s move on to looking at the Asahi/Arch Linux performance between the various devices under test.
To recap the systems tested for this comparison included:
Apple Mac Mini – M1 8GB model
Apple MacBook Air – M2 8GB model
MSI MS-14C6 Evo notebook – Intel Core i7 1280P “Alder Lake P”
ASUS G512QY – Ryzen 9 5900HX “Cezane H”
ThinkPad X13 Gen3 – Ryzen 7 PRO 6850U “Rembrandt”
All of the devices were freshly tested/re-tested under Asahi Linux with the Apple Silicon or upstream Arch Linux for the x86_64 hardware. All the prominent system details and other information below. Testing was obviously limited to the hardware I had available.
Unfortunately for testing, as mentioned, right now there is no Linux driver exposing the M2 SoC power consumption under Linux. Hopefully this will be addressed in time but unfortunately meant not being able to deliver any accurate performance-per-Watt / power consumption benchmarks in this article. But when such support does come, it will likely show the M2 indeed delivering much better power efficiency than the Intel and AMD laptops tested. Even under demanding multi-threaded workloads, the M2 MacBook Air was not nearly as warm as the other laptops tested. It’s a night and day difference of the M2 MacBook Air still being cool to warm compared to the likes of other notebooks like especially Dell XPS laptops that get outright hot under load. The power consumption metrics should also be more useful/relevant once Linux has working M1/M2 GPU support in place too.
Etcpak as an open-source ETC texture compressor showed the Intel/AMD processors performing much faster than the Apple M2 (and M1), which some of the difference may also be attributed to Etcpak not as being well-tuned for the Apple Silicon / AArch64 and similarly the system compiler not being as well tuned for Apple’s in-house ARM64 CPU, but for end-users this is the experience.
While shifting over to other workloads like the Leela Chess Zero (LC0) chess engine leveraging neural networks, the Apple Silicon performed incredibly well and ahead of the x86_64 competition. But as you may notice, the M1 was actually much faster than the M2…
The M1 performing much faster than the M2 in some workloads was a head-scratcher at first, but this also came up in other heavy multi-threaded workloads. It would appear that for some workloads — in particular the heavy multi-threaded tests — the M2 trails the M1 on Asahi Linux presumably due to some missing thermal/power management bits. While that’s unfortunate, at least going off the M1 Mac Mini results, in some of these workloads Apple Silicon has the potential of running competitively against these current-generation Intel and AMD laptops.
For creators dealing with a lot of WebP image encoding, the M2 performance on Asahi Linux was only slightly behind that of the tested x86_64 laptops.
For developers doing a lot of JSON crunching/analysis, the M2 wasn’t too far behind the AMD laptops tested.
The M2 performed well at mining Monero on the CPU for those curious…
Across a wide range of OpenJDK Java workloads, the Apple M2 (and M1) performed extremely well. In these OpenJDK Java workloads on Asahi Linux with the M2 MacBook Air, the new Apple device was often trading blows with these AMD Rembrandt/Cezanne and Intel Alder Lake laptops. In a few cases though the M1/M2 were much slower.
In addition to the M2’s very strong showing in OpenJDK Java performance, the Apple hardware running Asahi Linux was also performing very well with the Zstd compression benchmarks.
Meanwhile benchmark runs from LuaRadio and GNU Radio for software-defined radio tasks saw very mixed results out of the Apple devices with very stellar performance in some areas but then performing very poorly in other operations.
The Apple M2 performed well enough at VP9 video encoding using libvpx.
But the x265 video encode performance on the Apple M2 wasn’t anything great compared to the Intel/AMD CPUs.
Generationally the Apple M2 against the M1 showed very nice improvements with the exception of a few heavy workloads showcased where for whatever reason the M2 on Asahi Linux was slower than the M1 (again, presumably some power/thermal issue right now in the Linux code).
AVIF image encoding was another one of those intense multi-threaded workloads where the M1 on Linux was faster than the M2.
Hopefully the M2 performance issue with heavy multi-threaded workloads on Asahi Linux will be sorted out soon as in many of these benchmarks even the M1 was running great against the Intel and AMD laptops.
The Apple Silicon performance on Asahi Linux was great for Numpy!
A number of upstream code-bases have yet to be well optimized for AArch64, but with these Apple Silicon devices coming out that make for compelling ARM Linux developer laptops or boxes (Max Mini), with time we’ll likely see more open-source software become better optimized for AArch64.
With the Ngspice circuit simulator the results were mixed.
The M1 to M2 generational uplift was very nice for the SecureMark benchmark.
An M2-powered Mac Mini could make for a very nice developer box if such an upgraded product product were to launch.
With the Node Web Tooling benchmark the M1 was slower than the tested Intel and AMD laptops while the M2 MacBook Air was now able to outperform all of the tested x86_64 competition.
The Liquid-DSP digital signal processing library could stand to see some optimizations for AArch64 / Apple Silicon.
While not too relevant for laptop use, Apache Spark is another Java workload performing very well on the M2 and could be of some interest for M2 in non-mobile form factors.
The cryptsetup benchmark results were mixed for the Apple performance on Asahi Linux.
The Tensorflow Lite performance with making sole use of the CPU and not the Apple Silicon Neural Engines saw mixed results. In some of the benchmarks the Apple Silicon was the fastest while in other intense workloads were more instances of the M2 on Linux falling behind the M1.
ASTC texture compression with the astcenc software from Arm was another example of the M2 performing worse than the M1 on Linux.
For imaging workloads the Apple Silicon on Asahi Linux was competitive against the tested Intel and AMD laptops.
Overall it was a very interesting benchmark battle… In some workloads the Apple M2 on Asahi Linux fell behind due to possibly not being as well optimized for AArch64, but in other cases the outcome was incredible.
In total I ran 190 benchmarks across the MacBook Air M2, Mac Mini M1, Ryzen 7 PRO 6850U with the ThinkPad X13 Gen3, Core i7 1280P with MSI Evo notebook, and Ryzen 9 5900HX with ASUS ROG G513Qy. For straight-up first place finishes, the Ryzen 9 5900HX led to little surprise. The Apple MacBook Air M2 model did come in first place around 27% of the time and then the M1 even came in first a handful of times for the heavy multi-threaded workloads where the Apple Silicon was performing well but M2 regressing.
When taking the geometric mean of all 190 benchmarks ran on the five devices with Asahi Linux / Arch Linux, the Apple MacBook Air M2 came in just behind the Core i7 1280P. The Core i7 1280P was just about 8% faster for raw performance while the Ryzen 7 6850U Zen 3+ SoC was 14% faster than the M2 MacBook Air tested. Those wishing to go through all 190 individual benchmarks in full can do so via this result page.
Overall the Asahi Linux experience on the Apple M2 exceeded my initial expectations. The CPU performance was quite competitive, ignoring Linux’s lack of support for Apple Silicon’s Neural Engine or GPU yet. The performance-per-Watt likely comes out ahead of the AMD and Intel CPUs given the raw performance results and how unusually cool the MacBook Air remained during the benchmarking in comparison to the Intel / AMD laptops. But for lack of SoC power consumption monitoring under Linux yet for the M2, there isn’t any firm numbers to share at this time. But given the competitive raw performance, it’s suffice to say that the M2 likely leads in performance-per-Watt in at least most of the tests.
While the CPU results are quite positive, Linux on the Apple M2 isn’t ready for most users as a daily driver yet. If you are a developer mostly in the terminal and a text editor / IDE for long portions of the time, the Apple M2 is fascinating for being a performant AArch64 option and at a reasonable price compared to the costs of many Arm reference boards, etc. But if you are expecting GPU and video acceleration, you will likely be waiting a number of months before that open-source driver support comes together — and even more months if expecting Vulkan support and gaming.
There was also the issue encountered with a number of heavy, multi-threaded workloads where the M2 performance was behind that of the M1, presumably due to some thermal/power related bits still to address with the M2 on Linux. It will also be interesting to see with time once Linux is able to initialize and use the Apple Silicon GPU how much of a power budget for the SoC that the GPU will eat into and whether it will end up limiting some of the CPU performance wins seen today.
The Asahi Wiki outlines other support limitations right now for the M1 and M2: with the new M2 MacBook Air and MacBook Pro there isn’t yet microphone / 3.5mm / internal speaker support as likely another blocker for daily use. The web camera support is a work-in-progress. If not wanting to use Asahi Linux but your own Linux distribution of preference, it will likely be quite some time before all these patches are cleaned up, reviewed, and upstreamed into the Linux kernel. There are also install challenges around setting up the Apple Silicon systems into a state that can boot into Linux due to security permissions, partitioning, etc. Asahi Linux has made the install process remarkably easy on the M1/M2 but will take work for other Linux distributions to adapt if wishing to pursue Apple Silicon support.
Stay tuned for more Apple M2 Linux benchmarks on Phoronix. If you enjoy all my relentless benchmarking and hardware testing, consider joining Phoronix Premium or at the very least to disable any ad-blocker.