Linux Power Management development
 help / color / mirror / Atom feed
* [REGRESSION] Lunar Lake: s2idle randomly misses S0ix when PCH xHCI (8086:a87d) is runtime-suspended; much worse since 7.3
@ 2026-11-25  9:24 Jun Cheol Gim
  2026-11-26  0:20 ` [RFC PATCH] usb: xhci-pci: resume Lunar Lake xHC before system suspend Jason Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Cheol Gim @ 2026-11-25  9:24 UTC (permalink / raw)
  To: Mathias Nyman, Xi Pardee
  Cc: linux-usb, platform-driver-x86, linux-pm, Rafael J. Wysocki,
	Rajneesh Bhardwaj, Hans de Goede, Ilpo Järvinen,
	Greg Kroah-Hartman, regressions

Hi,

On a Lenovo ThinkPad T14s Gen 6 (Core Ultra 5 228V, Lunar Lake),
s2idle sometimes resumes normally but never reached S0ix: last_hw_sleep
is 0 and the package stays in PC2 for the whole sleep (about 1.7 W
instead of 0.25 W). Since 7.3 this got much more frequent. Full details,
acpidump and logs: https://bugzilla.kernel.org/show_bug.cgi?id=222281

I narrowed it down. If the PCH xHCI controller at 00:14.0 (8086:a87d)
is runtime-suspended (D3hot) when the system suspends, the platform
fails to reach S0ix at random. If it is kept in D0 (power/control=on),
the failures almost go away, on both 7.0 and 7.4-rc4. That is why a
live USB system with a USB stick plugged in never failed (280/280).

Test loop: battery, no external USB devices, screen off, then
rtcwake -m mem -s 8 repeatedly. A cycle counts as OK if the S0i2.2
residency increased. "instr" means pm_debug_messages=1 plus an Intel
PMT telemetry dump around every cycle. That changes the success rate
by itself, so runs are only compared at the same instrumentation
setting.

  kernel               xHCI 00:14.0          instr  OK / total
  -------------------  --------------------  -----  ---------------
  7.0.0-44 (Ubuntu)    auto (D3hot, default) no     112 / 130 (86%)
  7.0.0-44 (Ubuntu)    on   (D0)             no      99 / 100
  v7.4-rc4             auto (D3hot, default) no       5 / 30  (17%)
  v7.4-rc4             on   (D0)             no      95 / 100
  7.0.0-44, same boot  auto                  yes     45 / 100
  7.0.0-44, same boot  on                    yes     96 / 100

- on vs auto: Fisher p = 1e-12 (7.0, same boot) and 1e-13 (7.4-rc4).
- With xHCI on, 7.0 and 7.4-rc4 cannot be told apart (99% vs 95%,
  p = 0.21).
- Caveat on the regression range: mainline v7.0 built with my config
  (Ubuntu config plus localmodconfig, checked that all loaded modules
  were built) reached only 15/30 with xHCI at "auto". So the clearly
  good kernel is Ubuntu's 7.0.0-44 (v7.0.14 plus Ubuntu patches), not
  plain v7.0. I have not tested v7.0 with xHCI on.

Failed cycles, according to Intel PMT (LNL aggregators 0x3072105 /
0x3072005, decoded with the public Intel-PMT XML):
- PREVENT_PKGC6_CHIPSET_1 and _2 count for the whole sleep (about 8300
  of 8300 ms). In OK cycles they count 40-75 ms.
- The package sits in PC2 and never enters PC10. GT RC6, media C6,
  core C6 and memory self-refresh look normal.
- In the unnamed regions telem5 (GUID 0x12057328) and telem6
  (0x11646436), most counters do not move at all during a failed sleep.
- The few failures left with xHCI on have the same signature.
- pm_debug_messages shows no "Constraint not met" over several hundred
  cycles. The LPS0 _DSM calls always succeed, and the RTC is the only
  wake source.
- Nothing read before suspend predicts the outcome. I checked every
  32-bit field of all 9 PMT regions and the PMC live status.
  Consecutive cycles are independent.
- Real lid-close sleeps behave the same way. An 82 min failed sleep was
  blocked by CHIPSET_1/2 for about 4960 s; a 105 min good sleep was
  100% PC10.

Workaround in use (one udev rule, split with backslashes):
  ACTION=="add|bind|change", SUBSYSTEM=="pci", \
    ATTR{vendor}=="0x8086", ATTR{device}=="0xa87d", \
    ATTR{power/control}="on"
During suspend I see no cost: OK cycles with on and auto use the same
package and Psys energy. I have not measured the idle cost while the
system is awake.

Questions:
1. Is there a known LNL issue when the PCH xHCI enters system suspend
   while already runtime-suspended (direct_complete or similar), as
   opposed to from D0? Should xhci-pci resume it before s2idle on this
   platform?
2. What do "Chipset 1" and "Chipset 2" in PREVENT_PKGC6_CHIPSET_* cover
   on LNL? Can the telem5 and telem6 data narrow down which IP keeps the
   package out of PC6? Raw per-cycle dumps are attached to the bugzilla
   entry (xhci-pmt-data.tar.gz).
3. I can bisect v7.0..v7.3 with xHCI left at "auto" if that is useful.
   Each step needs about 100 cycles (about 30 minutes) to separate the
   success rates reliably.

System: BIOS N4IET31W 1.17 (latest), EC 1.12, microcode 0x128,
Kubuntu 26.04, KDE Wayland. The cmdline also has no_console_suspend
(removing it at runtime did not help).

#regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=222281

Thanks,
Jason Kim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-26  0:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  9:24 [REGRESSION] Lunar Lake: s2idle randomly misses S0ix when PCH xHCI (8086:a87d) is runtime-suspended; much worse since 7.3 Jun Cheol Gim
2026-11-26  0:20 ` [RFC PATCH] usb: xhci-pci: resume Lunar Lake xHC before system suspend Jason Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox