Skip to contentSkip to conversation

x1e80100: no AOSD/CXSD in suspend with APPS votes at zero - which vote is left?

DISCUSSION Michael Burch 3 participants 6 messages Oct 8 – Oct 15 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

Hi Maulik, Abel, Pankaj,

On a Dell XPS 13 9345 (X1E80100) I cannot get AOSD/CXSD in system suspend. APSS collapses, but DDR never enters self-refresh and qcom_stats aosd/cxsd stay at 0. Standby is 0.43 W; Windows on the same machine and firmware flash reaches 159 mW with 99% hardware residency.

As far as I can tell APPS holds no vote in sleep, so I think the remaining vote is outside what Linux can see. I would appreciate help identifying it. Below is what I have eliminated, either by readback or by a deep suspend that still gave aosd/cxsd = 0.

Setup
BIOS 2.14.0 (TZ.XF.5.28.1-00029), Linux at EL1 under Gunyah v7.3-rc6 + Hans de Goede's qcom-laptops 7.3 + local fixes domain-sleep-0 (0x0200c354) and PDC pass-through as in rc6 ADSP.HT.5.9-00810-HAMOA-1, CDSP.HT.2.9.c1-00046-HAMOA-1 mem_sleep = deep (PSCI SYSTEM_SUSPEND)

During suspend

  apss         +1 entry, residency ~ suspend time
  aosd, cxsd   0
  ddr_stats    0 in every LPM entry; mostly 200 MHz, some 547 MHz

lpm_mon cxpc (sampled mid-suspend, DRV 3-21): DRV5 and DRV21;
DRV21 only once the ADSP is quieted (below)
lpm_mon rbsc: all subsystem RSCs asleep

Eliminated
- APPS RSC (DRV2): tracing the last flush before SYSTEM_SUSPEND, every BCM sleep vote is written as 0 and every BCM's last active vote is 0. ARC/VRM sleep votes also reach 0 once a test module forces xo.lvl and six LDOs left on by boot firmware (l8b, l1c, l2c, l1i, l2i, ldof1), which Linux does not vote, to off.
- sync_state: crypto@1dfa000 disabled, Akhil's GMU sync-state RFT applied; GCC, GPUCC and all interconnect providers are synced.
- PCIe: NVMe goes to D3 (broken_l1ss_resume); both controllers reach

    pci->suspended and icc_disable() their paths in suspend_noirq. The
    Wi-Fi RC (WCN7850, ath12k) logs "Timeout waiting for L2 entry!
    LTSSM: 0x11" on every suspend, but is still stopped and
    deinitialised. I have no clean result with ath12k unloaded (that
    hung on 7.3-rc2).

- CDSP: never booted (disabled in DT).
- ADSP: sending the MODERN_STANDBY_STATE message that Windows sends on APPS_ADSP_PWR_LMTS_GLINK_PORT cuts ADSP wakeups from ~95/s to ~0.24/s and removes DRV5 from cxpc. With a power-only sensors registry it has 0 DSPPM clients. Island is never entered.
- CoreSight: all coresight modules blacklisted, qdss prepare count 0.
- USB-C retimer refclks released with no partner; XO buffers clka6/clka7 read 0 for HLOS.
- ADSP, LDO/XO and retimer items above, together.
- Entry path: s2idle instead of deep, with APSS collapsing (below).

Questions
1. What is DRV21 on Hamoa? I believe it is DDR_AUX, i.e. a result of DDR being held rather than the holder. Is that right?
2. Which voter is left: TZ, Gunyah, a DSP, something else? Is there a way from HLOS to see per-DRV BCM/ARC votes? The AOSS ARC registers and the drv-1 RSC window abort from EL1.
3. Has anyone seen aosd/cxsd > 0 on X1E80100 with mainline, on the CRD or a laptop? With which DSP firmware?
4. Windows ships ADSP -00826 and CDSP -00078. Is the linux-firmware

     pair (-00810/-00046) expected to reach CX collapse?

Separately: stock s2idle never collapses APSS here. tick_freeze() disables CNTV, and APSS collapses only if CNTV is armed. With a test cpu_pm notifier arming it, APSS collapses and firmware writes the APPS RSC wake time; aosd/cxsd still stay 0. Is this known?

Traces and logs available on request.

Thanks,
Michael Burch

#1 lore raw
Quoted 6 lines · Michael Burch

Hi Maulik, Abel, Pankaj,

On a Dell XPS 13 9345 (X1E80100) I cannot get AOSD/CXSD in system suspend. APSS collapses, but DDR never enters self-refresh and qcom_stats aosd/cxsd stay at 0. Standby is 0.43 W; Windows on the same machine and firmware flash reaches 159 mW with 99% hardware residency.

[...]

Quoted 7 lines

During suspend

  apss         +1 entry, residency ~ suspend time
  aosd, cxsd   0
  ddr_stats    0 in every LPM entry; mostly 200 MHz, some 547 MHz

lpm_mon cxpc (sampled mid-suspend, DRV 3-21): DRV5 and DRV21;
DRV21 only once the ADSP is quieted (below)
lpm_mon rbsc: all subsystem RSCs asleep

Do you have leftover non-active-only-interconnect or RPMHCC votes?

Konrad

#2 lore raw

Read from /sys/kernel/debug/interconnect/interconnect_summary (T0, pre-suspend) and /sys/kernel/debug/rpmh-rsc/apps/sleep (post-resume).

EBI BCM (DDR controller) -- nonzero votes present:

Consumer avg peak
GPU (3d00000) 0 8171875
USB3 (x3 ports) 1000000 2500000
Display (ae00000) 708341 800000
PCIe (x2 ctrls) 0 1

These are all QCOM_ICC_TAG_ALWAYS paths -- the "pcie-mem" (MASTER_PCIE_X / SLAVE_EBI1), display, and USB3 memory paths from hamoa.dtsi. The ACTIVE_ONLY tagged paths are correctly excluded.

QNS_PCIE_MEM_NOC BCM: peak=1 on both PCIe controllers.

QNS_MEM_NOC_SF BCM (display): avg=708341, peak=800000.

CX rpmhpd: perf=256 (NOM).

So the "pcie-mem" paths are a candidate -- they're tagged QCOM_ICC_TAG_ALWAYS and thus not excluded from the sleep bucket. The PCIe peak values are tiny (1), though, so I'm not sure whether that's significant.

Michael

#3 lore raw

Disregard my previous reply. The interconnect_summary figures were read while awake.

Interconnect: no. In the last flush before machine_suspend, every APPS BCM vote is 0 in the sleep set, so the ALWAYS-tagged paths I listed hold nothing in suspend.

RPMHCC: yes, xo.lvl and the retimer refclks (clka3/clka4). With all three at 0, AOSD/CXSD still stay at 0 (one 725 s deep suspend).

Michael

#4 lore raw

Found that regulator votes were left too.
rpmh-regulator sends active-only requests, so rpmh_flush() skips them and the active value stays in force while APPS sleeps. I removed those step by step, and AOSD/CXSD still stay at 0.

Each step is one ~65 s deep suspend on the same boot, with the final flush before machine_suspend checked via rpmh dyndbg. aosd/cxsd and every DDR LPM entry stayed 0 after each step:

1. Baseline: BCM and ARC sleep votes 0 except xo.lvl 3. 20 VRMs enabled in HPM/PWM: USB SS/HS and PCIe PHY, eUSB2 repeater and QREF LDOs, the always-on l12b/l15b, and their parents.
2. dwc3 power/wakeup disabled on all three controllers: dwc3 then powers the PHYs down and 16 of those LDOs drop, the PCIe ones included. Left on: l12b, l15b, smpc4, smpj5.
3. + xo.lvl sleep vote 0 and the six boot-firmware LDOs off.
4. + sleep-set mode RET/LPM on every rail that stays powered. This includes smpi1/smpi2, which Linux never enables but votes into PWM, because the DT sets regulator-initial-mode HPM everywhere.
5. + l12b and l15b off.

After step 5, the APPS sleep set has all BCMs at 0, all ARCs at 0 (xo.lvl included), no regulator enabled except smpc4/smpj5, and every mode at its lowest. When I last sampled lpm_mon cxpc in suspend with the ADSP quieted, DRV21 was the only DRV set.

I also traced the Windows PEP's QMP client (its WPP log) over two Modern Standby cycles that reached DRIPS. It sends four messages at boot (qdss clock, adsp/cdsp load_state, gpu acd) and nothing around standby, so I don't think a missing AOP message is the difference.

Questions:
1. What does DRV21 (DDR_AUX?) wait for before releasing CX, and which DRVs can keep ddr.lvl up when APPS votes nothing?
2. Could someone with access to the AOSS per-DRV vote tables check a Hamoa in this state? From EL1 those registers abort.

Michael

#5 lore raw
In reply to Michael Burch

Hi,

Quoted 7 lines · Michael Burch

Hi Maulik, Abel, Pankaj,

On a Dell XPS 13 9345 (X1E80100) I cannot get AOSD/CXSD in system suspend. APSS collapses, but DDR never enters self-refresh and qcom_stats aosd/cxsd stay at 0. Standby is 0.43 W; Windows on the same machine and firmware flash reaches 159 mW with 99% hardware residency.

Quoted 7 lines

As far as I can tell APPS holds no vote in sleep, so I think the remaining vote is outside what Linux can see. I would appreciate help identifying it. Below is what I have eliminated, either by readback or by a deep suspend that still gave aosd/cxsd = 0.
[..]
- sync_state: crypto@1dfa000 disabled, Akhil's GMU sync-state RFT applied; GCC, GPUCC and all interconnect providers are synced.

I've actually applied the crypto series from [1] to get at least the tiny core driver to remove the QCE vote left over from boot fw. With the qcrypto driver attached, I *did* for the first time start seeing DDR sleep stats climbing up in "deep" suspend on my Latitude 7455.

Apparently the GMU RFT thing was rejected[2] and it should not be necessary? Though, maybe that's only fine with CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT? Because since I've unapplied it I am seeing sync_state() pending due to GMU, and without the timeout that would be pending forever..

Quoted 3 lines

[..]
3. Has anyone seen aosd/cxsd > 0 on X1E80100 with mainline, on the CRD or a laptop? With which DSP firmware?

A few people in #aarch64-laptops recently did, starting with the "vibe researched" x1e-sleep thing [3], but since reproduced without weird hacks with nVHE EL2 and EL1 as well I think. Doesn't look like firmware versions matter.

I only have ddr but not aosd/cxsd for now, but I haven't yet tested with CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT etc.

[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://github.com/justririll/x1e-sleep

~val