Repository navigation
Add omarchy-ane-dkms, the Apple Neural Engine driver - #745
Conversation
The package builds ane.ko and ane_t6021.ko with DKMS from a joshuaswarren/omarchy-ane release. It installs the device-tree overlays, the readiness check, the M2 opt-in tools and their pacman hooks. aarch64 and edge only. ane_t6021 stays blocked by /etc/modprobe.d/ane_t6021.conf until the user opts in. Removal takes out the firmware and the opt-in line that omarchy-ane-m2-enable wrote. The watch follows published GitHub releases after 24 hours, on the reviewed lane.
omarchy-ane removed omarchy-ane-m2-enable and the modprobe gate packaging/modprobe/ane_t6021.conf, and added 90-omarchy-ane-firmware.hook, which fetches the T6021 firmware after each install and upgrade (omarchy-ane receipts/2026-10-01-t6021-default-on). - package(): install the firmware hook; drop omarchy-ane-m2-enable, the gate file and its backup=() entry. On upgrade pacman deletes an unchanged gate file; a changed one becomes ane_t6021.conf.pacsave, which modprobe does not read (it reads only *.conf). - post_remove: remove both firmware files that omarchy-ane-firmware-fetch writes (T602x and T8112). Drop the ane-t6021 opt-in edit: no overlay reads that key now. - The overlay comment names /usr/share/omarchy-platform/dtb-overlays.
omarchy-ane-smoke (joshuaswarren/omarchy-ane#50) runs the add program 20 times on the ANE and checks each output against the exact fp16 sum. It runs omarchy-ane-run from its own directory with the program in /usr/share/omarchy-ane/fixtures. - build(): make tools/ane-run. It links libane statically and needs only libc and libm at run time. libdrm is a makedepend for drm.h. - check(): add tools/test_ane_smoke.py (stub runner, fake root, no device). - package(): install omarchy-ane-smoke, tools/ane-run as omarchy-ane-run, and fixtures/h14-anec/add/program-0.anec.
The source is the published v0.4.0 release of joshuaswarren/omarchy-ane (commit 16d13ef). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.0.tar.gz.
|
The recipe now packages omarchy-ane v0.4.0 (
Verification, on a host without makepkg: |
The source is the published v0.4.1 release of joshuaswarren/omarchy-ane (commit 4f01bb3). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.1.tar.gz. - prepare(): both modules now compile ane/ane_stats_show.c and include ane/include/, so the DKMS tree copies them. Without them the DKMS build fails on the missing ane_stats.h. - package(): install tools/omarchy-ane-probe and the H13 add program that omarchy-ane-smoke runs on the M1 family. packaging/build-dtbo also installs the twelve data/ane-soc tables to /usr/share/omarchy-ane/soc and installs none of the data-only overlays. - check(): add test_ane_probe, test_validate_ane_soc and test_promotion_check. test_promote_chip and test_promote_from_verdict need a git checkout and stay out.
|
The recipe now packages omarchy-ane v0.4.1 (
Verification, on a host without makepkg, on the downloaded archive: |
|
Started CI ( Merge order: this lands after #677 is merged in omarchy-mac and the omarchy-mac-boot bump that carries it is published. Any DKMS module on today's omarchy-mac-boot makes the Please add a guard that refuses an older omarchy-mac-boot but still allows none (Arch Linux ARM): for example a |
The source is the published v0.4.2 release of joshuaswarren/omarchy-ane (commit 545d059). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.2.tar.gz. No other recipe line changes: the DKMS build files, the packaged files and the check() tests are those of 0.4.1. dkms.conf now sets BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE", so DKMS skips a kernel that ships its own ANE driver and builds on every other kernel.
|
0.4.2 is green on aarch64: all seven Still open from my earlier comment:
Merge order is unchanged: after #677 (the disabled-node fix) and the omarchy-mac-boot bump that publishes it. |
|
The recipe now packages omarchy-ane v0.4.2 (
Checks
M1 makepkg and
|
| omarchy-mac-boot | Result |
|---|---|
| not installed | installs |
1.9-1, --noconfirm |
refused: unresolvable package conflicts detected; 1.9-1 stays |
| 2.0-1 or 2.1-1 | installs |
| 1.9-1, upgraded to 2.0-1 in the same transaction | installs |
| 1.9-1, empty answer to the prompt | refused |
An answer of y to the prompt removes omarchy-mac-boot.
So I propose conflicts=('omarchy-mac-boot<VERSION') in place of a scriptlet check. Please post VERSION; the line follows in a separate commit.
|
Thanks, the logs settle it, and the You're right about the scriptlet: pacman ignores the VERSION will be the pkgver of the omarchy-mac-boot bump that pins #677 with the disabled-node fix. I'll post it here once that bump is published. |
dkms.conf sets BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE", so on a kernel that ships the in-tree driver "dkms build" exits 77 and builds nothing. check() treated that as a failure, and makepkg stopped in check(). check() now takes exit 77 as "no DKMS build" when the kernel's config sets CONFIG_DRM_ACCEL_ANE, and prints it. After a build it lists ane.ko and ane_t6021.ko from the DKMS tree. Every other dkms exit status still fails check().
|
Cause
Fix
RunsReal
CI on Not run: a makepkg on a real in-tree-driver kernel. At install time, the Arch dkms hook ( |
The source is the published v0.4.3 release of joshuaswarren/omarchy-ane (commit 0477f72). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.3.tar.gz. No other recipe line changes: the DKMS build files and the 58 packaged paths are those of 0.4.2. In 0.4.3 the T6000 and T6020 overlays are enabled, and the firmware hook also fetches on T6020.
|
0.4.3 checksum matches the published release. Unlike 0.4.2, this one is a policy change, so I'd like to hold the T6000/T6020 flip out of this first edge package:
Options: package 0.4.2 here and flip T6000/T6020 in a later bump once each has a passing DKMS row from this package, or keep 0.4.3 with those two overlays opt-in via the recipe. On T6000 I can help: our lab M1 Pro (MacBookPro18,3) can run the gate once the #677 boot bump is out. Also: libane's ANEC load changed to the direct path by default. The CHANGELOG says "Not merged before hardware" with the A/B still pending, but it's in the tag and |
|
The recipe now packages omarchy-ane v0.4.3 (
What changes in the package
Checks
Not run for 0.4.3: makepkg and |
0.4.3 turns T6000 and T6020 on by default. Each flip rests on one community row from a kernel with the in-tree ANE driver, not from this package, so this first edge package keeps them opt-in and stays at 0.4.2. The check() change for kernels with the in-tree driver stays. pkgver and sha256sums are those of 7980d7b.
|
0.4.2 again in
omarchy-ane will cut a cleanup release, 0.4.4, with these fixes and a T8103 smoke on the new libane. The recipe moves to it after that. Thanks for the M1 Pro offer. A T6000 run of this package there, after the #677 bump, would be that chip's first DKMS row. CI on |
The source is the published v0.4.4 release of joshuaswarren/omarchy-ane (commit df902f5). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.4.tar.gz. 0.4.4 is a cleanup release of 0.4.3: no driver, libane or dkms.conf change, and the same 58 packaged paths. It keeps T6000 and T6020 on by default. The check() change for kernels with the in-tree driver stays.
|
0.4.4's checksum matches the release, and the cleanup is good (CHANGELOG section, no That's the case we agreed to keep out of this first edge package ("T6000 and T6020 stay opt-in"). Either:
Once a T6000 DKMS row exists (our M1 Pro, after the #677 bump), a follow-up bump can flip T6000. |
0.4.4 keeps T6000 and T6020 on by default. Both flips rest on community rows from kernels with the in-tree ANE driver, and this first edge package keeps those two chips opt-in, so the recipe stays at 0.4.2 until a row from this package exists on each. The recipe directory is the same as at 48018d1.
|
Back to 0.4.2 in You are right: we agreed that T6000 and T6020 stay opt-in in this package, and 0.4.4 still turns both on. Thanks for confirming the 0.4.4 cleanup (CHANGELOG section, no
|
|
omacom/omarchy-mac#677 is merged (a76179cd). The omarchy-mac-boot bump that pins it is in progress; I'll post the published VERSION here for your |
|
The overlay paths changed when #677 moved to the new Mac packages repo. omarchy-mac-boot is now built from omacom/omarchy-mac-pkgs, and its port of #677 merged there as
Also new: if the admin sets So 0.4.2 as packaged would install its overlays where nothing reads them. Needed: The boot package carrying this layout ships through #789 as omarchy-mac-boot |
The source is the published v0.4.5 release of joshuaswarren/omarchy-ane
(commit d882f48). sha256sums is the checksum of the GitHub archive
archive/refs/tags/v0.4.5.tar.gz.
0.4.5 moves the overlays to /usr/lib/omarchy-mac-boot/dtb-overlays and the
opt-in file to /etc/omarchy-mac-boot/dtb-overlays.opt-in, the layout of
omarchy-mac-boot 20261004-2 (omacom/omarchy-mac-pkgs 2a3ed89).
- conflicts=('omarchy-mac-boot<20261004-2'): an older omarchy-mac-boot does
not read the new overlay directory, and its boot check fails on a DKMS
module. A system without omarchy-mac-boot is not affected.
- prepare() keeps T6000 and T6020 opt-in with the release's own
tools/promote_chip.py, until a row from this package passes on each.
- check() asserts that both stay opt-in: the overlay key, DEFAULT_ON of the
firmware hook, and the UNTESTED line of omarchy-ane-check.
|
The recipe now packages omarchy-ane v0.4.5 ( Your list against 0.4.5:
T6000 and T6020: one release line. 0.4.5 turns both on, so Checks:
The opt-in file is not migrated, by design: lines in the retired |
|
Reviewed 0.4.5: I verified the paths, the T6000/T6020 opt-in flip (I ran your prepare() step on the release tarball, no git needed) and the green CI, and the DKMS sources equal 0.4.2's. Looks good. I'll merge once omarchy-mac-boot 20261004-2 is on edge (omarchy-pkgs#789). Before that, every Mac would get the conflict prompt, and a 'y' there removes the boot package. |
maralcbr
left a comment
There was a problem hiding this comment.
omarchy-mac-boot 20261004-2 (overlay layout, depmod-map boot check) is live on edge. 0.4.5 matches it, keeps T6000/T6020 opt-in, CI green, M1 install evidence on the same module sources; second review agrees. Merging.
Pulls omarchy-mlx, omarchy-mlx-vulkan, omarchy-ane-dkms and mil-hwx-compiler: MLX on the GPU and Core ML models on the Neural Engine. Opt-in only; installs through the Install > AI row. Depends on #745 (omarchy-ane-dkms) and #764 (omarchy-mlx) publishing first: CI resolves each package against published edge.
|
First T6000 run of this package: PASS on our lab MacBook Pro 14" M1 Pro (MacBookPro18,3, Before the reboot:
After the reboot (2026-10-06 08:18 AEST):
The machine stays opted in for now. I haven't submitted a collector row ( |
|
T6000 now has a passing DKMS row from this package: |
Summary
This adds
omarchy-ane-dkms, the Apple Neural Engine (ANE) driver for Apple Silicon Macs. The source is the published v0.4.5 release of joshuaswarren/omarchy-ane (commitd882f48). The package isaarch64only, publishes toedgeonly, and carries theomarchy-platform-apple-silicongroup.When the package is installed, the ANE is on by default on the chips that ran it on real hardware: T8103 (M1), T6001 (M1 Max) and T6021 (M2 Max). The other M1 and M2 chips are opt-in and untested. omarchy-ane 0.4.5 itself turns T6000 (M1 Pro) and T6020 (M2 Pro) on, from one community row each that ran the kernel's own driver; this package keeps both opt-in (see
prepare()below) until a row from this package passes on each.Contents
/usr/src/omarchy-ane-$pkgver:dkms.conf(with@PKGVER@replaced),ane/Makefile,ane/ane_stats_show.c,ane/include/,ane/src/,ane/t6021/. DKMS buildsane.ko(M1 family) andane_t6021.ko(M2 family) for each kernel that has headers. Both modules report the package version. Both give the busy time and the job count in sysfs (ane_stats) and the last 256 submissions in debugfs (ane_timeline); the module parameterstats=0turns both off.dkms.confsetsBUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE": DKMS skips a kernel that ships its own ANE driver (exit 77) and builds on every other kernel./usr/bin:omarchy-ane-check,omarchy-ane-dt,omarchy-ane-firmware-fetch,omarchy-ane-smoke,omarchy-ane-run,omarchy-ane-probe.omarchy-ane-smokeruns an add program 20 times throughomarchy-ane-runand checks each output bit for bit. The M1 family (T8103, T6000, T6001, T6002) runs/usr/share/omarchy-ane/fixtures/h13-anec/add/program-0.anec; the M2 family (T6020, T6021, T6022, T8112) runs/usr/share/omarchy-ane/fixtures/h14-anec/add/program-0.anec. It prints one JSON line. Exit 0: 20 of 20 bit-exact. Exit 1: a call failed or was not exact. Exit 2: no smoke on this Mac.build()makesomarchy-ane-run(tools/ane-run) with libane linked statically. At run time it needs only libc and libm.omarchy-ane-probeprints a read-only JSON report of the ANE state, with no root and no network. It compares the device tree with the chip's table in/usr/share/omarchy-ane/soc./usr/share/omarchy-ane/soc/SOC.json: cited ANE data for twelve chips after the M2 that no driver binds (T8122, T6030, T6031, T6034, T8132, T6040, T6041, T8140, T8142, T6050, T8150, T8152).packaging/build-dtboinstalls them. It compiles the eight data-only overlays as a check and installs none of them./usr/lib/omarchy-mac-boot/dtb-overlays/PREFIX/omarchy-NAME.dtbo, frompackaging/build-dtbo. omarchy-mac-boot 20261004-2 (omacom/omarchy-mac-pkgs2a3ed89) ships this directory and applies the overlays in it when it builds m1n1 stage 2. Without omarchy-mac-boot (Arch Linux ARM), this package creates the directory, andomarchy-ane-dtapplies the overlays from the pacman hooks.t8103,t6001,t6021./etc/omarchy-mac-boot/dtb-overlays.opt-in):t6000(ane-t6000),t6002(ane-t6002),t6020(ane-t6020),t6022(ane-t6022),t8112(ane-t8112), and the T6021 U-Boot input overlay (uboot-serial-stdin-t6021).omarchy-ane-checkprintsUNTESTED SoCon these chips. Lines in the retired/etc/omarchy-platform/dtb-overlays.opt-inhave no effect; the owner moves them./usr/lib/omarchy-ane/update-m1n1-dtbsand the pacman hooks90-omarchy-ane-dt.hookand90-omarchy-ane-dt-remove.hook. The second Target of90-omarchy-ane-dt.hookisusr/lib/omarchy-mac-boot/dtb-overlays/*/*.dtbo, the Target of omarchy-mac-boot's95-omarchy-mac-dtb-overlays.hook.90-omarchy-ane-firmware.hook: after each install and upgrade it runsomarchy-ane-firmware-fetch --hook. The package cannot ship Apple firmware, and Linux must start the T6021 ANE firmware. The hook fetches the pinned image from the macOS 13.5 IPSW on T6021 only. When the pinned file is there, it downloads nothing. When the fetch fails, it prints a note and exits 0. The ANE then stays off untilsudo omarchy-ane-firmware-fetchsucceeds and the Mac reboots. M1 chips need no fetch: iBoot loads their firmware.conflicts=('omarchy-mac-boot<20261004-2'): an older omarchy-mac-boot does not read/usr/lib/omarchy-mac-boot/dtb-overlays, and its boot check fails on a DKMS module. pacman refuses this package next to it; with--noconfirmand on an empty answer the default is No. A system without omarchy-mac-boot is not affected.depends=(dkms 'dtc>=1:1.7.1' python). dtc 1.7.1 is the first release that keeps a labelled node's phandle when it applies an overlay. Arch's dtc has epoch 1, so the bound carries it.makedepends=(dtc libdrm): libane includesdrm.hfrom libdrm.optdepends:linux-aurora-headers,linux-asahi-headers.provides=(omarchy-ane-abi=1):ANE_ABI_MAJORofane.ko. The ioctl interface does not change in 0.4.5.prepare()runs the release's owntools/promote_chip.py --chip t6000 --to opt-in --applyand the same fort6020. That sets both rows ofpackaging/dt/overlaysto opt-in, puts theomarchy,opt-inkey back in both overlays, lists both chips as untested inomarchy-ane-check, and leavesDEFAULT_ONof the firmware hook atapple,t6021.check()runs the seven tool tests, then asserts that T6000 and T6020 stay opt-in: the builtt6000andt6020overlays carryane-t6000andane-t6020,DEFAULT_ONdoes not nameapple,t6020, andomarchy-ane-checkprintsUNTESTED SoCon both chips. Then it runsdkms buildin a private DKMS tree. After a build it listsane.koandane_t6021.ko. On a kernel withCONFIG_DRM_ACCEL_ANE(the in-tree driver), dkms exits 77 and builds nothing;check()prints that and passes. Any other dkms failure failscheck().post_removedeletes the firmware files thatomarchy-ane-firmware-fetchwrote (T602x and T8112). pacman does not own them. The remove hook takes out the update-m1n1 line and the overlaid device-tree copies.Tested chips
From the v0.4.2 release notes. Each on-by-default chip is tested on one machine. These gates built the modules from source (
13c684aon T8103 and T6001,5a457a3on T6021). The module sources have not changed since: the DKMS build of v0.4.5 gives the same srcversions (B4AE691E569A2BBD37E18E3,59494CBC56F28ED8D1122C6). libane changed in 0.4.3 (#111: an M1-family program loads straight into the buffer object); the v0.4.4 release notes give its T8103 and T6001 runs. No hardware ran 0.4.5, which moves paths only.uboot-serial-stdin-t6021overlay.The package on an M1
One M1 laptop (T8103, kernel
7.1.12-2-7-ARCH, an omarchy-mac-boot with the #677 overlay hook), from the PR branch:makepkg -s --noconfirm -fwithcheck(), thenpacman -Uover 0.4.0-1.7980d7b): makepkg exit 0: 7check()tests ok,dkms builddone.pacman -Uexit 0: DKMS removed 0.4.0 and installed 0.4.2; the UKI and m1n1 were rebuilt.ane0.4.2, srcversionB4AE691E569A2BBD37E18E3.omarchy-ane-check --smoke: 20/20 bit-exact, ready.80d5711): makepkg exit 0,pacman -Uexit 0, the same steps.The log lines are in the PR comments. No M1 Max or M2 Max has run the package.
Merge order
This PR waits until omarchy-mac-boot 20261004-2 (omarchy-pkgs #789, the port of omacom/omarchy-mac#677 in omacom/omarchy-mac-pkgs
2a3ed89) is published: on an older omarchy-mac-boot, a DKMS module fails theomarchy updateboot check.conflicts=('omarchy-mac-boot<20261004-2')refuses an older omarchy-mac-boot and allows a system without one (Arch Linux ARM).Upgrade from the 0.3.0 recipe
The 0.3.0 recipe had
omarchy-ane-m2-enableand the gate/etc/modprobe.d/ane_t6021.confinbackup=(). On upgrade, pacman deletes an unchanged gate file. A changed gate file becomesane_t6021.conf.pacsave, and modprobe reads only*.conffiles. A lineane-t6021in the opt-in file has no effect now.Upstream watch
github: joshuaswarren/omarchy-ane, patternv<version>,min_release_age: 24h. Noauto_merge, so every bump is a reviewed PR. A release that changes the DKMS source list or the packaged files needs more than apkgverandsha256sumsbump (0.4.1 did). Since 0.4.3, omarchy-ane turns T6000 and T6020 on by default on one in-tree-driver row each; theprepare()flip keeps both opt-in here until a row from this package exists on each chip or the maintainer accepts the in-tree rows. Then the twopromote_chip.pylines and theircheck()assertions go.Source
The v0.4.5 release is published (not a draft or a prerelease).
sha256sumsis the checksum of the downloaded GitHub archivearchive/refs/tags/v0.4.5.tar.gz:f19216e36e552b15c856a1d26b91f296fdebbf9d4322b0e29deadb6dd4029f3b(two equal downloads). The archive's tree equalsgit archive d882f48.Verification
76e9aea: build, aarch64: success. makepkg 0.4.5-1 withlinux-aurora-headers 7.1.12.aurora2-11and dkms 3.4.3-2: bothpromote_chip.pylines ran, the sevencheck()tests ok,check: T6000 and T6020 are opt-in,Building module(s).... done.,ane.koandane_t6021.kolisted;build-dtbo: t6000 (opt-in)andt6020 (opt-in)under/usr/lib/omarchy-mac-boot/dtb-overlays/.makepkg -A -d -f -Cwith dkms 3.4.3-2 in an Arch Linux x86_64 chroot, on the v0.4.5 archive, with theprepare()andcheck()above; bothpromote_chip.pylines ran andcheck()printedcheck: T6000 and T6020 are opt-in. The DKMS step is cross-compiled for arm64 against a module tree from the linux-aurora 7.1.12.aurora2-11 source and config. Option unset: exit 0,ane.koandane_t6021.koversion 0.4.5.CONFIG_DRM_ACCEL_ANE=yor=m: exit 0,check()prints that no DKMS build ran. A kernel whose module build fails: exit 4 incheck().prepare()flip,check()fails (the firmware hook still fetches on T6020), and by hand on that tree thet6000/t6020overlays have noomarchy,opt-inkey andomarchy-ane-checkprints noUNTESTEDline for them..dtbomatch the Targets of both hooks; nothing is under an omarchy-platform directory. No data-only overlay is installed.lib/dtb-overlays.sh(omarchy-mac-pkgs2a3ed89), with a fake root that holds only this package's overlay directory, on linux-aurora 7.1.12 stock board device trees: with no opt-in file, the ANE node goes into t8103-j293, t6001-j316c and t6021-j414c only. Withane-t6000andane-t6020in/etc/omarchy-mac-boot/dtb-overlays.opt-in, t6000-j314s and t6020-j414s get it too. The same lines in the retired/etc/omarchy-platform/dtb-overlays.opt-inchange nothing.are in conflict (omarchy-mac-boot<20261004-2)); 20261004-2, it installs.Build approval
CI runs with the
build-approvedlabel.