Skip to content

linux-aurora: ship the Mesa calibration extractor with the kernel - #1293

Merged
maralcbr merged 1 commit into
omacom:masterfrom
scottjones:linux-aurora/mesa-calibration-tool
Oct 20, 2026
Merged

maralcbr merged 1 commit into
omacom:masterfrom
scottjones:linux-aurora/mesa-calibration-tool

Conversation

@scottjones

@scottjones scottjones commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Touch ID needs each Mac's Mesa calibration in /usr/lib/firmware/apple/ before the SEP driver can bring the sensor up. The extractor that carves it out of the iBoot System Container lives in the kernel tree (tools/aurora-sep/extract-mesa-calibration.py). Today only the release's aurora-touchid package ships it, so edge Macs have no supported way to get the file.

This installs it from the pinned kernel source as /usr/lib/linux-aurora/extract-mesa-calibration, so omarchy-mac can run it from a oneshot without carrying its own copy. That path doesn't collide with aurora-touchid's copy, so both packages can be installed together. Nothing runs it yet: the oneshot, and choosing the firmware name (e.g. apple/mesacal-<board>.bin on M1 Pro/Max), stay in omarchy-mac. python is an optional dependency, because the kernel itself doesn't need it.

check() now runs the extractor's own unit tests (35, offline, synthetic fixtures). pkgrel goes to 2 (7.2.10.aurora1-1 was published from #1301) so edge picks up the new file. The pin, config and kernel code are unchanged, but this is still a full kernel rebuild: uname -r moves from 7.2.10-1-1-ARCH to 7.2.10-1-2-ARCH, so edge Macs get a kernel update and a reboot for one added file. If that's not worth it on its own, it can ride along with the next pin bump instead.

The release recipe also builds linux-aurora and doesn't ship this file, so callers should check for the extractor at this path, not for the package. They can fall back to aurora-touchid's copy.

Tested: tests/aurora-edge/metadata.py passes, with a new check on the install line and path. The recipe's install line and check(), run against the files at the pinned commit 1b4997bb, pass 35/35. The installed copy is byte-identical to aurora-touchid's, runs --help, extracts a synthetic calibration with mode 600, and exits 1 on missing input. I didn't do a full kernel build.

cc @iconidentify @DjDeveloperr: DJ wrote the extractor and Chris maintains it, so I'd like one of you to look this over.

🤖 Generated with Claude Code

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Install tools/aurora-sep/extract-mesa-calibration.py from the pinned
kernel tree as /usr/lib/linux-aurora/extract-mesa-calibration, so the
platform package can produce Touch ID's per-device Mesa calibration
without carrying its own copy. The path stays clear of aurora-touchid's,
so both can be installed together.

check() runs the extractor's own unit tests. python is an optional
dependency, needed only for the extractor. pkgrel moves to 2: the pin,
config and kernel code are unchanged, but this is a kernel rebuild.

Co-authored-by: DjDeveloperr <hey@djdev.me>
Co-authored-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones
scottjones force-pushed the linux-aurora/mesa-calibration-tool branch from e0701c2 to 6826c03 Compare October 20, 2026 02:06

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 6826c032 (pin 1b4997bb). Looks right.

  • At the pin, tools/aurora-sep/extract-mesa-calibration.py and tools/aurora-sep/aurora-touchid/extract-mesa-calibration are the same blob (f7feef24), so the installed copy is byte-identical to aurora-touchid's, as the description says.
  • check() works under python -I: the test loads the script through importlib from Path(__file__).resolve().parents[1], so it doesn't depend on sys.path. python is already in makedepends.
  • _package_kernel runs from $srcdir/linux (_package does cd $_srcname), so the relative install path resolves. /usr/lib/linux-aurora/ doesn't collide with aurora-touchid.
  • The script only needs the standard library, so an optional python dependency is the right call.
  • pkgrel=2 on top of the published 7.2.10.aurora1-1 from #1301 is correct.

Touch ID on Omarchy still needs two more pieces after this

This PR ships the extractor, but nothing runs it yet. Touch ID on edge Macs needs all of the following, and only the first is here:

  1. The calibration firmware: this extractor, plus the omarchy-mac oneshot that writes apple/mesacal-<board>.bin.
  2. fprintd's device sandbox: Arch's fprintd.service only allows usb/spi/hidraw/cros_fp, and /dev/sep-bio is a misc device, so fprintd can't open it. The kernel's own tools/aurora-sep/aurora-touchid/fprintd-aurora.conf already handles this. It uses DeviceAllow=char-misc rw rather than the node path, because a path rule is resolved when the cgroup is set up and is dropped if /dev/sep-bio doesn't exist yet. It also uses an ExecStartPre that waits up to 15 s for the node to appear. Neither is shipped on Omarchy edge today. The drop-in from #1332 only adds char-input r, and my earlier suggestion there of DeviceAllow=/dev/sep-bio rw would hit exactly that problem. char-misc plus the wait is the better fix.
  3. The SEP driver: since #1301, apple-sep is a module. It autoloads from the device tree, but the node appears a few seconds after the enclave comes up, which is why the wait in (2) matters.

So edge users get no Touch ID benefit until (1) and (2) land, and this PR alone costs a kernel update and reboot. That's fine for edge, and merging it now means the oneshot can rely on the path.

Merge path: it changes an existing file under tests/, so the auto-merge bot won't arm it. I'll merge it once the full build is green.

@maralcbr
maralcbr merged commit 499bfdf into omacom:master Oct 20, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: linux-aurora (aarch64, PR artifact)

  • edge/aarch64: linux-aurora-7.2.10.aurora1-2-aarch64, linux-aurora-headers-7.2.10.aurora1-2-aarch64

Commit 499bfdf · run

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