macOS 27.2.1 now reaches the desktop from Linux thanks to xnulinux, a project that runs Apple’s XNU kernel as a loadable module inside an arm64 Linux kernel. Finder, Dock, Safari, and other macOS applications run alongside Linux processes on the same CPUs, with no hypervisor between the two systems.
The project builds XNU from the source code published by Apple and integrates it into an unmodified Linux kernel. A second module, fki.ko, connects the two sides: Linux provides memory, timers, files, networking, and graphics access, while XNU runs the macOS environment and its applications. The GitHub repository describes it as a “macOS personality” for Linux arm64.
Two kernels share the machine
The idea is not to emulate a Mac or translate applications. XNU directly controls the CPU and MMU—the memory management unit—and macOS processes run alongside Linux ones. Each hosted CPU corresponds to a Linux kernel thread pinned to a system CPU; XNU keeps running until it needs to yield control to the host to wait, perform input/output operations, or handle a timer.
Linux retains its own exception vectors. When XNU code triggers a fault or user exception, fki.ko forwards it to the corresponding XNU handler. For memory, Linux reserves a single physically contiguous block using CMA; XNU then manages that space with its own pmap. Both sides use 4 KB pages.
The result is two kernels coexisting, not a full virtual machine between Linux and macOS. The claim that there is no hypervisor refers to this relationship: in one of the test configurations, Linux does run inside a virtual machine on a Mac. XNU, by contrast, runs directly inside that Linux instance.
A full desktop, with virtualized devices
The environment boots a macOS 27 system disk created with Apple’s installer. loginwindow, WindowServer, Dock, Finder, Safari, and Chrome can appear on the desktop; the project’s tests also record Spotlight and filesystem access. Booting begins by loading xnu.ko into a stock Ubuntu kernel.
Devices are presented to macOS through kernel extensions, or kexts. Storage is a file on the Linux side; the display uses a framebuffer that Linux can read; and the keyboard, pointer, and Ethernet connection rely on host resources. The project also includes a key store and a graphics bridge.
The graphics path translates Metal to Vulkan using metal2vulkan. Vulkan reaches the host GPU through a DRM bridge, the xnudrmd daemon, and the Linux render node, using Mesa’s Venus driver. If no compatible backend is available, rendering falls back to the CPU through Mesa lavapipe; on the DGX Spark, that alternative is not a fallback but the mode currently in use.

The two tests: Apple Silicon and DGX Spark
The repository describes two arm64 configurations. The first uses a Mac with Apple Silicon and a Linux machine running with krunkit. The second boots Linux directly on an NVIDIA DGX Spark. The results differ in graphics and hosting mode, although both reach the macOS desktop.
| Configuration | Linux and resources for XNU | Reported result |
|---|---|---|
| Mac with Apple Silicon | Linux arm64 in a VM with krunkit; 1 to 6 hosted CPUs | macOS 27.2.1 reaches the desktop in 31–48 seconds; Virtio-GPU Venus GPU bridge active when a render node is available |
| NVIDIA DGX Spark | Ubuntu 24.04.5 LTS aarch64, Linux 7.0.0-1025-nvidia; 4 CPUs and 8 GiB reserved for XNU | Boots the full desktop with Screen Sharing and SSH; CPU rendering |
On the Mac, the project measures 31 to 48 seconds to the desktop, with automatic login. By comparison, a macOS virtual machine using Apple Virtualization on the same Mac takes 49 seconds, according to the figures published in the repository. The tested configuration exposes the host GPU to macOS through Virtio-GPU Venus; the repository identifies an Apple M5 Max in this setup.
The system was also subjected to a 30-minute stress test: 40 rounds of Safari, Notes, Calculator, TextEdit, System Settings, and Spotlight, as well as a disk traversal. The project reports that the test completed without a kernel panic or crash reports. The hosted machine can be managed as a systemd service: it starts with the system, stops along with the virtual machine, and can restart after a hosted kernel panic.
On the DGX Spark, the documented combination is Ubuntu 24.04.5 LTS aarch64 and Linux 7.0.0-1025-nvidia. XNU has four CPUs and 8 GiB of reserved memory; the desktop works with Screen Sharing and SSH. However, the xnudrmd bridge currently only forwards virtio-gpu Venus ioctl operations. The GB10 GPU still needs a new DRM backend for macOS to make use of it in this configuration.
Test requirements and limitations
The project requires an arm64 host with pointer authentication support, identified as PAC or FEAT_PAuth, 4 KB pages, and at least 16 GB of RAM. Of that memory, 8 GB is reserved for the hosted kernel. The cited tests are limited to a Mac with Apple Silicon and a DGX Spark; they do not describe compatibility with x86 Linux machines.
On bare-metal systems, the memory reservation parameters—mem, carve_base, and carve_mb—must be adjusted to match each machine’s physical memory map. In macOS hosted on the DGX Spark, “About This Mac” shows an unknown chip; sysctl reports hw.cpufamily with a value of 0. The repository also shows 7.80 GB of memory and four CPUs in this environment.
There are other differences from a conventional installation. The operating system cryptex is joined to the system volume, AMFI is patched, and SIP is relaxed. Memory access is slower than in a native virtual machine, a limitation the project links to using 4 KB pages instead of 16 KB pages. Its production documentation lists these elements as provisional.
No Apple binaries are distributed in the repository. To prepare the system disk and obtain Apple’s kexts and the trust cache, users need their own macOS 27 installation, created with Apple’s installer, and a Mac with Xcode. That Mac is also needed to prepare the disk and compile the GPU components. The XNU used comes from the sources published by Apple, version xnu-12377.121.6.
An experimental project and a licensing boundary
Linuxiac identifies Heyang Zhou as the project’s developer and one of the creators of Deno Deploy. XDA also credits Zhou with getting macOS 27.2.1 running on a stock Ubuntu installation. xnulinux’s public description emphasizes that this is a technical experiment, not an alternative ready to replace a Mac or run macOS applications on any Linux PC.
The licenses separate the two sides of the integration. fki.ko and the associated Linux code use GPL-2.0-only; xnu.ko is distributed under APSL-2.0, like XNU. Linux identifies it as a non-GPL module using MODULE_LICENSE("Proprietary"), which marks the kernel as tainted—a behavior the repository compares with that of ZFS. The project maintains this boundary in the FKI interface: xnu.ko must call Linux only through the functions in that interface.
The XNU base adapted for 4 KB pages and the toolchain for building it on Linux are based on macOS-DroidVM and UniXNU, according to the project. It also acknowledges Mesa, metal2vulkan, virglrenderer, and krunkit among the components used. The repository clarifies that xnulinux is not affiliated with or endorsed by Apple.
The next graphics milestone is on the DGX Spark
On the Mac with Apple Silicon, the Virtio-GPU Venus-based bridge already lets hosted applications access the host GPU when a compatible render node is available. On the DGX Spark, by contrast, the desktop still depends on lavapipe and the CPU: the project needs to extend the DRM backend for the GB10 GPU. That is the most visible technical difference between the two published tests.
For now, xnulinux demonstrates that macOS can boot and run applications alongside Linux in specific arm64 configurations, with an XNU kernel loaded as a module. Trying it requires compatible hardware, reserved memory, and your own macOS 27 installation; on the DGX Spark, graphics acceleration is still waiting on the new backend.
Sources: Hardware Upgrade, Open-source Projects, XDA, GitHub, TechPowerUp, Linuxiac