xnu.ko module into a stock arm64 Linux kernel.insmod xnu.ko brings macOS 27.2.1 all the way to the desktop: loginwindow, WindowServer, Dock, Finder, Safari.In the AFK-surf/xnulinux repo (257 commits), XNU — the open-source macOS kernel — runs as a loadable module, xnu.ko, inside an unmodified arm64 Linux kernel. There's no hypervisor between them. The guest kernel drives the CPU and MMU itself, so macOS processes run on the same cores as Linux processes.
Here's how it works. Each guest CPU is a Linux kernel thread pinned to a specific core; XNU runs on it until the first idle, timer, or I/O request. XNU grabs its memory as a single physically contiguous block from CMA and hands it out through its own pmap, with 4K pages and a shared user half of the address space. Timers, files, networking, and the GPU are borrowed from Linux via fki.ko — that's the GPL side, while xnu.ko ships under APSL. Kexts in kexts/ feed macOS a disk (a file on the Linux side), a framebuffer, keyboard and pointer, an Ethernet link, and a keystore.
The claimed result: on a stock Ubuntu kernel, insmod xnu.ko boots a macOS 27.2.1 system disk — created with Apple's own installer — all the way to the desktop: loginwindow, WindowServer, Dock, Finder, Safari, Chrome. The author reports 31–48 s to autologin (a macOS VM on Apple Virtualization on the same machine takes 49 s) and a 30-minute stress test of 40 rounds of Safari, Notes, Calculator, TextEdit, and Spotlight with no panics. Metal inside macOS goes through gpu/xnu-cpu-metal (metal2vulkan on top of Vulkan), then a DRM bridge and a Linux render node on Mesa Venus; without a GPU, it falls back to lavapipe on the CPU. The code is open on GitHub.
Why did this surface now? Our read: three things converged. Apple has published XNU sources for ages, but page-size differences and the lack of a viable GPU path used to get in the way. Now both systems run on 4K pages, and Vulkan on Apple Silicon via Venus has been made actually usable. Plus, the Linux 7.0 mention isn't cosmetic — it signals the project is chasing a fresh kernel.
What does it change? Honestly, for the average user today — almost nothing. Hypervisor-based macOS VMs exist and work; I've run them myself and don't remember any pain. The point of xnulinux isn't convenience, it's the demonstration: two userspaces, one kernel, zero layers in between. It's a stress test of Linux's public interfaces — threads, fault handling, CMA, kext-style device plumbing. It's exactly these kinds of projects that expose stability holes before they reach production.
The winners are researchers and hobbyists — in my experience, that's the audience closest to the Asahi Linux world and to people who enjoy digging into the kernel. I don't see any losers: there's no product, so there's nothing to compete with. The authors don't address the legal side, and this is my hypothesis, not a fact: the project doesn't ship any Apple binaries, builds from Apple's own sources, and requires a disk from Apple's installer — the most benign scenario. How that squares with the EULA in any given case, I haven't checked.
One author, 257 commits, and every number comes from the README — no independent replications. The "What is still a stopgap" section in the source cuts off, meaning we never saw the full list of known limitations. No performance benchmarks: 31–48 s to login says nothing about app speed. Testing was only in a VM on Apple Silicon via krunkit; the writeup says nothing about bare metal or x86. And one open question remains: how does APSL-licensed xnu.ko code coexist with the GPL kernel? I found no answer in the repo.
Forecast: within a quarter, an independent replication will appear on different hardware (M1–M4) or a different distro (Fedora, Arch) with performance numbers. If it doesn't, xnulinux stays a one-person demo rig.
Disclaimer: single source — all figures and statuses come from the author's README, nothing officially confirmed.
Source: AFK-surf/xnulinux (GitHub)
Source: github.com · post in Telegram