diff --git a/bin/elementary-mac-setup b/bin/elementary-mac-setup index 3549f564b..9972a3a69 100755 --- a/bin/elementary-mac-setup +++ b/bin/elementary-mac-setup @@ -683,6 +683,8 @@ step_boot_layout() { # correctly later; without the font the prompt is a millimetre tall. # - the display crossbar and the Apple HID drivers: late display bring-up and # a trackpad that is sometimes dead for a whole session. +# - the PMP and keyboard-PWM drivers, where they are modules: a 20 s PMP wait and +# an unlit keyboard at the passphrase prompt. # The blocks go into /etc/mkinitcpio.conf itself because mkinitcpio ignores the # drop-in directory for presets that set ALL_config (the fairydust ones). install_initramfs_fixes() { @@ -692,9 +694,13 @@ install_initramfs_fixes() { [[ -f /etc/mkinitcpio.conf.pre-elementary-mac ]] || cp -a /etc/mkinitcpio.conf /etc/mkinitcpio.conf.pre-elementary-mac # An earlier version of this setup used a drop-in; the block replaces it. [[ -f /etc/mkinitcpio.conf.d/zz_elementary_console.conf ]] && unlink /etc/mkinitcpio.conf.d/zz_elementary_console.conf + # The hardware block bundles this rule, which lights the keyboard at the passphrase prompt. + install -D -m 0644 "$SRC/mseries/boot/90-elementary-mac-kbd-backlight.rules" \ + /etc/udev/rules.d/90-elementary-mac-kbd-backlight.rules bash "$tool" add initramfs-console bash "$tool" add initramfs-hardware - log "The initramfs will load the keymap, console font, display crossbar and Apple HID drivers" + log "The initramfs will load the keymap, console font, display crossbar, Apple HID and PMP drivers," + log "and turn the keyboard backlight on at the passphrase prompt" } step_encrypt() { diff --git a/mseries/OS9-HANDOFF.md b/mseries/OS9-HANDOFF.md index 743fbbc12..522374dcf 100644 --- a/mseries/OS9-HANDOFF.md +++ b/mseries/OS9-HANDOFF.md @@ -1,3 +1,7 @@ +## Initramfs: PMP driver and keyboard backlight at the passphrase prompt — 2026-10-31 + +Ported two omarchy-mac-pkgs boot fixes (7ae91471, a0fa1a8b; MIT) into the transform's mkinitcpio block. `mseries/boot/initramfs-hardware.snippet` now also early-loads `apple_pmp` and `pwm_apple` when the kernel builds them as modules (linux-aurora 7.2.11 does; our fairydust config has both `=y`), avoiding a 20 s "PMP driver did not bind" wait before the passphrase prompt and an unlit keyboard there. New `mseries/boot/90-elementary-mac-kbd-backlight.rules` turns `kbd_backlight` on at 128 if leds_pwm registers it at 0 (systemd-backlight restores the saved level after unlock); `elementary-mac-setup` installs it to `/etc/udev/rules.d/`, and the block bundles it with `FILES`. Test: `test-elementary-mac-setup.sh` checks the module list with and without each driver. Not verified: an initramfs rebuild or a boot on the j314s; whether the owner's current Aurora kernel builds these as modules. Existing hosts get it when `elementary-mac-setup` re-applies the initramfs block. Factory image (initramfs-tools) not covered. + ## Warren local AI and eGPU updates — 2026-10-30 Installed `mseries-nvidia-open-source` `595.112.07+apple.1-1` (SHA-256 `a397b68a...b209ab23`) containing the three prepared NVIDIA fixes and license at `/usr/src/mseries-nvidia-open-595.112.07`. This is source only; no NVIDIA module or matching CUDA userspace is installed. The [source package script](nvidia-egpu/package-source.sh) verifies the exact prepared diff before packaging. diff --git a/mseries/PORT-MAP.md b/mseries/PORT-MAP.md index d2b992b18..3a40f83eb 100644 --- a/mseries/PORT-MAP.md +++ b/mseries/PORT-MAP.md @@ -36,12 +36,13 @@ The source boundary is documented in | Current package source | Hardware behavior | Elementary translation | Status | |---|---|---|---| | `omarchy-mac/bin/omarchy-wifi-resume-fix` and its systemd unit | Recover supported Apple Broadcom Wi-Fi after resume. | The image layer has a systemd recovery unit and firmware provisioner. | Present in source; factory-image path not verified. | -| `omarchy-mac/bin/omarchy-audio-asahi-mic-map` and WirePlumber configuration | Route the Asahi DSP microphone into the desktop audio graph. | Requires an Ubuntu audio-session integration and the Asahi DSP packages. | Headset-mic priority rule ported (`mseries/audio/asahi-headset-mic.conf`). The stereo-mapping tool (`omarchy-audio-asahi-mic-map`, a pactl/pw-dump/parec reconciler) is **deliberately not ported**: its stated reason is Quickshell-specific (that shell wants a stereo `Audio/Source` for its level meter and volume control). Pantheon's sound indicator uses libpulse and accepts a mono source. Revisit only if an app records silence from the built-in mic on this desktop. | +| `omarchy-mac/bin/omarchy-audio-asahi-mic-map` and WirePlumber configuration | Route the Asahi DSP microphone into the desktop audio graph. | Requires an Ubuntu audio-session integration and the Asahi DSP packages. | Headset-mic priority rule ported (`mseries/audio/asahi-headset-mic.conf`). The stereo-mapping tool (`omarchy-audio-asahi-mic-map`, a pactl/pw-dump/parec reconciler) is **deliberately not ported**: its stated reason is Quickshell-specific (that shell wants a stereo `Audio/Source` for its level meter and volume control). Pantheon's sound indicator uses libpulse and accepts a mono source. Revisit only if an app records silence from the built-in mic on this desktop. Re-checked 2026-10-31 at omarchy-mac-pkgs 061be4d6: the AUX0→MONO port rename (asahi-audio ab1b469) only affects that mapper, and the "DSP mic missing until WirePlumber restarts after an update" fix is covered for our install path because `install-audio-stack.sh` restarts the audio services; still not ported. | | `omarchy-mac` speaker-safety preset and setup entrypoint | Keep the Apple speaker safety daemon installed and enabled. | Desktop install scripts provide speakersafetyd and an optional Asahi DSP chain; the factory image does not install this path yet. | Desktop audio output passed with the matched PipeWire LV2 plugin; preserve safety service. | | Optional Tether continuity add-on | Direct iPhone SMS/iMessage mirroring and OTP handoff to a Linux browser; does not require a Mac relay. | Removable ARM64 package installer and opt-in Brave native-host helper; keep out of the base image pending iPhone/Brave qualification. | Upstream v0.2.38 is MIT and checksum-pinned (latest release as of 2026-10-18). Current BlueZ 5.85 is below the upstream 5.86 minimum for Messages; see `mseries/TETHER-CONTINUITY.md`. | | `omarchy-mac-boot/files/etc/mkinitcpio.conf.d/92-omarchy-mac-hid.conf` | Load Apple input and dock drivers early in an Arch initramfs. | The image overlay uses initramfs-tools and carries its own Apple HID module list. | Present in source; factory-image path not verified. | | AVD dependencies documented by the package README and Omarchy runtime | Provide Apple video-decode firmware and the VA-API bridge. | Needs an Ubuntu kernel with AVD support, firmware provisioning, and userspace bridge. | VA-API bridge build integration is present at c653eaa; factory build, kernel/firmware provisioning and codec/client qualification remain open. | | `omarchy-mac/bin/omarchy-battery-charge-limit` | Configure a persistent Apple SMC charge threshold. | No equivalent M-Series settings interface is currently documented. | Candidate enhancement; first confirm supported sysfs controls on this host. | +| `omarchy-mac-boot` `92-omarchy-mac-pmp.conf`, `92-omarchy-mac-kbd-backlight.conf` and `90-omarchy-mac-kbd-backlight.rules` (7ae91471, a0fa1a8b) | Early-load `apple_pmp` and `pwm-apple` when they are modules and light the keyboard at the passphrase prompt. | **PORTED** (2026-10-31) into the transform's mkinitcpio block `mseries/boot/initramfs-hardware.snippet` plus `mseries/boot/90-elementary-mac-kbd-backlight.rules`, installed by `elementary-mac-setup`. Factory image (initramfs-tools) not covered. | Matters on kernels that build them as modules (linux-aurora 7.2.11); fairydust builds both in. Not verified on hardware. | | `omarchy-mac-boot` lifecycle hooks, vendor firmware and Limine/U-Boot support | Maintain the Arch boot chain and encrypted-install lifecycle. | elementary's mkosi, initramfs-tools and GRUB/Asahi path have different contracts. | Do not copy; translate only independently verified behavior. | | USB4 suspend behavior in the current Fairydust kernel | ACIO refuses suspend while a USB4 dock link is active. | A future kernel handshake or docked-lid policy is needed. | Known issue: system remains awake with its display off. | | Historical `omarchy-mac` quattro ambient keyboard automation | Adjust keyboard LEDs from the AOP illuminance sensor and pause for manual changes. | `mseries/keyboard-backlight/backlight.py` uses the ALS sensor and UPower in Pantheon. | Implemented; measured on the M1 Pro at 141 lx. Lock/lid and suspend qualification remains. | diff --git a/mseries/boot/90-elementary-mac-kbd-backlight.rules b/mseries/boot/90-elementary-mac-kbd-backlight.rules new file mode 100644 index 000000000..b99965e12 --- /dev/null +++ b/mseries/boot/90-elementary-mac-kbd-backlight.rules @@ -0,0 +1,5 @@ +# leds_pwm registers the keyboard backlight off. Turn it on at half so the disk +# passphrase can be typed in the dark; systemd-backlight restores the saved level +# once the root is unlocked, and a backlight already on is left alone. +# From omarchy-mac-pkgs a0fa1a8b (MIT); bundled into the initramfs by initramfs-hardware.snippet. +ACTION=="add", SUBSYSTEM=="leds", KERNEL=="kbd_backlight", DRIVERS=="leds_pwm", ATTR{brightness}=="0", ATTR{brightness}="128" diff --git a/mseries/boot/initramfs-hardware.snippet b/mseries/boot/initramfs-hardware.snippet index 7edd2d293..49d3db496 100644 --- a/mseries/boot/initramfs-hardware.snippet +++ b/mseries/boot/initramfs-hardware.snippet @@ -8,11 +8,21 @@ # reshuffles input minors while logind and the compositor start, and on unlucky # boots the trackpad is dead for the whole session. Loading the drivers from the # initramfs removes the churn (ported from omarchy-mac fix-asahi-hid-race.sh). +# apple_pmp: with the power management coprocessor's driver left on the encrypted +# root, boot waits out "PMP driver did not bind within 20000 ms" before the +# passphrase prompt (omarchy-mac-pkgs 7ae91471, MIT). +# pwm_apple: leds_pwm drives the keyboard backlight through it; left on the root, +# the passphrase is typed in the dark (omarchy-mac-pkgs a0fa1a8b, MIT). The udev +# rule below then turns the backlight on as it appears. +# linux-aurora 7.2.11 builds both as modules; kernels with them built in skip them. # mkinitcpio fails the whole image over a MODULES entry it cannot find, so each # is named only on kernels that build it as a module. -for _elementary_mod in mux_apple_display_crossbar hid_apple hid_magicmouse; do +for _elementary_mod in mux_apple_display_crossbar hid_apple hid_magicmouse apple_pmp pwm_apple; do if modinfo -k "${KERNELVERSION:-$(uname -r)}" "$_elementary_mod" >/dev/null 2>&1; then MODULES+=("$_elementary_mod") fi done unset _elementary_mod +if [[ -f /etc/udev/rules.d/90-elementary-mac-kbd-backlight.rules ]]; then + FILES+=(/etc/udev/rules.d/90-elementary-mac-kbd-backlight.rules) +fi diff --git a/mseries/test-elementary-mac-setup.sh b/mseries/test-elementary-mac-setup.sh index aa64fda2a..946a34c93 100755 --- a/mseries/test-elementary-mac-setup.sh +++ b/mseries/test-elementary-mac-setup.sh @@ -61,6 +61,17 @@ eq "base udev asahi autodetect modconf block encrypt filesystems fsck" \ "$(bash -c 'source "$1"; echo "${HOOKS[*]}"' _ "$mk")" "hooks after remove" unlink "$mk" +# initramfs-hardware: each driver is early-loaded only where modinfo names it, so a +# kernel lacking one (or the PMP and keyboard-PWM drivers) never fails mkinitcpio. +hw=$(dirname -- "${BASH_SOURCE[0]}")/boot/initramfs-hardware.snippet +eq "mux_apple_display_crossbar hid_apple hid_magicmouse apple_pmp pwm_apple" \ + "$(bash -c 'modinfo() { return 0; }; MODULES=(); source "$1"; echo "${MODULES[*]}"' _ "$hw")" "hardware modules" +eq "hid_apple apple_pmp" \ + "$(bash -c 'modinfo() { [[ $3 == hid_apple || $3 == apple_pmp ]]; }; MODULES=(); source "$1"; echo "${MODULES[*]}"' _ "$hw")" \ + "hardware modules the kernel lacks are skipped" +ok grep -q 'KERNEL=="kbd_backlight", DRIVERS=="leds_pwm", ATTR{brightness}=="0", ATTR{brightness}="128"' \ + "$(dirname -- "${BASH_SOURCE[0]}")/boot/90-elementary-mac-kbd-backlight.rules" + # enhance.sh writes the whole enhancement layer into a root without needing a session. here=$(dirname -- "${BASH_SOURCE[0]}") root=$(mktemp -d)