This article is more than 1 year old

'Not great, but usable': GNOME desktop boots on Asahi Linux for Apple M1

Should 'run like a dream' when everything's done, says dev

A member of the Asahi Linux team has shown the GNOME desktop running on the Apple M1 chip, reporting that it is "not great, but usable."

Alyssa Rosenweig, who has been working on reverse engineering the Apple M1 GPU since January, has now posted a screenshot of "GNOME Shell on the Apple M1, bare metal."

A terminal in the shot shows that it is running a pre-release of the 5.14 Linux kernel, Debian Linux, and GNOME 3.38.4. "No, it's not GPU accelerated," she said, adding: "Honestly, it's usable. Not great, but usable, on a near mainline kernel. If 'missing most drivers' is this snappy, when everything is done @AsahiLinux will run like a dream on these machines."

Debian with GNOME 3.38 running on an Apple M1 Mac

The screenshot by Rosenzweig: Debian with GNOME 3.38 running on an Apple M1 Mac

She further explained that the kernel used included patches for the pin control subsystem, PCIe, and a "work in progress display driver... that gets us to display, USB and Ethernet."

She described it as a "nice milestone on the way to a DCP driver," where DCP is a co-processor for the GPU, unique to Apple silicon. Support for GPU acceleration is critical to a fully usable and polished operating system.

In January, Corellium described "how we ported Linux to the M1" but although Ubuntu booted successfully it had limited capabilities, such as no access to the internal hard drive when booted from USB and no GPU driver.

Rozenzweig said that the new demo is a considerable advance on Corellium’s earlier experiment. "The older demos rely on Apple's bootloader allocating a framebuffer and configuring the display hardware to use it. This 'single buffering' setup is prone to graphics artefacts like tearing," she told The Register.

"Tearing is reduced with 'double buffering', where the display driver allocates separate on-screen and off-screen framebuffers. The on-screen buffer is displayed while the off-screen buffer is rendered to. Each frame, the roles are swapped, presenting the rendered frame instantly."

She added: "This week's screenshot demos an early display driver for the Apple M1, capable of double buffering. Apple guards framebuffers behind a proprietary IOMMU [Input-output memory management unit]. Another Asahi Linux develper, Sven Peter, wrote a driver for Apple's IOMMU, now part of the mainline kernel. With Sven's driver, we can model the display IOMMU and allow the Linux kernel to allocate framebuffer memory.

"However, when Linux takes control of the display IOMMU, the bootloader framebuffer becomes invalid. Linux needs to reconfigure the display to use the new framebuffer. I found the internal register addressing the framebuffer, enabling me to write a Linux display driver (DRM/KMS) plumbing the display IOMMU into userspace and configuring that register each frame. This work enables double buffering and paves the way for a full display driver using the M1's display coprocessor," Rozenzweig told us.

The Asahi Linux project is aiming for "a polished Linux experience on Apple Silicon Macs." The team is making good progress, though earlier this month project lead Hector Martin said that it would only support specific firmware versions since "the DCP interface is not stable and changes every macOS version." ®

More about

TIP US OFF

Send us news


Other stories you might like