Skip to content

omarchy-aurora-firmware: bring the Neo external display up in the initrd - #7

Closed
RyanTheTide wants to merge 7 commits into
feat/aurora-edgefrom
feat/initramfs-external-display
Closed

RyanTheTide wants to merge 7 commits into
feat/aurora-edgefrom
feat/initramfs-external-display

Conversation

@RyanTheTide

Copy link
Copy Markdown

Draft for DJ and Eryk, since packaging is yours. Move it into another package if you prefer; it sits in omarchy-aurora-firmware because that package already carries the Neo's own initcpio hook (aurora-vendor-order).

Problem

With the lid closed, nothing shows on a USB-C external display until the root is unlocked, so the passphrase prompt is invisible in clamshell mode.

The external display (DCPEXT) needs appledrm loaded, for two reasons:

  • it drives the display;
  • it provides the Type-C display route (dcp@416e00000/typec-routes/route@0, a mode-switch). The sn201202x port controller defers its port registration until that route exists, so the DisplayPort mux, and the dock's USB 3, also wait for appledrm.

The stock kms hook keeps appledrm only when autodetect sees it bound on the machine that builds the image. The image builder never sees it: mkinitcpio -P runs in a chroot on the builder, and the chroot reads the builder's /sys.

Change

aurora-display hook, enabled by /etc/mkinitcpio.conf.d/96-aurora-display.conf:

  • always adds appledrm?. It is optional, so a kernel without the module still builds an image.
  • On a MacBook Neo (apple,j700), loads it from a oneshot unit aurora-display-early.service, wanted by sysinit.target, instead of waiting for udev coldplug. A busybox initrd runs the same loader as an early hook.
  • Other machines are left to udev. A failed load is logged and never blocks the boot: udev loads the same module later.
  • Nothing is ordered before udev, cryptsetup or the root device, so a slow or failed load cannot delay the prompt.
  • No SEP, audio-codec or speaker-protection module is added or reordered. aurora-sep.service and speakerguardd are untouched.

Offline evidence

Measured with mkinitcpio 42.2 / systemd 262 in the ALARM SDK container, using the published linux-aurora 7.1.12 g5f6c917 package and Omarchy-Mac-style HOOKS:

image before after
default, built off-device (like the image builder) 22,060,890 B, 145 modules, no appledrm 22,364,542 B (+297 KiB), 152 modules: +appledrm, drm_dma_helper, snd, snd-pcm, snd-pcm-dmaengine, snd-timer, soundcore
fallback (-S autodetect) 140,961,927 B 140,962,142 B (+215 B, same modules)

An image built on the Neo already gets appledrm from autodetect, so there it only gains the unit and the script.

Already true before this PR, and not changed by it: the fallback is about 141 MB. 158 MB of the uncompressed image is NVIDIA GSP firmware, because the kms hook includes nouveau when autodetect is skipped. The Neo hung on a 100 MB initramfs, so a machine with linux-firmware's NVIDIA files installed has a fallback that is too big to boot. That needs its own fix.

tests/aurora-display-initcpio.sh (added to test.yml) covers build() under stub helpers, a J700, another Mac, no device tree, and a failed modprobe.

Not yet tested on hardware

On-Neo protocol: cold boot ×5 for each of lid open with no external, lid open with an external, and lid closed with an external. Record time to the first picture on each display. Check that the LUKS prompt shows on the external display with the lid closed. Confirm that lsinitcpio lists appledrm and that journalctl -b -u aurora-display-early is clean.

🤖 Generated with Claude Code

DjDeveloperr and others added 7 commits October 14, 2026 17:16
Pin the Aurora stack, retain Mesa epoch and legacy boot paths, and isolate audio replacements from stock-name upgrades. Keep source tracking disabled for the review candidates.

Signed-off-by: DjDeveloperr <hey@djdev.me>

Assisted-by: LLM
…hing

5f6c917 merges omacom#301, which leaves the firmware-owned J700 DISP_CPU domain alone; 790d5a81 does not boot the Neo. ALARM's clang18, llvm18 and lld18 install only under /usr/lib/llvm18/bin, so LLVM defaults to that prefix and they are makedepends. The m1n1 floor goes back to 1.6.1, which M1 and M2 users' m1n1-aurora meets, and replaces=linux-asahi goes: it would swap the kernel of every Mac on [omarchy] at its next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
replaces= on a stock name swaps that package on every machine using [omarchy] at its next update: Mesa on every aarch64 machine, and m1n1, U-Boot, bless and the audio stack of every M1 and M2; on Qualcomm the platform guard would then refuse the whole upgrade. The recipes keep conflicts and provides, so the Neo image installs them explicitly, and replace only the Neo-only draft names. Every recipe carries the apple-silicon platform group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No package ships the MT7932 policy files, so the initcpio hook adds them only when present instead of failing the build. Only US and world-XZ exist, and the radio stays blocked for any other country, such as one set from the timezone at setup; a watcher on regulatory changes switches such a country to the world domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A first build makes the CL shader compilers Asahi needs; the packaged drivers use them with -Dllvm=disabled and -Dspirv-tools=disabled, so an Arch Linux ARM LLVM or SPIRV-Tools bump no longer leaves the Neo without a GPU until a rebuild. llvmpipe goes with LLVM; softpipe stays. check() refuses a staged library that needs either, and libdisplay-info triggers rebuilds.

The recipe did not build before: arch-meson's --buildtype clashed with -Dbuildtype=release, and its --auto-features enabled demands the VA front end this driver set cannot have. meson setup now takes arch-meson's flags without auto-features, with b_ndebug like Arch's Mesa, and pins the optional features the dependencies follow. makedepends names rust-bindgen, Arch's bindgen package. Mesa's tests stay off: hk_sampler_bias_test undefines NDEBUG and calls nir_validate_shader, so it links only in debug builds.

Built in an Omarchy edge chroot on Arch Linux ARM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atabase

The radio loads in the initramfs, so cfg80211 does too, and it reads regulatory.db only once. Without it the country set from the timezone reached the driver, which blocks without a policy for it, but not the global domain, so the world-domain fallback never saw it and Wi-Fi stayed down everywhere but the US. The hook now adds the database and its signature, and the fallback reloads it and sets the country again for an initramfs built before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the lid closed, the disk passphrase prompt can only show on a USB-C
external display once appledrm is loaded: it drives the second display
coprocessor (DCPEXT) and provides the Type-C display route the sn201202x
port controller waits for before it switches the port to DisplayPort.

The kms hook keeps appledrm only when autodetect sees it bound on the
machine that builds the image, which the image builder never is. Add an
aurora-display hook that always includes appledrm (optional, so a kernel
without it still builds) and, on a MacBook Neo, loads it from a oneshot
unit at sysinit.target instead of waiting for udev coldplug. A busybox
initrd runs the same loader as an early hook. Other machines are left to
udev, and a failed load is logged and never blocks the boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Author

feat/aurora-edge went upstream as omacom#1101 and later package work goes to omacom directly, so this base is closed. The initramfs display hook itself is still tracked in aurora-silicon/aurora-neo-platform-config#2. Closing, the branch is left as it is. Thanks!

@RyanTheTide
RyanTheTide deleted the feat/initramfs-external-display branch November 6, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants