Repository navigation
Identify Apple Silicon without PATH or a vendor substring - #11325
Closed
scottjones wants to merge 8 commits into
Closed
scottjones wants to merge 8 commits into
scottjones wants to merge 8 commits into
Conversation
omarchy-hw-apple-silicon is the probe the rest of the Apple Silicon support gates on: aarch64 with "apple," in the device-tree compatible string, in the same shape as the other omarchy-hw-* predicates. The display, touchpad and battery helpers learn the names Asahi uses: the Touch Bar's phantom backlights are excluded and apple-panel-bl is preferred, the trackpad reports as apple-mtp-multi-touch, the battery is macsmc-battery rather than BAT*, and macsmc reports the discharge rate as a negative number. None of this is gated: it is name matching, and changes nothing on hardware that does not carry those names.
The install-time pieces of the Apple Silicon support, each gated on omarchy-hw-apple-silicon: - early-load hid_apple and hid_magicmouse in the initramfs so the dockchannel-hid trackpad does not lose the race to hid-generic, with a migration that applies it to existing installs and rebuilds the initramfs once (docs/apple-silicon-trackpad.md explains the race); - keep the Intel Mac Broadcom firmware-supplicant quirk off Apple Silicon, where it breaks scanning, and let the SPI keyboard fix cope with the absent DMI tables; - install vulkan-asahi explicitly (there is no PCI display vendor to match on) and select NetworkManager's iwd backend for the Broadcom Wi-Fi, plus rtkit for PipeWire's realtime scheduling; - skip the x86 platform steps that have nothing to act on there: the Snapper config (no Limine snapshot entries), systemd-oomd (the aarch64 package ships neither the drop-ins nor the zram they are tuned for), the pacman.conf/mirrorlist restore (Apple Silicon keeps the Arch Linux ARM and Asahi repositories that own its kernel and firmware), and the direct-boot, pacman-refresh and channel-set commands, which refuse with a clear message.
On Apple Silicon the keyring refresh syncs archlinuxarm-keyring and verifies the Omarchy key is already present instead of fetching it from a keyserver; the conflicted-update handler refuses to move platform-owned paths (/boot, the mkinitcpio and pacman configuration, the initcpio tree) out of the way, since the Asahi packages own those; the Xbox controller driver builds against linux-asahi-headers; and rustup uses its curl backend, whose downloads do not reset there. The Node tarball for the mise work environment is now selected by architecture (arm64 or x64) rather than assumed to be x64. That one is not Apple-specific and applies to any aarch64 machine.
Not every optional install exists on aarch64: some vendors ship no ARM build, some AUR recipes are x86_64-only. Rather than let a menu row fail halfway through a pacman transaction, each optional-install row now carries `when: omarchy-install-available <id>`, which resolves the row's full package transaction through install/optional-packages.tsv and asks pacman whether every package in it can be installed here. Rows with no package for this architecture disappear; nothing changes on x86_64, where every transaction resolves. The guard prelude in the menu model answers the whole batch with one `pacman -Slq`, so the menu does not pay one pacman call per row. install/optional-packages-aarch64-required lists the rows that must stay resolvable on aarch64, and a drift test keeps the manifest in step with what each install script actually installs. The menu test's rule that an Install row never hides because the software is already there still holds; it now recognises the availability guard as the one other reason a row may hide, and checks that every such guard names its own row.
On the Asahi touchpad, disable_while_typing alone does not stop stray taps while typing; turning off tap_to_click does. Physical clicks stay the default everywhere, and the user override example documents how to turn tap-to-click back on. This is the one Apple Silicon change that alters behaviour on every machine, so it is its own commit and can be dropped or made device-conditional without touching the rest of the series.
The availability guard asked the sync database with pacman -Si for every name in a row's transaction, and hid the row when any name was absent. Two kinds of name are absent from every x86_64 sync database while the row installs fine: the five browsers omarchy-install-browser builds through omarchy-pkg-aur-add (google-chrome, microsoft-edge-stable-bin, brave-bin, brave-origin-bin, zen-browser-bin), and libappindicator-gtk3, which no repository ships by that name because libappindicator provides it. Chrome, Edge, Brave, Brave Origin, Zen and Dropbox all disappeared from Install on a stock x86_64 machine, which is the regression the commit adding the guard said could not happen. The five AUR rows move to install/optional-aur-packages.tsv beside NordVPN and lose the sync guard, the way that file already handles a row the sync database cannot answer for. Availability now asks pacman -Sp, which resolves a target the way -S will when the row is chosen, so a provided name counts and a constraint still does; the guard prelude keeps its one pacman -Slq for the batch and falls through to -Sp only for a name the set does not hold. The tests stub -Sp instead of -Si and assert outright that a provided name resolves, since agreement between the helper and the prelude alone would have passed with both wrong. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
Widening the battery helpers from BAT* to any Battery let a wireless mouse or keyboard stand in for the machine's own battery. The kernel registers a Logitech HID++ or Bluetooth peripheral as a power_supply of type Battery too, scoped Device, and UPower lists it as battery_hidpp_battery_0 with "power supply: no". omarchy-battery-present then answered yes on a desktop with a wireless mouse, which is what install/hardware/intel/lpmd.sh and thermald.sh gate laptop-only services on, and omarchy-battery-status took whichever battery_ device UPower listed first, so the power panel and the battery notification could report the mouse's charge on a laptop. battery-present skips a Battery whose scope is Device, keeping System and unscoped ones so older drivers still count. battery-status walks the battery_ devices in order and takes the first UPower marks as a power supply. The tests put a peripheral first in both enumerations and check the machine's battery is still the one reported. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
The overlay detector grepped apple, as text, which would accept pineapple,board, and looked up uname on PATH. Architecture and Apple identity now share helpers invoked next to the script and match only apple,* device-tree entries. Co-authored-by: Naeem Malik <malik2015naeem@gmail.com>
scottjones
marked this pull request as draft
September 11, 2026 13:34
Contributor
Author
Contributor
Author
|
Closing in favor of stacking on Marcelo's overlay: maralcbr#99. Once that merges, it becomes part of #9835. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #9835. Same overlay, plus Naeem's architecture split:
omarchy-hw-arch/omarchy-hw-aarch64/omarchy-hw-apple-silicon, invoked next to the script so they work before PATH is set, matching onlyapple,*device-tree entries (not a substring likepineapple,board).The unique commit is the detector rewrite. The rest of the diff is #9835.
Co-authored-by Naeem Malik.