Skip to content

PCI: apple: suspend-to-idle on the J714s (adopted N1 link; stacks on #1647) - #2012

Merged
DjDeveloperr merged 3 commits into
aurora-silicon:integration/aurorafrom
Isaac-Duarte:j714s/s2idle-allowlist
Nov 16, 2026
Merged

DjDeveloperr merged 3 commits into
aurora-silicon:integration/aurorafrom
Isaac-Duarte:j714s/s2idle-allowlist

Conversation

@Isaac-Duarte

@Isaac-Duarte Isaac-Duarte commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Stacks on #1647. This branch is #1647's head (70bf8ed186) plus one commit. Only the last commit, 56b02059cf "PCI: apple: qualify the J714s for suspend-to-idle over the adopted N1 link", is new here. Review #1647 first; I'll rebase this once it merges.

Pairs with #1789 and #2018. Merge this only together with, or after, both:

What

One commit, drivers/pci/controller/pcie-apple.c (+6/−4): apple,j714s joins the J716c, K114c and K116s in apple_pcie_check_adopted_s2idle()'s allowlist. The comment above it now says what the four share (the T6050 host with the N1 adopted on port 0), and that the K116s and the J714s also have a kernel-trained SD reader port.

Why

The J714s (MacBook Pro 14", M5 Pro) has the same T6050 host as the K116s, with the N1 adopted on port 0. Without this, every s2idle on it fails in the noirq suspend:

pcie-apple 1cb0000000.pcie: PM: dpm_run_callback(): apple_pcie_suspend_noirq returns -16
pcie-apple 1cb0000000.pcie: PM: failed to suspend noirq: error -16

Like the K116s, the J714s has its SD card reader (GL9755) on port 1, which the boot loader leaves down and Linux trains (port 1: trained by Linux, the boot loader left it down). #1647's second commit, which lets the devices below such a port leave D0 over s2idle, covers that here too. The allowlist line has now run on two J714s machines.

Tested

J714s, the user's machine. Kernel 7.3.0-b248cfe, build #2 (08:23): integration/aurora b248cfe plus carried commits, including #1647's two commits, #1789, and this line. The line in that kernel is functionally the same as this commit; only the comment differs. Build #1 (08:01) lacked those commits, and it is the build of the 20-of-20 boot above. Every boot below is build #2, and every s2idle in them ran with the line. The table shows selected boots. Three more build-#2 boots also slept, with no PCIe refusal and no failure, and are left out: 12:03 (one 63.8 s lid sleep, the traced run of #2018); 12:59 (three: 22.4 s, the 45 s SD-card test, and about 66.6 min from 14:06:35 to 15:13:13, woken by an SMC HID event rather than the lid); 15:24 (one 41.7 s lid sleep). The PHY module was swapped between boots. In boots 3–5, "#2018" means its earlier PHY-hold version (then posted as #2008); boot 6 ran #2018's current DT version.

boot with result
1 (08:25) #1647 + #1789 + this one lid sleep, 5 min 38 s; clean wake. Wi-Fi, Bluetooth and the PMP were fine after it. Both USB-C ports dead after the wake, which is what #2018 fixes.
2 (08:40) same one attempt, at 09:01, with a DP tunnel up, refused by thunderbolt-apple-nhi (-16, by design); no real sleep
3 (09:02) same; the #2018 module was on disk, but the initramfs held the old one entry aborted at 09:03:57, retried at 09:04:07: real lid sleep of 42 s, clean wake; the right port (the only one tried) dead after the wake (no #2018)
4 (09:27) + #2018 (with a debug commit) one real sleep, 75 s; clean wake, dock on both ports after it. One earlier attempt with a DP tunnel up was refused by thunderbolt-apple-nhi (-16), and the system stayed up.
5 (09:47) + #2018 (clean module) three real sleeps on one boot (34 s, 39 s, 49 s), lid wakes; dock on both ports after them
6 (15:42) + #2018's DT version: linux-latest's t6050-j714s.dtb plus the usb-aon patch, not build #2's own DTB; original PHY module, no hold three lid sleeps (39.0 s, 102 s, 12 min 16 s); dock in CIO mode at the first plug on all three ports after every wake
  • No apple_pcie_suspend_noirq failures in these boots.
  • Observed, not attributed:
    • Attempts aborted during entry, each retried about 10 s later with success: one in boot 3, and three in boot 5, each right after a lid close (one in the freezer, two before it).
    • Immediate entry/exit in boot 6: at 15:48:27, with no retry until the next sleep at 15:50:17; and at 15:53:03, retried at 15:53:13.
    • Once, after the second wake in boot 5, the first dock plug hit thunderbolt-apple-nhi 381f00000.nhi: 1:9: PCIe tunnel activation failed, aborting, and the dock had to be re-plugged. This was seen in no other boot.
  • Long unplugged sleep, power draw (boot 5, same kernel, arm64: dts: apple: t6050: keep the ATC usb-aon power domains on (J714s Type-C dead after s2idle) #2018's earlier PHY-hold module): one s2idle from 10:27:06 to a lid wake at 11:23:41, 56.6 min asleep (SMC: "lid open … at +3394513 ms in sleep"). There was no entry abort, and after the wake Wi-Fi reassociated and Bluetooth was on.
    • Battery gauge (SMC energy_now): 85 % → 81 %, 52.13 → 50.28 Wh, so 1.85 Wh over 0.95 h = 1.95 W average.
    • This is one run. It is gauge-based, and the interval includes about 1 min awake around the lid close and open.
    • For scale:
      • this machine awake, in light use, drew about 12–15 W: 13.97 W at 08:18:34 and 12.30 W at 08:26:35, single readings of /sys/class/power_supply/macsmc-battery/power_now on battery, not an idle-controlled measurement;
      • the M4 Max J616C's s2idle is reported at 1.83 W over 8.48 h, with the lid closed and unplugged, and the same report puts macOS sleep at about 0.1 W. Source: the J616C sleep entry by AxxzyWasTaken in the Aurora support site's feature reports (aurora-silicon/aurora-silicon.github.io, src/data/feature-reports.json).

Build: drivers/pci/controller/pcie-apple.o at this head, LLVM, W=1, the running kernel's config: no warnings. checkpatch: one line over 75 characters, a quoted log line in the commit message.

Not tested:

  • This exact head on hardware. Merged into current integration/aurora, pcie-apple.c is byte-identical to the tested file apart from the comment.
  • Nothing longer than about 67 min (no overnight run).
  • Deep sleep: unreachable on the J714s today, and the allowlist applies to s2idle only.

A second J714s (TripleU613, report on #2018): integration/aurora c0a2a75 + #1647 + this commit (af590f044ca2) + #2018's earlier PHY-hold version (ad7f44429aab) on the omarchy-m5 v272-12 series (with #1789), CONFIG_APPLE_SOC_SLEEP off. Two lid s2idle cycles (about 3 s and 3 min 37 s), suspend_stats 2/0. After the wakes the panel, Wi-Fi, Bluetooth, audio and speaker protection were back, and on the left-front and right ports a charger and a USB device worked. No dock, long sleep or repeated cycles were tried there.

To run before merge

… link

The adopted link's suspend check admits only the J716c; the K116s is its
OLED sibling with the same T6050 host and the N1 on port 0, and the
first s2idle attempt there failed with -EBUSY from the noirq suspend.
Let it through the same checks.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
[thomas: rebased onto integration, where the check also admits the K114c]
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The adopted-link s2idle check walked the whole bus and refused to suspend
when any device had left D0. With a kernel-trained second port (the SD
reader on the K116s) the PCI core puts that root port into D3hot, and
suspend failed with -EBUSY. Below a port Linux trained itself, only the
devices that asked to stay awake need to remain in D0; the PCI core
restores the rest. Below a port the boot loader trained, such as the
N1's, every device must still be in D0, so the J716c and the K114c, whose
only port is adopted, are checked as before.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
[thomas: skip only devices below a port Linux trained (port->pwren), so
 adopted ports keep requiring D0 for every device]
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
… link

The adopted-link check admits the J716c, the K114c and the K116s. The
J714s (MacBook Pro 14", M5 Pro) has the same T6050 host as the K116s,
with the N1 on port 0, and every s2idle there failed in the noirq
suspend:

  pcie-apple 1cb0000000.pcie: PM: dpm_run_callback(): apple_pcie_suspend_noirq returns -16
  pcie-apple 1cb0000000.pcie: PM: failed to suspend noirq: error -16

Like the K116s, the J714s has its SD card reader (a GL9755) on port 1,
which the boot loader leaves down and Linux trains itself. The previous
commit lets the devices below such a port leave D0 over s2idle, which
the check needs on this board too.

Add the J714s to the list. For a clean wake it also needs the PMP's
power domains kept on ("arm64: dts: apple: t6050: keep the PMP's power
domains on"), and for the Type-C ports to work after the wake, the ATC
usb-aon domains kept on ("arm64: dts: apple: t6050: keep the ATC usb-aon
power domains on").

Signed-off-by: Isaac Duarte <31712685+Isaac-Duarte@users.noreply.github.com>
@Isaac-Duarte
Isaac-Duarte force-pushed the j714s/s2idle-allowlist branch 2 times, most recently from 212a562 to af590f0 Compare November 15, 2026 20:34
@TripleU613

Copy link
Copy Markdown
Contributor

Test report from a second J714s (MacBook Pro 14", M5 Pro), for #1647 + #2012 + #2018 together.

Thank you all for this, it's the first time this machine has had a working lid sleep here.

🤖 Generated with Claude Code

@Isaac-Duarte
Isaac-Duarte force-pushed the j714s/s2idle-allowlist branch from af590f0 to 56b0205 Compare November 15, 2026 23:08
@DjDeveloperr
DjDeveloperr merged commit e2ec065 into aurora-silicon:integration/aurora Nov 16, 2026
1 check passed
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.

4 participants