Skip to content

Identify Apple Silicon without PATH or a vendor substring - #11325

Closed
scottjones wants to merge 8 commits into
omacom:quattrofrom
scottjones:fix/apple-silicon-detector
Closed

scottjones wants to merge 8 commits into
omacom:quattrofrom
scottjones:fix/apple-silicon-detector

Conversation

@scottjones

Copy link
Copy Markdown
Contributor

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 only apple,* device-tree entries (not a substring like pineapple,board).

The unique commit is the detector rewrite. The rest of the diff is #9835.

Co-authored-by Naeem Malik.

maralcbr and others added 8 commits September 3, 2026 00:37
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
scottjones marked this pull request as draft September 11, 2026 13:34
@scottjones

Copy link
Copy Markdown
Contributor Author

Draft: this is #9835 plus one detector commit. The unique delta is 5 files (omarchy-hw-arch, omarchy-hw-aarch64, omarchy-hw-apple-silicon, and the two tests). Happy to close this and put that commit on #9835 instead if that is the vehicle for quattro.

@scottjones

Copy link
Copy Markdown
Contributor Author

Closing in favor of stacking on Marcelo's overlay: maralcbr#99. Once that merges, it becomes part of #9835.

@scottjones scottjones closed this Sep 11, 2026
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.

3 participants