Repository navigation
pmdomain: apple: no PS reset recovery during system sleep (J700 suspend hang) - #1283
Merged
Merged
Conversation
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
marked this pull request as ready for review
November 9, 2026 05:11
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
apple_pmgr_ps_clear_latch(), added in #1255, now skips its PS reset while the domain is in a system sleep transition, from itssuspend_lateto itsresume_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 atPM_POST_SUSPEND. Runtime power-ons, includingapple_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):pm_test=freezer/devices(no domain is powered off)nhfix1= 55facfa, the fleet44 config)KUnit
apple-pmgr-pwrstate: 14/14 with this change.pmgr_ps_power_on_latch_sleep_testnow 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
nhfix1(integration 22fceec + this change, same config as fleet44), same loop: 6 boots, 144 suspends, 0 hangs (base rate with pmdomain: apple: clear a latched bit 11 with a PS reset on power-on (Neo ANE after sleep) #1255: 3 of 3 boots hung). One boot hit the real ANE_SYS latch; it reported the failed power-on, quarantined the ANE and finished all 24 suspends.🤖 Generated with Claude Code