Skip to content

[Joshua's agent] arm64: dts: apple: k114c: keep the GFX domain on across s2idle - #1710

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
w7c/k114c-gfx-sleep-retained
Nov 12, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
w7c/k114c-gfx-sleep-retained

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 12, 2026 •

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.

On the 14-inch MacBook Pro with M5 Max (K114c, T6050), a pm_test=platform suspend with the GPU driver bound hung the machine. The G17 GPU firmware keeps running through suspend-to-idle, and genpd powers the GFX domain off in the noirq phase underneath it. With the GPU driver and both GPU mailboxes unbound, the same genpd step finished and the machine stayed up.

This sets apple,sleep-retained on &ps_gfx. That property is the contract the T8132 GFX domain already uses: power_off returns -EBUSY while a system sleep transition runs, so the domain stays on.

Result with this patch and the PCI patch (#1711), pm_test=platform, GPU driver bound:

  • Suspend returns 0 in 5.27 s. suspend_stats: 1 success, 0 failures.
  • devices, late, noirq and resume callbacks all return 0.
  • The GFX domain stays on. Vulkan compute after resume: fma check 2864 GFLOPS, result ok.
  • NVMe read after resume 3.5 GB/s. Wi-Fi is up.

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

The G17 GPU firmware stays live through suspend-to-idle. genpd powers the
GFX domain off in the noirq phase, under the running firmware. On the
14-inch MacBook Pro with M5 Max a pm_test=platform suspend with the GPU
driver bound hung the machine. With the driver and both GPU mailboxes
unbound the same genpd step finished and the machine stayed up.

apple,sleep-retained is the contract the T8132 GFX domain already uses:
power_off returns -EBUSY while a system sleep transition runs, so the
domain stays on.

Tested on the 14-inch MacBook Pro with M5 Max, with the PCI change in the
next patch: pm_test=platform with the GPU bound returns 0 in 5.27 s.
suspend_stats shows 1 success, 0 failures. The devices, late, noirq and
resume phases all return 0, the GFX domain stays on, and Vulkan compute
runs after resume (2864 GFLOPS fma check, result ok). 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:37.641972Z 6e24ef7 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-12T18:38:33.027915Z 6e24ef7 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.

Same contract as the T8132 GFX domain, and the s2idle runs with #1711 cover it. Looks good.

@RyanTheTide
RyanTheTide merged commit 3c8ca02 into integration/aurora Nov 12, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the w7c/k114c-gfx-sleep-retained 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