Asahi Linux

Last updated

Asahi Linux
AsahiLinux logo.svg
Arch Linux ARM-Asahi Linux Desktop English 07-2023.png
Screenshot of Arch Linux ARM of Asahi Linux with KDE Plasma 5
Developer
OS family Linux (Unix-like)
Working stateOfficial Stable (Fedora 40)
Source model Open source
Repository github.com/AsahiLinux
Platforms Apple M1 & M2 (AArch64)
Official website asahilinux.org

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.

Contents

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. [2]

Martin announced the project in December 2020 and formally started work a month later in 2021, [3] 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). [4] [5] The project has been made challenging by the lack of publicly available documentation of Apple's proprietary firmware. [6] [7]

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] [8]

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. [9] 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. [10] 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. [11]

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. [12] 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. [13] [14]

Hardware and driver support

A Vulkan driver is in a working prototype [15] and OpenGL 4.6 and OpenGL ES 3.2 are supported. [16] This driver is currently the only fully-compliant AGX (Apple Silicon GPU) driver for any widespread graphics standard. [17] [18] [19] While initially using the Panfrost driver implementation, the Asahi Linux Project also made use of Gallium-3D and Rust for Linux based APIs for driver development. OpenCL is supported. [20] 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 supports 16 kB (for reason of performance) pages. Programs that do not (e.g. expect 4 kB or 64 kB pages) experience alignment problems when being mapped to memory. [21] The page sizes set by Linux are global (there is no support for multiple page sizes in operation). [22] The Apple GPU driver supports 4 kB and 16 kB pages. [23] [24]

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. [18] Similarly, a review in Ars Technica was impressed by the amount of hardware that was already supported early in the project lifecycle. [10]

See also

Notes

  1. A pseudonymous developer only known by her VTuber identity.

Related Research Articles

<span class="mw-page-title-main">OpenGL</span> Cross-platform graphics API

OpenGL is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.

Darwin is the core Unix-like operating system of macOS, iOS, watchOS, tvOS, iPadOS, audioOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed of code derived from NeXTSTEP, FreeBSD, other BSD operating systems, Mach, and other free software projects' code, as well as code developed by Apple. Darwin's official mascot is Hexley the Platypus.

<span class="mw-page-title-main">XNU</span> Computer operating system kernel

XNU is the computer operating system (OS) kernel developed at Apple Inc. since December 1996 for use in the Mac OS X operating system and released as free and open-source software as part of the Darwin OS, which, in addition to being the basis for macOS, is also the basis for Apple TV Software, iOS, iPadOS, watchOS, visionOS, and tvOS.

HFS Plus or HFS+ is a journaling file system developed by Apple Inc. It replaced the Hierarchical File System (HFS) as the primary file system of Apple computers with the 1998 release of Mac OS 8.1. HFS+ continued as the primary Mac OS X file system until it was itself replaced with the Apple File System (APFS), released with macOS High Sierra in 2017. HFS+ is also one of the formats supported by the iPod digital music player.

<span class="mw-page-title-main">Free and open-source graphics device driver</span> Software that controls computer-graphics hardware

A free and open-source graphics device driver is a software stack which controls computer-graphics hardware and supports graphics-rendering application programming interfaces (APIs) and is released under a free and open-source software license. Graphics device drivers are written for specific hardware to work within a specific operating system kernel and to support a range of APIs used by applications to access the graphics hardware. They may also control output to the display if the display driver is part of the graphics hardware. Most free and open-source graphics device drivers are developed by the Mesa project. The driver is made up of a compiler, a rendering API, and software which manages access to the graphics hardware.

<span class="mw-page-title-main">Hackintosh</span> Non-Apple computer running macOS

A Hackintosh is a computer that runs Apple's operating system macOS on computer hardware that is not authorized for the purpose by Apple. This can also include running Mac software on hardware it is not originally authorized for. This is due to the software license for macOS only permitting its use on in-house hardware built by Apple itself, in this case the Mac line.

<span class="mw-page-title-main">Boot Camp (software)</span> Built-in macOS software to natively install Microsoft Windows on a Mac.

Boot Camp Assistant is a multi boot utility included with Apple Inc.'s macOS that assists users in installing Microsoft Windows operating systems on Intel-based Macintosh computers. The utility guides users through non-destructive disk partitioning of their hard disk drive or solid-state drive and installation of Windows device drivers for the Apple hardware. The utility also installs a Windows Control Panel applet for selecting the default boot operating system.

<span class="mw-page-title-main">EFI system partition</span> Partition used by Unified Extensible Firmware Interface

The EFIsystem partition or ESP is a partition on a data storage device that is used by computers that have the Unified Extensible Firmware Interface (UEFI). When a computer is booted, UEFI firmware loads files stored on the ESP to start operating systems and various utilities.

nouveau (software) Open source software driver for Nvidia GPU

nouveau is a free and open-source graphics device driver for Nvidia video cards and the Tegra family of SoCs written by independent software engineers, with minor help from Nvidia employees.

<span class="mw-page-title-main">OpenCL</span> Open standard for programming heterogenous computing systems, such as CPUs or GPUs

OpenCL is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs) and other processors or hardware accelerators. OpenCL specifies a programming language for programming these devices and application programming interfaces (APIs) to control the platform and execute programs on the compute devices. OpenCL provides a standard interface for parallel computing using task- and data-based parallelism.

<span class="mw-page-title-main">Metal (API)</span> iOS, macOS, and tvOS graphics rendering API

Metal is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API created by Apple, debuting in iOS 8. Metal combines functions similar to OpenGL and OpenCL in one API. It is intended to improve performance by offering low-level access to the GPU hardware for apps on iOS, iPadOS, macOS, and tvOS. It can be compared to low-level APIs on other platforms such as Vulkan and DirectX 12.

Vulkan is a low-level, low-overhead cross-platform API and open standard for 3D graphics and computing. It was intended to address the shortcomings of OpenGL, and allow developers more control over the GPU. It is designed to support a wide variety of GPUs, CPUs and operating systems, and it is also designed to work with modern multi-core CPUs.

<span class="mw-page-title-main">Fuchsia (operating system)</span> Computer operating system by Google

Fuchsia is an open-source capability-based operating system developed by Google. In contrast to Google's Linux-based operating systems such as ChromeOS and Android, Fuchsia is based on a custom kernel named Zircon. It publicly debuted as a self-hosted git repository in August 2016 without any official corporate announcement. After years of development, its official product launch was in 2021 on the first-generation Google Nest Hub, replacing its original Linux-based Cast OS.

iBoot is the stage 2 bootloader for all Apple products. It replaces the older EFI-based bootloader on Intel-based Macs. Compared with its predecessor, iBoot improves authentication performed in the boot chain.

MoltenVK is a software library which allows Vulkan applications to run on top of Metal on Apple's macOS, iOS, and tvOS operating systems. It is the first software component to be released for the Vulkan Portability Initiative, a project to have a subset of Vulkan run on platforms lacking native Vulkan drivers.

<span class="mw-page-title-main">Apple M1</span> Series of systems-on-a-chip designed by Apple, launched 2020 to 2022

Apple M1 is a series of ARM-based system-on-a-chip (SoC) designed by Apple Inc., launched 2020 to 2022. It is part of the Apple silicon series, as a central processing unit (CPU) and graphics processing unit (GPU) for its Mac desktops and notebooks, and the iPad Pro and iPad Air tablets. The M1 chip initiated Apple's third change to the instruction set architecture used by Macintosh computers, switching from Intel to Apple silicon fourteen years after they were switched from PowerPC to Intel, and twenty-six years after the transition from the original Motorola 68000 series to PowerPC. At the time of its introduction in 2020, Apple said that the M1 had "the world's fastest CPU core in low power silicon" and the world's best CPU performance per watt. Its successor, Apple M2, was announced on June 6, 2022, at Worldwide Developers Conference (WWDC).

<span class="mw-page-title-main">Alyssa Rosenzweig</span> Software developer

Alyssa Rosenzweig is a software developer and software freedom activist known for her work on free software graphics drivers.

Hector Martin Cantero, also known as marcan, is a Spanish security hacker and current lead developer on the Asahi Linux project. He is also known for hacking multiple PlayStation generations, the Wii and other devices.

<span class="mw-page-title-main">Apple M2</span> Series of system-on-a-chip designed by Apple, launched 2022 to 2023

Apple M2 is a series of ARM-based system on a chip (SoC) designed by Apple Inc., launched 2022 to 2023. It is part of the Apple silicon series, as a central processing unit (CPU) and graphics processing unit (GPU) for its Mac desktops and notebooks, the iPad Pro and iPad Air tablets, and the Vision Pro mixed reality headset. It is the second generation of ARM architecture intended for Apple's Mac computers after switching from Intel Core to Apple silicon, succeeding the M1. Apple announced the M2 on June 6, 2022, at Worldwide Developers Conference (WWDC), along with models of the MacBook Air and the 13-inch MacBook Pro using the M2. The M2 is made with TSMC's "Enhanced 5-nanometer technology" N5P process and contains 20 billion transistors, a 25% increase from the M1. Apple claims CPU improvements up to 18% and GPU improvements up to 35% compared to the M1.

The Linux kernel can run on a variety of devices made by Apple, including devices where the unlocking of the bootloader is not possible with an official procedure, such as iPhones and iPads.

References

  1. "About Asahi Linux". Archived from the original on April 5, 2023. Retrieved May 4, 2023.
  2. "Linus Torvalds would like to use an M1 Mac for Linux, but ..." ZDNet. November 24, 2020. Archived from the original on April 1, 2022. Retrieved April 5, 2022.
  3. Grüner, Sebastian (April 9, 2021). "Initaler M1-Support landet im Linux-Kernel" [Initial M1-Support Lands in Linux Kernel]. golem.de (in German). Retrieved June 16, 2024.
  4. Tung, Liam (January 8, 2021). "Linux on Apple's Arm silicon Macs? This crowdfunded project wants to give it a try". ZDnet. Archived from the original on January 20, 2021. Retrieved May 31, 2021.
  5. Grüner, Sebastian (February 18, 2021). "Asahi Linux: Stabiler Linux-Support für M1-Macs dauert noch" [Asahi Linux: Stable Linux support for M1 Macs still takes time]. Linux-Magazin (in German). Retrieved June 16, 2024.
  6. 1 2 Sharma, Mayank (March 15, 2021). "Porting Linux to Apple M1 Macs is proving trickier than previously imagined". TechRadar . Archived from the original on March 21, 2022. Retrieved March 23, 2021.
  7. 1 2 Martin, Hector. "The first Asahi Linux Alpha Release is here! – Asahi Linux". asahilinux.org. Archived from the original on March 20, 2022. Retrieved March 20, 2022.
  8. Calligeros, James. "Apple Silicon Subsystems - Platform Initialisation and Boot". GitHub. Archived from the original on June 9, 2022. Retrieved August 1, 2022.
  9. "Windows support?". Asahi Linux GitHub. May 21, 2021. Archived from the original on April 5, 2022. Retrieved April 5, 2022.
  10. 1 2 "Asahi Linux is reverse-engineering support for Apple Silicon, including M1 Ultra". Ars Technica. March 25, 2022. Archived from the original on April 5, 2022. Retrieved April 5, 2022.
  11. Cunningham, Andrew (July 18, 2022). "Linux distro for Apple silicon Macs is already up and running on the brand-new M2". Ars Technica. Archived from the original on July 19, 2022. Retrieved July 20, 2022.
  12. Proven, Liam (August 7, 2023). "Asahi Linux project hooks up with Fedora: Remix that's not a remix coming soon". The Register. Archived from the original on August 8, 2023. Retrieved August 7, 2023.
  13. "We've updated our front page to direct new users to Fedora Asahi!". Asahi Linux Official Mastodon Account. October 21, 2023.
  14. "We've updated our front page to direct new users to Fedora Asahi!". Asahi Linux Official Webpage. December 19, 2023. Archived from the original on December 20, 2023. Retrieved December 20, 2023.
  15. "Vulkan 1.3 on the M1 in 1 month". rosenzweig.io. Retrieved August 16, 2024.
  16. "Conformant OpenGL 4.6 on the M1". rosenzweig.io. Archived from the original on February 18, 2024. Retrieved February 22, 2024.
  17. 1 2 Crume, Jacob (March 21, 2022). "Asahi Linux Distro Improves Apple M1 Support With First Alpha Release". It's FOSS. Archived from the original on March 21, 2022. Retrieved April 5, 2022.
  18. 1 2 "We take Asahi Linux alpha for a spin on an M1 Mac Mini". The Register. March 22, 2022. Archived from the original on April 5, 2022. Retrieved April 5, 2022.
  19. Purdy, Kevin (December 7, 2022). "Four-person dev team gets Apple's M-series GPU working in Linux". Ars Technica. Archived from the original on December 8, 2022. Retrieved December 8, 2022.
  20. "AAA gaming on Asahi Linux". rosenzweig.io. Retrieved October 14, 2024.
  21. "Broken Software". GitHub. Archived from the original on August 26, 2023. Retrieved September 29, 2023.
  22. "Linux does support mixed page sizes (that's how huge pages work) and the page si... | Hacker News". news.ycombinator.com. Archived from the original on June 4, 2023. Retrieved September 29, 2023.
  23. "Progress Report: September 2021 - Asahi Linux". asahilinux.org. Archived from the original on August 11, 2023. Retrieved August 11, 2023.
  24. "Paving the Road to Vulkan on Asahi Linux - Asahi Linux". asahilinux.org. Archived from the original on August 11, 2023. Retrieved August 11, 2023.