Compiled by | Su MoProduced by | CSDN (ID: CSDNnews)
How difficult is it to break through Apple’s “walled garden”? By examining the efforts developers must make to run Linux on a 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 custom 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 have 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 the Apple M4 could be a “rather painful” process, as Apple has quietly changed some underlying mechanisms, leaving Linux developers at a loss.
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 and found 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 and allow the system to directly enter EL2 mode, retaining the GL2 environment while 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.
Running Linux on M4: A Long Road Ahead
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 is 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.
In Conclusion
As running Linux on Apple devices becomes increasingly difficult, many netizens have shared their opinions:
-
“Stop trying to run Linux on MacBooks; instead, support those vendors who truly care about Linux.”
-
“Is it really worth all this effort to get a horse that has long been inactive to run? Rather than this, it would be better to invest that 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.”
Some have also 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
Recommended Reading:▶Forced “paid leave” for employees for a year? Google’s DeepMind non-compete clause has come under fire: better to spend money on keeping them than to let them go!▶The latest schedule for the 2025 Global Machine Learning Technology Conference is here, get the conference guide in one click!▶With one book in hand, all development is covered! The AIBOOK computing book uses 50TOPS + native Linux ecosystem to answer the “real needs of AI developers”
To gain deeper insights into the trends in AI programming and their impact on developers, please tune in to CSDN’s live broadcast of “Universal Gravitation” tonight at 19:30 to hear insights from industry leaders!