Repository navigation
Conversation
Port omacom/omarchy-mac#498 into the hardware package, with controller-specific journal recovery and setup that preserves administrator choices. Co-authored-by: n0mahd <39080654+n0mahd@users.noreply.github.com>
On an M2 Pro (t6020, 14e4:5f72) the controller wedged across 2 of 7 suspends with the same HCI tx timeout signature before PM: suspend exit, and reloading hci_bcm4377 brought it back, as reported in the review of omacom/omarchy-mac#498. The source PR left BCM4388 out only because its one report then was the rfkill path; this adds it to the gate, the setup tests, the README and the manual. Co-authored-by: Oliver Lukschander <33756270+oliverlukschander@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @malik-na, this is a useful port. A few things need changing before merge:
For release (not the source merge): a real lid-close resume through the unit on both BCM4387 and BCM4388. |
Review of #21: - A wants link under /usr/lib/systemd/system/suspend.target.wants runs the unit after every suspend on installs and upgrades alike, as the audio watchdog's link does, so Macs that only update get it. System setup no longer enables it, so a Bluetooth detection failure can no longer stop the speaker and launcher setup after it. Turning it off is a mask. - The watch starts from this suspend's entry: the kernel counts suspend attempts in /sys/power/suspend_stats, and the command waits up to 10 s for journald to hold that entry before taking its cursor, so an earlier cycle's timeouts are never read as this one's. Without it, it watches a bounded window from now. Journal reads stay within this boot. - A suspend during the 20 s watch moves it to the newer resume and restarts the watch: systemd will not start the unit again while it runs. - Hibernation is dropped from the unit; Apple Silicon Macs don't hibernate. - The README, manual and messages say what was seen (an HCI command timeout) instead of claiming a confirmed wedge or a healthy controller. - Tests: a fixture journal that changes over time covers timeouts after an earlier cycle's entry, a lagging journal, an entry that never arrives, a second suspend during the watch, hci0 leaving on unbind and returning on bind (or not), and setup finishing after a Bluetooth detection failure.
|
Thanks @maralcbr. Changes in 1a499ff:
Tested:
No wedge occurred, so the rebind itself is covered only by the tests. Still needed for release: lid-close resumes on BCM4387 and BCM4388. |
|
Thanks @malik-na, this is really careful work. You covered all five of @maralcbr's points, and the logic holds up. Anchoring the watch on the It can't land as is, though, now that #26 has merged and moved main underneath it. Notes against 1a499ff: Blocking
Smaller
Hardware I can be one of the two test machines you still need. My MacBook Pro 14" M2 Max (J414c) has a BCM4388: Bluetooth at 01:00.1 is If you'd rather I push the rebase myself, I'm happy to. The branch is in this repo, so just say the word. |
Port of omacom/omarchy-mac#498 by @n0mahd, with the recovery moved into
omarchy-mac/. Co-authored commit.After s2idle the Broadcom Bluetooth firmware can stop answering HCI commands (
hci0: command 0x0c01 tx timeout), and only rebindinghci_bcm4377brings it back.omarchy-bluetooth-resume-fix.service, a vendor unit ordered after the sleep targets, rebinds the Bluetooth PCI function only when that signature appears after the latest suspend-entry journal cursor, and leaves healthy controllers and a radio you turned off alone.Changes from the source PR:
lib/bluetooth-supportedonomarchy-hw-platformand the PCI ID, and enabled once byomarchy-mac-setup-system, which keeps administrator overrides, masks and later disables. The quattro migration is dropped.14e4:5f72): @oliverlukschander saw the same wedge on an M2 Pro in the source PR's review. @oliverlukschander, could you check this branch on that machine?omarchy-macgoes to 0.1.1.Tested: CI's scope, architecture-gate and fixture-drift checks pass locally; the package and integration suites run in CI. The source PR verified the recovery on an M1 MacBook Air (BCM4378). Still needed before release: suspend/resume on a BCM4387 and a BCM4388 Mac.
🤖 Generated with Claude Code