Repository navigation
Install the pre-T2 FaceTime HD camera driver and firmware - #11381
rand0mdud3 wants to merge 6 commits into
Conversation
6616a21 to
24760fc
Compare
|
Reviewed at 24760fc against What was checked. I tested on a disposable Omarchy VM running 7.2.5-3-omarchy. It has no 1570 camera, so
Why this needs a decision rather than a patch. Every other DKMS hardware driver in Smaller, same leaf: The camera itself was not reproduced here. Your report on a MacBookPro11,5 is the only hardware evidence. The PR body names migration Second opinion: none ran. The configured reviewer (Codex Medium) answered a ping, but today's review budget was spent, so this review is one model's (Claude Opus 5.5). Next: this waits on the maintainer to choose how the facetimehd packages should be shipped. |
The migration runs as the user, so a bare modprobe can never succeed and the "takes effect after reboot" warning prints every time. Follow fix-spi-keyboard.sh and sudo the load; the -qn probe stays bare (works unprivileged). Test asserts the sudo line.
|
Good catches, all three addressed or answered:
|
[Medium impact] The changes affect camera and hibernation behavior on Macs with one specific camera. The PR still needs a working package-install path for fresh installs before merging. FindingsSummaryAdds FaceTime HD camera support for matching pre-T2 Macs through hardware setup and a migration.
Reviews (4) · Last reviewed commit: "Clear the facetimehd marker at the start..." · Reviewed by Greptile |
| omarchy-pkg-aur-add facetimehd-firmware facetimehd-dkms-git || | ||
| echo "Warning: could not install the FaceTime HD camera packages" >&2 |
There was a problem hiding this comment.
Fresh installs miss camera support
omarchy-apply-hardware runs this script as root, but omarchy-pkg-aur-add calls yay without switching users. Building these AUR packages fails because makepkg refuses to run as root. Neither package is in the ISO package lists, so offline installs cannot supply them either.
Setup warns and finishes without camera support. First-user setup then marks the migration complete, so it will not automatically retry. Ship the packages through the ISO package source and install them with omarchy-pkg-add; keep AUR builds in a non-root, online path.
Knowledge Base Used:
| cat >"$stub_bin/modprobe" <<'SH' | ||
| #!/bin/bash | ||
|
|
||
| printf 'modprobe' >>"$TEST_LOG" | ||
| printf '\t%s' "$@" >>"$TEST_LOG" | ||
| printf '\n' >>"$TEST_LOG" | ||
| (( ${MODPROBE_FAIL:-0} == 0 )) | ||
| SH |
There was a problem hiding this comment.
Camera failures lack test coverage
No test sets MODPROBE_FAIL, so neither a missing module nor a failed live load is checked. The failed-package case also does not assert the warning it claims to test. These tests can stay green if the quiet probe or nonfatal warning behavior breaks.
Give the modprobe stub separate results for the probe and load. Check that a failed probe skips loading and that a failed load warns without returning an error. Capture and assert the package warning too.
|
Re-reviewed at 4bdee1e against What was checked. On a disposable Omarchy VM running 7.2.5-3-omarchy, with
New: a failed install in the migration is never retried. The camera itself was not reproduced here. Your MacBookPro11,5 test, run at the earlier head, is still the only hardware evidence. Second opinion: Codex Medium reviewed the new commit and the full diff. It agreed that the Next: this waits on the maintainer to decide how the facetimehd packages should ship. That decision also settles the migration retry. |
|
Thanks for working on this! One important compatibility finding for this driver: To avoid breaking hibernation for pre-T2 users who install this driver, could we bundle a system-sleep hook alongside it in Installing an executable hook ( #!/bin/sh
case "$1" in
pre)
modprobe -r facetimehd 2>/dev/null || true
;;
post)
modprobe facetimehd 2>/dev/null || true
;;
esacTested and verified on a MacBookAir7,2 with the |
|
A caveat this installer would introduce, worth deciding before merge. On a MacBookPro11,5 with If that holds up, this PR hands pre-T2 users a camera and takes away hibernation on the same machines, so the install leaf should probably ship that sleep hook alongside the module, or the migration should, and the PR body should say so. Happy to implement it here — a |
The driver's PCI suspend runs inside the kernel's device-freeze and the machine deadlocks at "PM: hibernation: hibernation entry", before the image is written, so installing the camera took hibernation away from the pre-T2 Macs that have it. A system-sleep hook unloads the module for hibernate and loads it again after resume. S3 is unaffected and the hook leaves it alone. The leaf installs the hook next to the packages; failing to do so warns, the same as the package install, so an optional camera never halts hardware setup.
|
Implemented the hook in
Not verified: the hang itself, and whether the hook clears it. This unit's hibernation is also not set up ( One thing worth a second pair of eyes before merge: |
|
Additional hardware validation: MacBook8,1 (Early 2015), Omarchy edge, kernel
The installed driver was built from a pinned external source in my integration PoC, rather than directly through the packaging path proposed by this PR, so this result does not validate the PR's AUR/package dependency resolution or its fresh-install behavior. The initial ISO was also customized. Integration PoC: https://github.com/geeknees/omarchy/tree/macbook81/poc-2026-11 |
|
Useful, and one detail is worth chasing because it may be the driver version rather than the camera. This unit exposes 1280×720 only, on the AUR packages this PR installs: Two discrete sizes only, both 1280×720 — no 848×588 entry at all. Your If that is the explanation, the Chrome/Meet workaround you built is version-specific and would not be needed after a rebuild against the AUR If the newer driver lists 1280×720 there, that also gives this PR the fresh-install/package-path validation your own note correctly says your PoC does not provide, since you would be building exactly what the leaf installs. Two things from this side that match yours: the camera is fine across S3 here too (deep cycles, reopened afterwards), and the hibernation hook added in |
The sudo stub runs its command for real, so the hook install reached /usr/lib/systemd/system-sleep on whatever machine ran the suite: as root it left a real facetimehd hook behind, and as a user it failed while the assertion, which reads only the call log, still passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aded hybrid-sleep writes the same hibernation image as hibernate, so it goes through the same device-freeze the driver hangs in, but the hook only unloaded for hibernate. And post loaded the driver after every wake, suspend included, so a driver the user had removed came back on resume. The hook now leaves a marker in /run when it unloads the module and reloads only when that marker is there, following the yoga-slim7x-lid-wake hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder via pi, thinking high <noreply@pi.dev>
A hibernate whose post never ran left the marker behind, so a later suspend reloaded a driver the user had since removed. Each pre now clears it first, so the marker only ever means this cycle unloaded the driver. The hybrid-sleep and suspend-then-hibernate cases now assert the reload as well as the unload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder via pi, thinking high <noreply@pi.dev>
|
Re-reviewed the new hibernation hook from 9051faa against What I pushed, and why
What was checked. All of this ran on a disposable Omarchy VM on 7.2.15-2-omarchy. The VM has no 14e4:1570 camera, so
Not verified. No real hibernation ran. A VM can't reproduce the hang, so nothing here shows that unloading the driver avoids it on a real Mac. @hyuricane, your MacBookAir7,2 test used a hook that unloaded on every Left for you, @rand0mdud3
Second opinion. Codex Medium and muse-wonder (via pi, thinking high) reviewed three rounds. The hybrid-sleep gap, the unconditional reload and the stale marker were their findings, not mine. I confirmed each against the real driver on the VM before fixing it. Both agreed the Next. This waits on the maintainer to decide how the facetimehd packages ship. That decision also settles whether a failed install in the migration should be retried. |
|
Re-verified
Hand-run against the real module on this 11,5, with only the marker path overridden: So the hook is hibernate/hybrid-only as intended, and S3 is untouched. Unchanged caveat: the end-to-end path still cannot be tested on this board, because no hibernation image is ever written here — that is the #17824 abort, not the camera. The hook's behaviour across the actual freeze is therefore still verified only by construction and by hyuricane's report on #11351, not by a completed cycle. |
|
Thanks for running the hook on the MacBookPro11,5 against the real module, @rand0mdud3. Your results match the VM's. This time the review also compared this PR with the other open PRs for the same camera. The one I'm recommending to the maintainer is #12067, not this one. Why. This PR is the oldest, and the oldest fix wins unless a newer one handles a case it misses. It misses fresh installs:
Publishing packages wouldn't fix either case, because this PR builds from the AUR. #12067 installs The other two PRs don't change the choice:
What this PR has that's worth keeping
What was checked. I read all four PRs against the current Second opinion. Codex Medium and muse-wonder (via pi, thinking high) each compared the four PRs. They had the diffs and the VM results, but not my conclusion. Both picked #12067 for the same reason. Both also named the live module load and the sleep hook as the parts of this PR worth keeping. Their independence from my reasoning isn't guaranteed. Both noticed the silent failed unload in the hook. The rest of the review was by Claude Opus 5.5. Next. This waits on the maintainer to choose between this PR and #12067. |
Fixes #11373.
Pre-T2 Macs' built-in FaceTime HD camera (Broadcom 1570) has no in-tree driver: the PCI function sits driverless, no /dev/video exists, and Omarchy references the stack nowhere. This adds install/hardware/apple/fix-facetimehd.sh (gated on Apple DMI + 14e4:1570), wired into all.sh, plus migration 1789743826.sh sourcing the leaf for existing installs. It installs facetimehd-firmware + facetimehd-dkms-git via omarchy-pkg-aur-add and best-effort modprobes on live sessions (PCI alias binds it at boot). Never fatal, following fix-synaptic-touchpad.sh: failed installs warn, chroot modprobe mismatches stay quiet.
Proven on MacBookPro11,5, not just mocked: Apple's firmware CDN served the download (hashes OK), DKMS built clean against 7.2.3-arch1-3, modprobe created /dev/video0 reporting 1280x720@30, and three frames captured (varied sizes, live sensor). live leaf re-run no-ops cleanly with the camera up.
Tests: test/shell.d/apple-facetimehd-test.sh 9/9 (gating incl. older Apple vendor string, non-clobber paths, failed-install warning path, migration). ./test/cli green.