Skip to content

drm/asahi: g17: raise the GPU's domain at the commit only on T8142 and T6050 (fixes J700 deep sleep) - #2469

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
fix/neo-g17-commit-raise-t8142-only
Nov 19, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
fix/neo-g17-commit-raise-t8142-only

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Since f5b8062 ("drm/asahi: g17: Raise the GPU's domain before stopping it at the commit", merged with #2135 on 11-17), every firmware-backed deep sleep on the MacBook Neo (J700, T8140) loses the PMP and the GPU. The raise was written for the J815 (T8142), but it lives in the common asahi_g17_commit_stop() that the T8140 also uses.

On the J700 the GPU domain reads 0x1000230f at the commit: target on, nothing powered, automatic power on. What happens next:

  1. The raise times out and leaves BUSY latched: GPU domain at the commit stop: 0x1000230f, raise to full -110.
  2. The PMP answers its AP IDLE on its crash-log endpoint instead of echoing it: apple_pmp 300500000.pmp: RTKit: AP IDLE not echoed (-110, AP 32): 1 received, last ep 0x1 0x101100bfefc000.
  3. The PMP stop fails with -110.
  4. The sleep driver reports power word 0x1f0 was off with BUSY latched at the commit: 0xf002800 and takes the deep path.
  5. After the wake:
    • the PMP and GPU firmware don't come back (-62 / ETIME), and the GPU device is lost;
    • the radios fail with -110;
    • Bluetooth reports a terminal transport fault.

Fix

Only the SoCs the raise was written for still raise the domain. They are matched by the GPU node's compatible: apple,agx-t8142 and apple,agx-g17s (T6050).

On every other SoC, the stop behaves as it did before f5b8062:

  • it goes straight to the RTKit idle poll;
  • it reads the word to restore after the idle.

The GPU domain at the commit stop line is printed only where the raise ran.

asahi_g17_m5_commit_stop() (J714s/J716c) is unchanged. T6040/T6041 and the G16 stop also go back to the stop they had before 11-17.

Evidence

All on our Neo (J700), 2026-11-19. Each kit is a one-shot boot on the installed aura 1.0.0b13-g5dcf62d0 with config-neo-41 (the 7.3.0-41.fc44 RPM's config) and the same rows script. Each sleep is one firmware-backed deep suspend (systemctl suspend) with a PMU-RTC wake, followed by a deqp-vk/gles3 short smoke and the kernel fault check.

kit source toolchain result
7.3.0-41 RPM (default) 6f618bc clang 22 / rustc 1.99.1 1/1 clean today, 4/4 earlier: dram-kept path, GPU/BT/Wi-Fi OK
j616cbase ×3 (earlier today) 6ae9c3c LLVM 19 / Rust 1.85 3/3 FAIL, the signature above
A 7.3.0.nsba 6ae9c3c as-is clang 22.1.8 / rustc 1.99.0 FAIL, sleep 1: deep path, the signature above; Vulkan killed (device lost)
B 7.3.0.nsbb 6ae9c3c with f5b8062 reverted same as A PASS 2/2: dram-kept both, no AP IDLE line, Vulkan 118/0/2 and GLES3 100/0 after each wake, Wi-Fi ping OK, BT powered, whole-boot FAULT-REGEX A/B 2/0 (same as the default)
D 7.3.0.nsbd 6ae9c3c + this patch same as A PASS 2/2: dram-kept both, no AP IDLE line, no "GPU domain at the commit stop" line, Vulkan 118/0/2 and GLES3 100/0 after each wake, Wi-Fi ping OK, BT powered, whole-boot FAULT-REGEX A/B 2/0, 0 Oops/BUG

Arms A, B and D ran back to back in one Neo slot (16:05-16:32), with a byte-exact undo after each and the default restored at the end. A and B differ only by f5b8062. Because A fails the same way, the toolchain is ruled out.

The tested kit D carries this commit's sleep.c except one line wrap, made afterwards for checkpatch (the T8142 raise's poll call). The patch applies unchanged on a26b265: g17/sleep.c is the same there as at 6ae9c3c.

Another J700 also reproduces the failure on 0abc2f3. Today's batch-1 merges (#2223, #2224, …) are therefore cleared.

Not run here: J815/T8142 and T6050 are unchanged by this patch, since their raise path is byte-for-byte the same.

🤖 Generated with Claude Code

…d T6050

Commit f5b8062 ("drm/asahi: g17: Raise the GPU's domain before
stopping it at the commit") made the common commit stop raise the GPU's
power domain to full before the RTKit idle poll, for the J815 (T8142).
That stop is shared with the T8140 (J700, MacBook Neo), where the raise
breaks every firmware-backed deep sleep.

At the commit the J700's GPU domain reads 0x1000230f: target on,
nothing powered, under automatic power. The raise from there times out
(-110) and leaves BUSY latched. The PMP then answers its AP IDLE with a
message on its crash log endpoint instead of the echo ("RTKit: AP IDLE
not echoed (-110, AP 32): 1 received, last ep 0x1"), its stop fails,
the sleep driver finds power word 0x1f0 off with BUSY latched and takes
the deep path. After the wake the PMP and the GPU firmware don't come
back (ETIME, GPU device lost), the radios are gone and Bluetooth
reports a terminal transport fault.

Raise only on the SoCs the raise was made for, by the GPU's compatible:
apple,agx-t8142 and apple,agx-g17s. Everywhere else the stop goes
straight to the idle poll and takes the word to restore after the idle,
as before f5b8062. The "GPU domain at the commit stop" line is
printed only where the raise ran.

Fixes: f5b8062 ("drm/asahi: g17: Raise the GPU's domain before stopping it at the commit")
Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr merged commit 26294e8 into integration/aurora Nov 19, 2026
1 check was pending
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Merged under the runner-outage rule: host-tests has been queued behind the org-wide linux Actions stall since ~16:24Z. Builds W=1 without warnings. MacBook Neo (J700) kit A/B on 6ae9c3c, fedora clang 22 / rustc 1.99, config-neo-41, firmware-backed deep suspend + RTC wake: as-is FAILs on sleep 1 (AP IDLE not echoed, raise to full -110, deep path, PMP -62, GPU device lost); with f5b8062 reverted it PASSes 2/2; with this fix it PASSes 2/2 (dram-kept, no AP IDLE miss, GPU smoke clean after each wake). Ryan's Neo independently cleared the toolchain and batch 1. T6050 (every board GPU node carries apple,agx-g17s) and T8142 keep the raise; T8140, T6040/T6041 and G16 return to the pre-11-16 stop. The non-raise path is byte-for-byte the old one (saved read after the idle). Post-merge: CI when runners return; M5 and J813 owners please shout if their sleep path changes.

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.

1 participant