Repository navigation
Conversation
9dc8f01 to
6ff3e34
Compare
|
Claude Opus 5.5 on @satchlj's behalf: J775c row on cand-8. With this PR the D0 check passes, and resume then hangs in the noirq phase. This run doesn't depend on any wake source. Kernel: cand-8, Method:
The hang. The last resume callbacks on the console, in order:
About 80 s later the RCU watchdog reported What this shows:
Not known:
Wake arming on the same boot, for the real freeze later:
Next run:
This PR stays in draft. 🤖 Generated with Claude Code |
6ff3e34 to
8d09565
Compare
|
Claude Opus 5.5 on @satchlj's behalf: cand-9 row. The resume hang doesn't follow the Wi-Fi/BT functions. Probes point at the USB/Thunderbolt power domains (hypothesis). Kernel: cand-9, Method:
Result:
What it shows:
Next:
This PR stays in draft. s2idle is still not shown to work. 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: s2idle now works on J775c with this PR plus #2592, so this is out of draft. Kernel: cand-10,
What each change does:
Selection is unchanged: the port's adopted-link state. 🤖 Generated with Claude Code |
|
The selection by the port's own state looks right, and the cand-5 log shows exactly the device this keeps in D0.
Assisted-by: LLM (Claude:Opus 5.5) |
|
Codex GPT-6.2 Sol on @satchlj's behalf. Both the |
|
Re-review of 14c0fd3: Blockers: 1. Earlier points:
HW row: J775c at 14c0fd3 (with #2592): Assisted-by: LLM (Claude:Opus 5.5) |
14c0fd3 to
f90f377
Compare
|
J714s (Apple M5 Pro / T6050) combined-stack
Assisted-by: LLM (Gemini 4 Neon) |
f90f377 to
6747193
Compare
The host's s2idle check refuses an adopted link unless every function on it is accessible in D0. On J775c the PCI core's system-suspend path puts the boot-trained root port 00:01.0 in D3hot first (PMCSR 0x000b at the host's noirq check, with runtime PM forbidden on every PCI device), so s2idle is refused on every attempt. Mark a root port the boot loader trained on an adopted link, and every function below it, PCI_DEV_FLAGS_NO_D3 when it is enabled. The selection is the port's adopted-link state: an adopted port that Linux trains itself (pwren-gpios) is not marked. Those functions also lose runtime D3. Signed-off-by: Satya Benson <satya@benson.earth>
Use one root-port walk and training test when setting NO_D3 and checking D0 for s2idle. Still check D0 when the root port is unknown. Signed-off-by: Satya Benson <satya@benson.earth>
6747193 to
513067f
Compare
|
Re-checked at 513067f. f90f377 and 6747193 have the same tree as 14c0fd3, and the move to 513067f is a rebase onto d1b022d that only changes hunk context, so the code is what I reviewed. Both commits are now signed off, which closes the attribution point. On the other T6050 machines: the J714s combined-stack row above (s2idle 3/3, deep 1/1, at an identical tree) covers suspend on one laptop. Two things are left:
Assisted-by: LLM (Claude:Opus 5.5) |
Claude Opus 5.5 on @satchlj's behalf. s2idle works on J775c with this PR plus #2592 (cand-10:
pm_test=platformpasses, and 3/3 real RTC-woken freezes; rows on #2488 and below). This PR passes the host's D0 check. #2592 fixes the noirq resume hang that followed. Earlier rows are kept below for the record.PCI: apple: mark a root port the boot loader trained on an adopted link, and every function below it,PCI_DEV_FLAGS_NO_D3when it is enabled. The PCI core's suspend paths then leave them in D0, which the host's s2idle check (adopted link requires accessible D0 devices for s2idle) requires.Selection: the port's own state, not a board or a command-line option. Only an adopted link the boot loader trained is marked. An adopted port that Linux trains itself (
pwren-gpios) is not.Cost: those functions also lose runtime D3. That is what lobata's default kernel has today, since its root ports have no driver.
Base:
integration/auroraf0c51766e9c5(rebased 2026-11-20 14:4xZ; #2088, #2101 and #2447 sincec92ed8517b79touch none of this PR's files).Why
On J775c with #2488's head, s2idle was refused on every attempt. A diagnostic print in the D0 check showed the device it refused (cand-5,
d2f8af83bf98; see #2488):It was the same in 6 of 6 cycles, including 3 with runtime PM forbidden on every PCI device. So it is the PCI core's system-suspend path that puts the boot-trained root port 00:01.0 in D3hot before the host's noirq check.
Testing
J775c (Mac Studio, M5 Max, T6050), on lobata.
Kernel: cand-7,
324280cadc47=integration/aurorad91db387c720+ 85, several merges behind this base (none touchpcie-apple.c). It includes #2488's head and this commit, cherry-picked with a context-only conflict next to the Clock-PM helper. No diagnostic print.Wake path, checked before the cycle:
rtc0(macsmc-rtc) haspower/wakeup=enabled.apple_spmi, with count 0.wakeup-source.Result, 1 cycle:
rtcwake -d rtc0 -m freeze -s 20began at 12:23:01Z. The console showedFilesystems sync: 0.003 secondsand then nothing more. The console suspends with the system, so its silence after that line tells nothing.There was no network and no resume after 7 minutes, so lobata was reset over DebugUSB. The journal ends before the freeze.
So it isn't known whether the D0 check passed and the wake failed, or suspend hung earlier. The earlier refusal (
-16, returning at once) did not appear on the console, but the console can't show it either way.cand-8 run (
7b5df9391f5f=c92ed8517b79+ 84, with #2488's head and this PR,no_console_suspend),pm_testwithpm_debug_messagesandpm_print_times:freezer,devicesplatformapple_pcie_suspend_noirq returned 0 after 49 usecs: the D0 check passes. Then noirq resume stalls. The last callbacks wereapple_pcie_resume_noirq,pci_pm_resume_noirqon 00:02.0, on the Wi-Fi function 01:00.0 and the Bluetooth function 01:00.2, then PHYgenpd_resume_noirq. About 80 s later came an RCU stall, with CPU 7 not answering the backtrace NMI.The
pm_testlevels resume on their own, so this hang doesn't involve a wake source. It is neither "suspend hung" nor "wake failed". The 12:23Z cand-7 freeze most likely hit the same resume hang.The plan below was written before the cand-8 run and is kept for the record:
/sys/power/pm_testatfreezer,devices,platformandcore. Each level resumes on its own, sodevicesalone shows whether the D0 check now passes, with no dependence on a wake source./sys/kernel/irq/151/wakeuponcertcwakehas armed the alarm, the SPMI node'sinterrupt-controller/#interrupt-cellsin the live DT, and whether the SPMI irqchip implementsirq_set_wake(or setsIRQCHIP_SKIP_SET_WAKE). Hypothesis: if the wake is never armed at the parent interrupt controller, the RTC alarm can't wake the system, which would look exactly like the 12:23Z non-resume.no_console_suspendandpm_debug_messages, a second wake source I can trigger, and/sys/power/pm_wakeup_irqlogged after each cycle.I'll post it here before taking this out of draft.
Untested: other adopted hosts (J775D), and the runtime-PM cost in idle power.
Assisted-by: LLM (Codex:GPT-6.2)