Skip to content

pmdomain: apple: no PS reset recovery during system sleep (J700 suspend hang) - #1283

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
neohang/pmgr-no-noirq-ps-reset
Nov 9, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
neohang/pmgr-no-noirq-ps-reset

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What

apple_pmgr_ps_clear_latch(), added in #1255, now skips its PS reset while the domain is in a system sleep transition, from its suspend_late to its resume_early. During a system sleep a latched power-on fails as it did before #1255: genpd ignores the error in the noirq phase and the ANE quarantines at PM_POST_SUSPEND. Runtime power-ons, including apple_pmgr_ps_cycle(), still run the recovery.

Why

This is the J700 (T8140) "hang on suspend entry": the fleet43 suites and the aneres2 boots stopped at a suspend and came back only through the hardware watchdog. In the system sleep path, #1255 runs the PS reset from the genpd noirq resume, while the ANE_SYS DARTs and engine are still in their noirq phase. That hangs the machine.

Evidence (J700, our own lab runs)

Loop: from a fresh boot, 12 systemd and 12 direct suspends per boot, all with pm_test=platform (one-shot test boots under the dead-man; results in our lab notes):

kernel #1255 recovery in noirq boots hung ANE_SYS latched, no hang
fleet43-based test kernel (with kdump) yes 3 3 -
fleet36 (before #1255) no 4 0 2
same test kernel, #1255 reverted no 2 0 0
same test kernel, pm_test=freezer / devices (no domain is powered off) yes 2 / 4 0 / 0 -
this PR (nhfix1 = 55facfa, the fleet44 config) no (skipped in sleep) 6 0 1 (11 failed power-ons, ANE quarantined, the loop finished)

KUnit apple-pmgr-pwrstate: 14/14 with this change. pmgr_ps_power_on_latch_sleep_test now expects no PS reset during sleep and the recovery after it. Negative control: the new test fails on the old driver (13/14).

Hardware rows

🤖 Generated with Claude Code

A power-on that stops with bit 11 latched is retried after a PS reset
pulse while the domain is gated (commit a10defe). The genpd noirq
resume runs that power-on with the domain's DARTs and engine still in
their noirq phase, and on the T8140 the recovery there hangs the machine.

In a suspend loop on the J700 (12 systemd and 12 direct pm_test=platform
suspends per boot, from a fresh boot), kernels with the recovery hung on
3 of 3 boots. The hw watchdog brought each one back, and no "cleared by
a PS reset" line ever reached the disk. Kernels without it (fleet36, and
the same tree with the recovery reverted) hung on none of 6 boots. Two of
those boots latched ANE_SYS, quarantined the ANE and kept going. The
freezer and devices test levels, which never power a domain off, hung on
none of 6 boots with the recovery in place. This is the J700 "hang on
suspend entry" seen in fleet43 suites and on aneres2.

Skip the recovery while the domain is in a system sleep transition (from
its suspend_late to its resume_early). The power-on then fails as before
#1255. genpd ignores the error in that phase and keeps the domain
requested on, and the ANE quarantines at PM_POST_SUSPEND as it did
before. Runtime power-ons, including apple_pmgr_ps_cycle(), keep the
recovery.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
@RyanTheTide
RyanTheTide marked this pull request as ready for review November 9, 2026 05:11
@RyanTheTide
RyanTheTide merged commit 6ff31cb into integration/aurora Nov 9, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the neohang/pmgr-no-noirq-ps-reset branch November 9, 2026 05:11
DjDeveloperr added a commit that referenced this pull request Nov 9, 2026
Keep the driver-owned domain skip at the wake next to #1283's no-recovery
rule during system sleep; take the J700 JPEG1, watchdog IRQ and #1304 as is.
DjDeveloperr added a commit that referenced this pull request Nov 9, 2026
Keep the noirq record of domains another owner raised alongside #1283's
system_sleep rule in the same driver; both sleep callbacks stay.
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