Asahi Linux Explained

Asahi Linux
Logo Size:128px
Family:Linux (Unix-like)
Working State:Official Stable (Fedora 40)
Source Model:Open source
Supported Platforms:Apple M1 & M2 (AArch64)

Asahi Linux is a project that ports the Linux kernel and related software to Apple Silicon-powered Macs, started and led by Hector Martin. It does so by reverse-engineering the SoCs which lack documentation from Apple.

History

Shortly after Apple announced their transition away from Intel x86 processors in late 2020, Linux creator Linus Torvalds expressed interest in Linux support for the Apple M1 Mac, but thought that the work to make this happen was too time-consuming for him to personally take on the necessary software development tasks.[1]

Martin announced the project in December 2020 and formally started work a month later in 2021,[2] after securing crowd-sourced funding. Alyssa Rosenzweig, who developed the open-source graphics driver stack Panfrost, joined the project to help support the Apple silicon graphics processing unit (GPU).[3] [4] . The project has been made challenging by the lack of publicly available documentation of Apple's proprietary firmware.[5]

The developers quickly realized that just attempting to boot the Linux kernel compiled for Apple silicon's processor architecture (AArch64) would be challenging, as it involved working out the functionality of proprietary Apple code used in the boot process. The work was time-consuming and took most of the year, including submitting pull requests to the main Linux kernel developers to keep development in sync and avoid regressions. However, it subsequently led to a thorough and comprehensive explanation of the previously undocumented boot process, which Martin and others published on GitHub.[6]

The project released an experimental alpha version of the Asahi Linux installer in March 2022. The installer offered the choice of a desktop based on Arch Linux ARM, a minimal environment, or a basic UEFI environment for installing OpenBSD or alternate Linux distributions with support for Apple silicon via a bootable USB drive.[7] Despite being able to launch a UEFI shell, booting Microsoft Windows is not supported, and there are no plans to do so, as it would involve modifying the proprietary Windows kernel.[8] While other projects that are attempting to study a possible port of Windows to these systems specified challenging roadblocks related to Windows handling the proprietary Apple Interrupt Controller (AIC), and the 16K pages only found on the IOMMU.

Full support for all Apple silicon-supported Macs is not expected for another year or two following the first alpha release. In July 2022, the Asahi Linux team released an update with support for the M1 Ultra, Mac Studio, and early initial support for the M2 MacBook Pro.[9]

In August 2023, it was announced that Asahi was partnering with the Fedora Project to release the Fedora Asahi Remix, which would supersede the original Arch-based distribution as Asahi's flagship OS.[10] The effort began in late 2021, and is an upstream-first project. The end goal of the project is to merge upstream all changes so that the project's distribution becomes unnecessary.

In October 2023, Fedora Asahi Remix was released as a Beta, then 3 months later, as a stable.[11] [12]

Hardware and driver support

A Vulkan driver is in a working prototype[13] and OpenGL 4.6 and OpenGL ES 3.2 are supported.[14] This driver is currently the only fully-compliant AGX (Apple Silicon GPU) driver for any widespread graphics standard. [15] [16] While initially using the Panfrost driver implementation, the Asahi Linux Project also made use of Gallium-3D and Rust based APIs for driver development. OpenCL is not supported. KDE Plasma rendering is hardware accelerated, while video decoding is not.

HDMI video output is only supported on the Apple silicon Mac mini, and there is no support for video via Thunderbolt[17] although external displays can be used via DisplayLink docks.

The operating system's kernel has been configured for and only support 16 kB (for reason of performance) pages. Programs that does not (e.g. expect 4 kB or 64 kB pages) experience alignment problems when being mapped to memory.[18] The page sizes set by Linux are global (there is no support for multiple page sizes in operation).[19] The Apple GPU driver support 4 kB and 16 kB pages.[20] [21]

Reception

The project has been well received. A review in The Register said that it ran surprisingly well for alpha software that is still in development. Similarly, a review in Ars Technica was impressed by the amount of hardware that was already supported early in the project lifecycle.[22]

See also

External links

Notes and References

  1. News: Linus Torvalds would like to use an M1 Mac for Linux, but ... . ZDNet . November 24, 2020 . April 5, 2022 . April 1, 2022 . https://web.archive.org/web/20220401104534/https://www.zdnet.com/article/linus-torvalds-would-like-to-use-an-m1-mac-for-linux-but/ . live.
  2. Web site: Grüner . Sebastian . 2021-04-09 . Initaler M1-Support landet im Linux-Kernel . Initial M1-Support Lands in Linux Kernel . 2024-06-16 . . de.
  3. Web site: Tung . Liam . Linux on Apple's Arm silicon Macs? This crowdfunded project wants to give it a try . ZDnet . 31 May 2021 . 8 Jan 2021 . 20 January 2021 . https://web.archive.org/web/20210120002931/https://www.zdnet.com/article/linux-on-apple-arm-silicon-macs-this-crowdfunded-project-wants-to-give-it-a-try/ . live.
  4. Web site: Grüner . Sebastian . 2021-02-18 . Asahi Linux: Stabiler Linux-Support für M1-Macs dauert noch . Asahi Linux: Stable Linux support for M1 Macs still takes time . 2024-06-16 . . de-DE.
  5. Web site: Mayank . Sharma . Porting Linux to Apple M1 Macs is proving trickier than previously imagined . March 23, 2021 . . March 15, 2021 . March 21, 2022 . https://web.archive.org/web/20220321001825/https://www.techradar.com/news/porting-linux-to-apple-m1-macs-is-proving-trickier-than-previously-imagined . live.
  6. Web site: Calligeros . James . Apple Silicon Subsystems - Platform Initialisation and Boot . GitHub . August 1, 2022 . en . June 9, 2022 . https://web.archive.org/web/20220609182048/https://github.com/AsahiLinux/docs/wiki/Apple-Silicon-Subsystems . live.
  7. Web site: Martin . Hector . The first Asahi Linux Alpha Release is here! – Asahi Linux . asahilinux.org . March 20, 2022 . en . March 20, 2022 . https://web.archive.org/web/20220320005427/https://asahilinux.org/2022/03/asahi-linux-alpha-release/ . live.
  8. Web site: Windows support? . Asahi Linux GitHub . May 21, 2021 . April 5, 2022 . April 5, 2022 . https://web.archive.org/web/20220405162104/https://github.com/AsahiLinux/m1n1/issues/63 . live.
  9. Web site: Cunningham . Andrew . Linux distro for Apple silicon Macs is already up and running on the brand-new M2 . Ars Technica . 20 July 2022 . https://web.archive.org/web/20220719075723/https://arstechnica.com/gadgets/2022/07/linux-distro-for-apple-silicon-macs-is-already-up-and-running-on-the-brand-new-m2/ . July 19, 2022 . July 18, 2022 . live.
  10. Web site: Proven . Liam . 7 August 2023 . Asahi Linux project hooks up with Fedora: Remix that's not a remix coming soon . 7 August 2023 . The Register . August 8, 2023 . https://web.archive.org/web/20230808021056/https://www.theregister.com/2023/08/07/asahi_linux_partners_with_fedora . live .
  11. Web site: 21 Oct 2023 . We've updated our front page to direct new users to Fedora Asahi! . Asahi Linux Official Mastodon Account.
  12. Web site: 19 Dec 2023 . We've updated our front page to direct new users to Fedora Asahi! . Asahi Linux Official Webpage . December 20, 2023 . December 20, 2023 . https://web.archive.org/web/20231220095513/https://asahilinux.org/fedora/ . live .
  13. Web site: Vulkan 1.3 on the M1 in 1 month . 2024-08-16 . rosenzweig.io . en.
  14. Web site: Conformant OpenGL 4.6 on the M1 . 2024-02-22 . rosenzweig.io . en . February 18, 2024 . https://web.archive.org/web/20240218154109/https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html . live .
  15. We take Asahi Linux alpha for a spin on an M1 Mac Mini . The Register . March 22, 2022 . April 5, 2022 . April 5, 2022 . https://web.archive.org/web/20220405162619/https://www.theregister.com/2022/03/22/asahi_hands_on/ . live.
  16. Web site: Purdy . Kevin . December 7, 2022 . Four-person dev team gets Apple's M-series GPU working in Linux . live . https://web.archive.org/web/20221208073811/https://arstechnica.com/gadgets/2022/12/four-person-dev-team-gets-apples-m-series-gpu-working-in-linux/ . December 8, 2022 . 8 December 2022 . Ars Technica.
  17. News: Asahi Linux Distro Improves Apple M1 Support With First Alpha Release . Jacob . Crume . It's FOSS . March 21, 2022 . April 5, 2022 . March 21, 2022 . https://web.archive.org/web/20220321124701/https://news.itsfoss.com/asahi-linux-alpha/ . live.
  18. Web site: Broken Software . 2023-09-29 . GitHub . en . August 26, 2023 . https://web.archive.org/web/20230826123429/https://github.com/AsahiLinux/docs/wiki/Broken-Software . live .
  19. Web site: Linux does support mixed page sizes (that's how huge pages work) and the page si... Hacker News . 2023-09-29 . news.ycombinator.com . June 4, 2023 . https://web.archive.org/web/20230604070715/https://news.ycombinator.com/item?id=30731383 . live .
  20. Web site: Progress Report: September 2021 - Asahi Linux . live . https://web.archive.org/web/20230811071910/https://asahilinux.org/2021/10/progress-report-september-2021/ . August 11, 2023 . 2023-08-11 . asahilinux.org . en.
  21. Web site: Paving the Road to Vulkan on Asahi Linux - Asahi Linux . live . https://web.archive.org/web/20230811072022/https://asahilinux.org/2023/03/road-to-vulkan/ . August 11, 2023 . 2023-08-11 . asahilinux.org . en.
  22. Asahi Linux is reverse-engineering support for Apple Silicon, including M1 Ultra . Ars Technica . March 25, 2022 . April 5, 2022 . April 5, 2022 . https://web.archive.org/web/20220405043840/https://arstechnica.com/gadgets/2022/03/asahi-linux-is-already-running-on-the-mac-studios-new-m1-ultra-chip/ . live.