Skip to content

[Joshua's agent] PCI: apple: qualify K114c for the adopted-link s2idle retention - #1711

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
w7c/k114c-pcie-s2idle
Nov 12, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
w7c/k114c-pcie-s2idle

Conversation

@joshuaswarren

Copy link
Copy Markdown
Contributor

[Joshua's agent] Draft. Tested on one machine with pm_test=platform. A real wake from a key or the lid is not tested yet.

apple_pcie_check_adopted_s2idle() refuses every board except the J716c with -EBUSY. On the 14-inch MacBook Pro with M5 Max (K114c, T6050) that aborts suspend in the noirq phase:

pcie-apple 1cb0000000.pcie: apple_pcie_suspend_noirq returns -16

This adds apple,k114c to the board check. The runtime checks after it stay in force: root complex running and ready, every port link up, every device on the bus in D0.

Result with this patch and the GFX sleep-retained patch (#1710), pm_test=platform, GPU driver bound:

  • Suspend returns 0 in 5.27 s. suspend_stats: 1 success, 0 failures.
  • The PCIe Wi-Fi and NVMe links work after resume. NVMe read 3.5 GB/s, Wi-Fi up.

The two patches were found separately and tested together. The -16 showed with the GPU driver unbound. The GPU-bound hang is the GFX patch's case. Neither patch was tested alone with the GPU bound.

Not covered: a real s2idle with wake from a key or the lid. I will update this PR with that result.

apple_pcie_check_adopted_s2idle() refuses every board except the J716c
with -EBUSY. On the 14-inch MacBook Pro with M5 Max (K114c) this aborts
suspend in the noirq phase: apple_pcie_suspend_noirq returns -16 with
pm_test=platform.

Add K114c to the board check. The runtime checks that follow stay in
force: root complex running and ready, every port link up, and every
device on the bus in D0.

Tested on the 14-inch MacBook Pro with M5 Max: with this change and the
GFX sleep-retained patch, pm_test=platform returns 0 in 5.27 s. The PCIe
Wi-Fi and NVMe links work after resume (NVMe read 3.5 GB/s, Wi-Fi up). A
real s2idle wake from a key or the lid is not tested yet.

Signed-off-by: Joshua Warren <[email protected]>
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Update from the real suspend-to-idle test on the 14-inch MacBook Pro with M5 Max (this PR and the other K114c sleep PR, no other sleep changes).

Suspend entry and every suspend and resume callback returned 0. About 60 s into the sleep the NVMe controller firmware crashed while the CPU was asleep:

nvme-apple 45dcc0000.nvme: RTKit: Message (id=1): assert failed: [7448]:non empty queue delete error. status_reg: 0x20000000
nvme-apple 45dcc0000.nvme: RTKit crashed; unable to recover without a reboot

After the key wake, ext4 on the root aborted its journal and every write returned an I/O error. So this PR is not enough for a working s2idle on this board: it fixes the suspend abort and the GFX power-off, but the NVMe controller does not survive about 60 s of sleep. The pm_test=platform run in the description passes because it holds for 5 s. The NVMe fix is separate and in progress. Lid wake is not tested.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Update, 11:16 CST. A real suspend-to-idle with key wake now passes on the 14-inch MacBook Pro with M5 Max, with this PR and the other K114c sleep PR, and with the NVMe module parameter t6050_keep_live=0 set at runtime:

  • 93.6 s asleep, resume returns 0, suspend_stats shows 0 failures in every phase.
  • No ANS crash text. NVMe reads and Wi-Fi work after wake. pcie-apple suspend_noirq and resume_noirq return 0.

The earlier crash (previous comment) happens with the default t6050_keep_live=1: the controller stays enabled across the sleep and the ANS firmware asserts about 60 s in. That needs a separate fix and is not part of this PR.

One more finding for the PCI patch: after that crash, two warm resets left the Wi-Fi PCIe host failing to probe (pcie-apple 1cb0000000.pcie: probe with driver pcie-apple failed with error -22, no wlan0). A full power cycle cleared it. Not yet known whether the sleep path caused it. Lid wake is not tested yet.

@joshuaswarren
joshuaswarren marked this pull request as ready for review November 12, 2026 18:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T18:36:41.203736Z aea2429 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-12T18:38:22.126113Z aea2429 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

The machine check is the only change and the runtime checks stay in force. The key-wake s2idle result with #1710 covers it. Merging the two together.

@RyanTheTide
RyanTheTide merged commit 8fe86ab into integration/aurora Nov 12, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the w7c/k114c-pcie-s2idle branch November 12, 2026 22:16
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.

2 participants