# Origin: omarchy-mx-mac install/hardware/apple/fix-asahi-hid-race.sh # Apple Silicon internal keyboard and trackpad at the sd-encrypt passphrase # prompt. dockchannel-hid creates the HID devices; hid_apple binds the # keyboard and hid_magicmouse the SPI trackpad. MTP machines (M2 Air, M2 Max # j416c) use dockchannel-hid — linux-aurora has no apple-mtp module. SPI HID # (M1 Air, M1 Pro j314s) is spi-hid-apple-of, built-in on aurora. usbhid is # an external USB keyboard at the prompt. thunderbolt (CONFIG_USB4=m) and # thunderbolt_apple, the Apple Silicon USB4 host router (CONFIG_USB4_APPLE_SOC=m # on linux-aurora), bring up the USB4/Thunderbolt tunnels, so a keyboard behind # a USB-C or Thunderbolt dock types at the prompt too (omarchy-mx-mac#86). # # mkinitcpio fails the whole image over a MODULES entry it cannot find, or a # built-in it reports as "(builtin)". Each name is added only when modinfo # returns a real path. Ending on unset keeps the exit status zero. for _omarchy_mac_hid_module in \ hid_apple hid_magicmouse dockchannel-hid usbhid \ spi-apple spi-hid-apple spi-hid-apple-of \ apple-dockchannel apple-rtkit-helper thunderbolt thunderbolt_apple; do _omarchy_mac_hid_path=$(modinfo -k "${KERNELVERSION:-$(uname -r)}" -F filename \ "$_omarchy_mac_hid_module" 2>/dev/null) || continue [[ $_omarchy_mac_hid_path == /* ]] || continue MODULES+=("$_omarchy_mac_hid_module") done unset _omarchy_mac_hid_module _omarchy_mac_hid_path # MTP trackpad firmware (apple/tpmtfw-.bin) is not a MODULES entry. # omarchy-vendorfw-initrd.service unpacks ESP vendorfw/firmware.cpio onto # /lib/firmware/vendor (symlink to /vendorfw) before cryptsetup-pre.target. # Do not FILES+= under /lib/firmware/vendor, and do not pre-create # /vendorfw/apple in the image: that skipped ESP extraction.