Skip to content

Rebind the T1 Touch Bar's display sub-device so it doesn't stay dark - #7950

Open
csk-grit42 wants to merge 1 commit into
omacom:quattrofrom
csk-grit42:t1-touchbar-disp-bind
Open

csk-grit42 wants to merge 1 commit into
omacom:quattrofrom
csk-grit42:t1-touchbar-disp-bind

Conversation

@csk-grit42

Copy link
Copy Markdown

Why

On T1 Touch Bar MacBook Pros (MacBookPro13,2/13,3/14,2/14,3), once apple-ib-tb is loaded and the iBridge's 05AC:8600 HID interfaces are bound to apple-ibridge-hid, the driver spawns a second, virtual HID sub-device (1D6B:0301) carrying the "display on" field. The bar's icon row can already be lit at this point, but the bar itself stays completely dark until that sub-device is also explicitly bound, this time to apple-ib-touchbar. It does not reliably win its own auto-bind race, and nothing logs the failure. The whole chain re-enumerates on resume too, so this triggers off USB add rather than module add.

This is additive to #7064, which installs the driver stack and binds the two real 05AC:8600 interfaces, but does not yet rebind the virtual sub-device — a T1 Touch Bar can still ship dark even with that fix applied. This PR only adds the missing rebind; it needs a T1 Touch Bar driver already present to have anything to act on.

Diagnosed and field-verified (Part 2 of the linked recipe) on a MacBookPro14,2: csk-grit42/OmarchyOnMacBookPro14.2-2017---A1706- — HOWTO.md.

Model note: built and verified on one MacBookPro14,2 unit. T1 firmware and HID interface numbering can vary slightly by production batch/model (13,2 / 13,3 / 14,3) — the bind targets a bus-ID pattern rather than a fixed path, but if it doesn't take effect on a different T1 model, check the actual lsusb -t / /sys/bus/hid/devices/ layout before assuming the fix itself is wrong.

What

  • bin/omarchy-hw-apple-t1-touchbar-disp-bind — force-binds the 1D6B:0301 sub-device to apple-ib-touchbar once it appears (short retry loop; it's spawned asynchronously right after the parent bind).
  • default/udev/apple-t1-touchbar-disp.rules — runs it on every 05AC:8600 USB add, covering boot and resume.
  • install/hardware/apple/t1-touchbar-disp-bind.sh — shared needed / installed / install helpers for the leaf hook and migration.
  • install/hardware/apple/fix-t1-touchbar-disp-bind.sh — install-time hook, wired into install/hardware/all.sh right after the SPI keyboard hook.
  • Migration 1787508990 does the same for existing installs.
  • test/shell.d/apple-t1-touchbar-disp-bind-test.sh covers the hardware gate, the rebind logic against a faked /sys/bus/hid tree, and the install/migration wiring.

No change to manual/44-mac-support.md — the Touch Bar isn't fully wired up on quattro without #7064 (or an equivalent driver install) landing first; this only removes the second failure mode once that's in place.

Test plan

apple-ib-tb spawns a virtual HID sub-device (1D6B:0301) once the iBridge's
05AC:8600 interfaces are bound to apple-ibridge-hid. That sub-device carries
the "display on" field but doesn't reliably win its own auto-bind race, so
the bar shows icons but stays dark. Complements omacom#7064, which installs the
driver and binds the two real interfaces but not this one.
Copilot AI balanced review requested due to automatic review settings August 23, 2026 19:05

Copilot AI 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.

Pull request overview

Adds T1 Touch Bar display rebinding for boot and resume events.

Changes:

  • Adds a udev-triggered HID rebinding command.
  • Installs the rule on fresh and existing systems.
  • Adds shell coverage for detection, binding, and installation.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bin/omarchy-hw-apple-t1-touchbar-disp-bind Rebinds the virtual display HID device.
default/udev/apple-t1-touchbar-disp.rules Triggers rebinding on iBridge enumeration.
install/hardware/apple/t1-touchbar-disp-bind.sh Provides detection and installation helpers.
install/hardware/apple/fix-t1-touchbar-disp-bind.sh Adds the installer hook.
install/hardware/all.sh Runs the new hardware hook.
migrations/1787508990.sh Installs the rule on existing systems.
test/shell.d/apple-t1-touchbar-disp-bind-test.sh Tests detection, rebinding, and wiring.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@smoothunit

Copy link
Copy Markdown

https://github

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at c391c2e against quattro. Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion.

What ran. On a disposable Omarchy worker, ./test/cli passed and test/shell.d/apple-t1-touchbar-disp-bind-test.sh passed 15 of 15. The bug itself lives on T1 hardware no worker has, so it was not reproduced; the fix is read, not proven.

It does nothing on quattro today. quattro ships no T1 Touch Bar driver: apple-ib-tb, the firmware handoff and the rebind of the 05AC:8600 interfaces are all in #7064, which is still open and waits on the omacom/omarchy-pkgs#152 package bump. Until those land, this rule fires on nothing and the migration installs a rule for a driver that is not there. Whether T1 Touch Bar support goes the apple-ib-tb way at all is a decision for the maintainer; #12690 proposes T1Bridge for the same hardware instead. If #7064 is the direction, this rebind reads as the missing last step of it and would be easier to judge as part of that pull request than as a second install path for the same machines.

The trigger can miss the sub-device. Both reviews reached this; the second opinion agreed, and its independence is not guaranteed.

  • default/udev/apple-t1-touchbar-disp.rules:5 fires on the 05AC:8600 USB add, but with Add T1 Touch Bar firmware handoff and apple-ib-tb wiring #7064 the 1D6B:0301 sub-device only appears after Add T1 Touch Bar firmware handoff and apple-ib-tb wiring #7064's own rule runs on the apple_ib_tb module add and moves 8600 onto apple-ibridge-hid. At boot, USB coldplug and systemd-modules-load are not ordered against each other, so if that takes longer than the script's 3 seconds (15 × 0.2s) it gives up, and nothing runs it again when the sub-device does appear. udev also holds back events for the USB device's children while this RUN is still going, so the wait can delay the very work it is waiting for. Your field test applied the parent bind by hand rather than through Add T1 Touch Bar firmware handoff and apple-ib-tb wiring #7064's rule, so this pairing has not yet been seen on a real boot. Matching the sub-device's own event (SUBSYSTEM=="hid" for 1D6B:0301) would run the rebind exactly when the device exists and drop the retry loop.
  • bin/omarchy-hw-apple-t1-touchbar-disp-bind:23-28: if the sub-device exists before apple-ib-touchbar is registered, the script unbinds it from its current driver, skips the bind because drivers/apple-ib-touchbar/bind is missing, and stops on the first pass because found=1, leaving the device with no driver at all. I ran it on the worker against a faked /sys/bus/hid with only hid-generic present: it wrote the unbind and exited 0 right away. It should only unbind once it can bind, and keep retrying until the device is on apple-ib-touchbar.

The test's already-bound and gives-up-in-time cases would still pass if the guard they check were removed, so they do not cover the two cases above.

What happens next. Nothing was pushed: the trigger is a design change that needs T1 hardware to prove, and this pull request's value depends on #7064. It waits on the maintainer's decision about the T1 driver direction. If that goes to #7064, the fix above, and a maintainer confirming it on a T1 machine at the new head, are what would make it ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants