Skip to content

Bluetooth: btcentauri: Quiesce Beta for sleep on every N1 board - #3130

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:j815/btcentauri-sleep-any-board
Nov 25, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:j815/btcentauri-sleep-any-board

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What: send Beta's ACIPC host-sleep request on every N1 board instead of only on apple,j813, as #2385 does for Alpha. On J815 the deep sleep went ahead with Beta never told: after the wake the transport read exec=3 and stopped, and every HCI command failed with -ENETDOWN until a reboot. The request is now sent wherever the IPC is up and Beta's firmware runs (exec stage 2, IPC 2).
Tested: J815 (MacBook Air 15" M5) at 76bf36c59312, in the batched candidate m0d16l14n1/linux j815/prtest-r6 8ad9358 (main 70381bd + the open T8142 sleep, N1 and J815 PR heads, unchanged): PASS. One timed deep sleep and wake (Timekeeping suspended for 24.464 seconds, 9 cores in one burst, CPUs 0-9) with an LE mouse connected: after the wake Beta reads exec 2 / IPC 2, the mouse moves with no reconnect, 0 TX/RX errors. The same tree without this commit: Beta transport stopped (exec=3 ipc=2) and HCI -100 after the wake. Regression: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors, 0 WARN/BUG/Oops.
Risk: two-way door. J813 and J815 Bluetooth (the btcentauri boards). J813 keeps the same request it sends today; a board whose Beta firmware isn't running skips it, as suspend did on J815 before.
Not yet: a J813 row at this head; several cycles in one boot; a lid-close wake.

Details
  • cen_suspend() gated the request on of_machine_is_compatible("apple,j813") && bt->ipc_requested. The gate is now bt->ipc_requested plus Beta's exec stage and IPC state both reading 2, the same state cen_transport_state() requires; resume is unchanged and still only undoes a request suspend sent.
  • Fixes: 507c53d46cf2 ("Bluetooth: btcentauri: quiesce the J813 transport across deep sleep").
Evidence

Without this commit (boot 7791e409):

[  213.335659] Timekeeping suspended for 24.624 seconds
[  213.422981] btcentauri 0000:01:00.2: Beta transport stopped (exec=3 ipc=2); polling disabled
[  214.178561] Bluetooth: hci0: sending frame failed (-100)
[  214.179370] Bluetooth: hci0: Opcode 0x0c01 failed: -100
[  214.181853] Bluetooth: hci0: start background scanning failed: -100

With it (boot 6aaae3d9):

[  222.602094] apple-sleep: wake: 9 cores started in one burst; stop/sys/e/p now 0/0/0/0
[  222.602094] Timekeeping suspended for 24.464 seconds
btcentauri status after the wake: exec=2 ipc=2 running=1 transport_paused=0, acl_enabled=1, tx_errors=0 rx_errors=0
LE mouse: still connected, moving after the wake
regress: 0 SELinux denials, 0 failed units, 0 new kernel errors vs the previous boot, 0 WARN/BUG/Oops

Suspend sent Beta the ACIPC host-sleep request only on apple,j813. J815
has the same N1 behind the same PCI functions, so it went into deep
sleep with Beta never told: after the wake the transport read exec=3
and stopped, and every HCI command failed with -ENETDOWN until a reboot.

Send the request wherever the IPC is up and Beta's firmware runs, as
the Alpha side does since "wifi: apple: centauri: Quiesce Alpha for
sleep on every N1 board". A firmware that isn't running has nothing to
quiesce, and resume still only undoes a request suspend sent.

Fixes: 507c53d ("Bluetooth: btcentauri: quiesce the J813 transport across deep sleep")
Signed-off-by: Nick <[email protected]>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 76bf36c5: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at 76bf36c5
Conflicts ok none
PR text ok Risk: two-way · . J813 and J815 Bluetooth (the btcentauri boards). J813 keeps the same request it sends today; a board whose Beta firmware isn't running skips it, as suspend did on J815 before.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@satchlj satchlj 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.

Verdict: MERGE at 76bf36c59312

Blockers: none

Checked: drivers/bluetooth/btcentauri.c (cen_suspend, cen_transport_state, and cen_resume symmetry), verifying bt->bar + 0x18 (exec stage 2) and bt->bar (IPC state 2) match the running firmware state already logged and checked in cen_transport_state(), that bt->transport_sleep_sent still guards the resume wake path so boards without running Beta firmware remain untouched, and that all CI checks and the exact-head J815 deep-sleep hardware row are green.

Evidence
  • Diff check: replaces the board-specific of_machine_is_compatible("apple,j813") gate in cen_suspend() with bt->ipc_requested && readl(bt->bar + 0x18) == 2 && readl(bt->bar) == 2, matching cen_transport_state()'s register layout (exec at +0x18, ipc at +0x00).
  • Hardware evidence: J815 (MacBook Air 15-inch M5) PASS at 76bf36c59312 across a 24.464 s deep-sleep cycle (exec=2 ipc=2, LE mouse stays connected with 0 TX/RX errors vs exec=3 and -100 without the fix; 0 failed units, 0 new kernel errors).
  • CI: host-tests, pr-text, and readiness all green (3/3 successful, 0 failing, 0 pending).

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

J815 (MacBook Air 15" M5) row at 76bf36c59312 unchanged: PASS.

Candidate: m0d16l14n1/linux j815/prtest-r7 d70fd05 = main a60fef7 with these PR heads merged unchanged: #2384 f9d03e8, #2385 b1c3392, #2192 c5daf57, #2193 8be9e73, #3123 822a1dd, #3124 1a272ce, #3125 4ad71b8, #3129 6d5ec4d, #3130 76bf36c, plus the open J815 PRs (r6 + #3123's new head). Stage 2 as on r6. Command line: default + pcie_aspm=off apple_sleep.deep=1 nvme_apple.sleep_untested=1 appledrm.s2r_untested=1 apple_sep.xart_writes=0 apple_sep.provision_keybag=0 apple_sleep.t8142_wake_s=0 (the last one turns off the timed PMU wake, so the sleep lasts until a key).

One deep sleep with no timer, woken by a key on the built-in keyboard after about 10 minutes (boot 9325546c): Timekeeping suspended for 603.654 seconds, 9 cores started in one burst, CPUs 0-9 online, suspend_stats success=1 fail=0; the wake source is the built-in keyboard/trackpad. Panel, NVMe, Wi-Fi (up 5 s after the wake) and Bluetooth (LE mouse still connected, 0 TX/RX errors, exec 2 / IPC 2) back.

Regression on the same boot, after the wake: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors vs the previous boot, 0 WARN/BUG/Oops.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Nov 25, 2026
@DjDeveloperr
DjDeveloperr merged commit bb538f9 into aurora-silicon:main Nov 25, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants