This article is reprinted with permission from the public account CSDN (ID: CSDNnews)
Compiled by | Su Ma
How difficult is it to break through Apple’s “walled garden”? By examining the efforts developers must make to run Linux on Mac, one can truly feel the thickness of this wall.
Asahi Linux is an open-source project aimed at making the Linux kernel compatible with Apple Silicon (Apple’s self-developed chips), with the goal of allowing ordinary users to run Linux natively on modern Mac devices. This project was initiated by Hector Martin and other developers in 2021, and after more than four years, they successfully managed to get Linux running on M1 and M2 chips, with decent support.
However, as time has passed, the project team is now facing more complex new challenges while adapting to the latest M4 chip.
Recently, Asahi Linux core developer Sven Peter posted on Mastodon, stating that Linux support for Apple M4 could be a “rather painful” process, as Apple has quietly changed some underlying mechanisms, making it difficult for Linux to proceed.
1. New Chip Challenges
Sven Peter stated: “We are still focused on submitting the support code for M1/M2 to the Linux mainline, but other developers have already attempted to run m1n1 (note: Asahi Linux’s bootloader) on M4, only to find that Apple has made numerous changes.”
Specifically, Apple has changed the boot mechanism on M4.Sven Peter explained that when trying to configure the boot object, the system enters a special environment controlled by Apple’s SPTM (Secure Page Table Monitor), at which point the bootloader needs to communicate with SPTM in EL2 (Exception Level 2) mode and enable the MMU (Memory Management Unit) to set up the page table structure.
However, the problem is that this method is not suitable for Linux and cannot be used to run Apple’s XNU kernel in the hypervisor of the Asahi project, thus affecting the analysis of the M4’s underlying architecture.
Another approach is to use a raw boot method, which can bypass some complex processes, allowing the system to directly enter EL2 mode while retaining the GL2 environment and disabling most of Apple’s custom extensions. This solution is feasible for Linux, which can run, but still cannot run the XNU kernel, limiting the project team’s in-depth research on the new hardware.
These changes significantly increase the development difficulty, meaning that achieving complete and stable support for Linux on M4 will require overcoming more challenges in the future.
2. Running Linux on M4 is a Long Way Off
Currently, the Asahi Linux team is still busy merging support for M1 and M2 chips into the Linux mainline. As for M4 (and even M3), there is likely to be little progress in the short term, especially now that they are facing numerous new issues.
Additionally, the project’s core maintainer, Hector Martin, previously chose to withdraw due to disagreements with the Linux community, which has also affected the pace of Linux’s advancement on the Mac platform.
However, not all hope is lost. Sven Peter also mentioned a possible direction for a solution: perhaps it could be possible to “hijack” Apple’s exception handling mechanism and page table logic to bypass the current limitations—though this sounds like a highly challenging technical task.
In summary, if you want to run Linux smoothly on the latest Mac models, you’ll need to be patient, as developers are still working hard to overcome this hurdle.
3. In Conclusion
As running Linux on Apple devices becomes increasingly difficult, many netizens have also expressed their opinions:
-
“Stop trying to run Linux on MacBooks; instead, support those vendors who genuinely care about Linux.”
-
“Is it really worth all this effort to get a horse that has long since stopped moving to run again? Rather than this, it would be better to invest this energy and budget into creating a Linux distribution that is as user-friendly as macOS, selecting a few reliable hardware vendors for deep customization and optimization, which could even develop into a business.”
Others have stated: “Apple’s hardware should run macOS, just as Windows computers should run Windows, and Android phones should run Android. If Linux wants to become a true desktop platform, it should have its own dedicated hardware, rather than always trying to borrow someone else’s shell.
Instead of struggling to adapt to a closed ecosystem that has no interest in open source, it would be better to invest resources into building a Linux ecosystem of its own. This may be the more long-term solution.”
What do you think about this?
Source:
https://www.phoronix.com/news/Apple-M4-Linux-Rather-Painful
https://appleinsider.com/articles/25/04/08/asahi-linux-m4-support-hits-a-roadblock-because-of-apple-silicon-changes
This article is reprinted from the public account “CSDN”, ID: CSDNnews
—END—