Linux On The Apple M1 Preparing Better Performance With In-Development CPUFreq Driver

Written by Michael Larabel in Apple on 16 February 2022 at 07:45 AM EST. 26 Comments
APPLE
As with most modern SoCs/processors, proper CPU frequency scaling / performance state management is absolutely critical for achieving good performance out of the hardware either for ensuring the CPU is hitting its capable performance states and also to reduce power consumption / heat when not needed in order to avoid thermal throttling and prolonging battery life. Fortunately, a proper CPUFreq driver for the Apple M1 is in development for Linux and is allowing for a combination of enticing performance and good battery life for this community-driven, open-source support around the Apple Silicon.

While longtime Linux kernel developer Jens Axboe is most known for his I/O mastery with maintaining the block subsystem and developing features like IO_uring, recently he picked up an Apple MacBook Pro with an M1 Pro and jumped into the M1 Linux community.


After a few days of tinkering, Axboe shared last week that he was "very impressed by the hardware" with the M1 Pro and then began dabbling with the CPUFreq support for the Apple M1, which was started by Asahi Linux developer Hector Martin.

Axboe then tweeted out yesterday about the great performance being seen with the Apple M1 Pro with the latest Linux patches, including the CPUFreq support.

With the patched up kernel on the Apple M1, he can build a Linux kernel in 82 seconds with his M1 Pro laptop. Meanwhile his former laptop a Lenovo ThinkPad X1 Gen9 with Core i7 1185G7 "Tiger Lake" takes 215 seconds to build the very same kernel configuration.

It's a big speed-up he is seeing with the Apple M1 Pro over Axboe's former Tiger Lake laptop. The Apple M1 Max should allow even faster kernel builds. Granted, he is currently relying on out-of-tree kernel patches for the CPUFreq driver and other work that has yet to be mainlined. He did add that the Apple laptop can now work out "good enough" as a daily driver for him while acknowledging there is no working GPU acceleration, no audio support, and no suspend/resume yet. Those other features remain in the works by the Asahi Linux developers and others but at least in the case of good GPU acceleration will still likely take some time to iron out, especially if wanting OpenGL/Vulkan driver support good enough for gaming and other demanding tasks. The current state of other Apple M1 MacBook / Mac Mini features under Linux can be tracked via the Asahi Linux Wiki.

The patches that Jens Axboe has been testing for his Linux kernel builds on the M1 can be found via this Git branch. As part of that is not only the work-in-progress apple-soc CPUFreq driver but also the patches for Apple SMC power/battery stats, simple-mfd-nvmem driver, simple-mfd-spmi, and other patches. Axboe has been working on various fixes and to no surprise he also has some Apple NVMe code improvements.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week