XNU Linux: Full OS X GUI Userspace on Linux github.com · 174 points · 77 comment...
HN Best 30 @best30
XNU Linux: Full OS X GUI Userspace on Linux github.com · 174 points · 77 comments · HN thread
TL;DR xnulinux loads Apple's open-source XNU kernel as a kernel module (xnu.ko) inside an unmodified arm64 Linux kernel, so a macOS 27 system disk from Apple's installer boots to the desktop with WindowServer, Dock, Finder, Safari and Chrome running natively alongside Linux processes on the same CPUs. It currently requires an Apple Silicon Mac running an arm64 Linux VM (krunkit or tart) with 4K pages and PAC.
- XNU is built from Apple's published sources and loaded as xnu.ko; a small GPL interface module fki.ko provides CPUs, memory, timers, files, network and GPU to it, with no hypervisor between the two.
- Each hosted CPU is a Linux kernel thread pinned to a Linux CPU; memory comes from one contiguous CMA block managed by XNU's own pmap.
- Reported boot to desktop with auto-login is 31–48 s, versus 49 s for an Apple Virtualization macOS VM on the same Mac.
- A 30-minute stress run of Safari, Notes, Calculator, TextEdit, System Settings, Spotlight and a disk walk finished with no panic or crash report.
- A GPU bridge routes hosted Metal through metal2vulkan and Vulkan to the Linux host GPU via Mesa's Venus driver, falling back to CPU rendering.
- Stopgaps include a merged OS cryptex, patched AMFI, relaxed SIP, and slower memory access than a native VM; the project ships no Apple binaries and needs the user's own macOS 27 installation.
Discussion The thread is impressed and somewhat awed by the technical feat, with many commenters marveling at how far AI-assisted engineering has advanced and reflecting on Apple's historical mystique. It quickly moves into practical questions: whether it runs on non-Apple hardware (mostly answered as Apple Silicon only for now), whether it is useful beyond curiosity, and whether Apple would object. A substantial side discussion covers DRM and encrypted OS ideas, prompted by a DMCA notice about Nintendo key recovery. The mood is mostly curious and admiring, with some skepticism and jokes.
- Impressive technical achievement, marvel at what is now possible (many): Many commenters call it amazing and mind-blowing, noting how such a project would have been unthinkable a few years ago. Some tie this to the broader normalization of ambitious projects with skilled operators and AI tooling.
- Requires Apple Silicon hardware, so not useful elsewhere yet (many): Several note the project only runs on Apple Silicon with PAC and 4K-page constraints, so it is not a general Linux or Hackintosh path today. Others reply that the code itself does not seem tied to Apple hardware and could be ported with drivers.
- Apple may object, EULA and licensing concerns (some): Some worry Apple will act against it or that it breaks the EULA, especially for commercial use such as build farms. Others argue Apple has historically tolerated hobbyist Hackintosh work and that the project avoids distributing Apple binaries.
- Question of purpose: why bother (some): A few ask why anyone would run macOS this way, with answers ranging from cross-platform Apple development and the aesthetic to simply because it is cool. Critics suggest buying a Mac instead.
- Concern about encrypted OS and DRM trends (a few): A thread on whether future OSes could be shipped encrypted with hardware-only keys, citing consoles and DSMOS.kext, and noting the Nintendo key takedown as an example of how copyright is enforced on such material.
- Similar ideas for Windows and other systems (a few): Some ask whether the same approach could load NTOSKRNL or revive Boot Camp-like Windows support, noting licensing and driver-signing obstacles. Historical precedents like coLinux are mentioned.
Links from the comments
- Apple's open-source XNU repository, linked to clarify the kernel is published source.
- UniXNU, cited as a related project whose work the 4K-page base derives from.
- Darling project aiming to run macOS apps on Linux, noted as not there yet.
- Post on a notarised eGPU driver for Apple Silicon, discussed in the GPU support debate.
#macOS #XNU #Linux #kernelModule #AppleSilicon #virtualization