Skip to content

soc: apple: sleep: T8142: no timed wake by default - #3134

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:j815/t8142-no-timed-wake
Nov 25, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:j815/t8142-no-timed-wake

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What: stop T8142 deep sleeps waking themselves after 30 s. apple_sleep.t8142_wake_s defaulted to 30, so every M5 deep sleep set the PMU's RTC compare 30 s after the commit: a closed lid or a menu suspend came back on its own after half a minute. It is a test knob (the sleep tests set it themselves); the default is now 0, which leaves the PMU's compare alone, so a sleep lasts until a key, the trackpad, the lid or the power button wakes it.
Tested: J815 (MacBook Air 15" M5) at 50bc7fab53cb, in the batched candidate m0d16l14n1/linux j815/prtest-r8 7b4bbe9, with no t8142_wake_s (or any other sleep word) on the command line: PASS. t8142_wake_s=0 as booted; the PMU alarm step left the compare as it was (compare 21158909, the same value as on the earlier boots); a plain systemctl suspend slept 185.3 s and woke on a key/trackpad touch, not on the timer. Earlier on r7, with apple_sleep.t8142_wake_s=0 passed by hand: 603.7 s until a key. Regression: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors after the wake, 0 WARN/BUG/Oops.
Risk: two-way door; T8142 (J813, J815) deep sleep only. apple_sleep.t8142_wake_s=N still asks for a timed wake.
Not yet: a J813 row at this head. The other defaults a plain M5 deep sleep needs are separate PRs (T8142 deep sleep by default; the Alpha handshake default, stacked on #2385).

Details

One commit, soc: apple: sleep: T8142: no timed wake by default: the parameter's default goes from 30 to 0, and the comment and description say what 0 does. The timed wake was added for the bring-up tests, which pass the parameter themselves.

Evidence

Candidate: m0d16l14n1/linux j815/prtest-r8 7b4bbe9 = j815/prtest-r7 d70fd05 (main a60fef7 + #2384 f9d03e8, #2385 b1c3392, #2192 c5daf57, #2193 8be9e73, #3123 822a1dd, #3124 1a272ce, #3125 4ad71b8, #3129 6d5ec4d, #3130 76bf36c and the open J815 PRs, unchanged) + j815/t8142-no-timed-wake 50bc7fa + j815/t8142-deep-default a8f7cec + j815/centauri-alpha-sleep-default f63bd68.
Command line, with no sleep words: console=tty0 user4k=on pcie_aspm=off idle=nop arm64.nowfxt plus the image's root/ESP words, apple_sep.xart_writes=0 apple_sep.provision_keybag=0 (removed from main, logged as unknown and ignored) and aurora.untested_commit=0 aurora.alphasleep=0 (stop the test initramfs setting the two opt-ins, so the kernel defaults are what run).

Boot 53a3b9b0:

apple_sleep/parameters/t8142_wake_s=0
PM: suspend entry (deep)
apple-sleep: T8142 PMU alarm after the timer: 0 (counter 21165559, compare 21158909)
Timekeeping suspended for 185.292 seconds
apple-sleep: wake source: MTP.DOCK.CHANNELS.AP0.IRQ

r7 (boot 9325546c, apple_sleep.t8142_wake_s=0 by hand): Timekeeping suspended for 603.654 seconds, wake source MTP.DOCK.CHANNELS.AP0.IRQ (a key).

apple_sleep.t8142_wake_s defaulted to 30, so every T8142 deep sleep set
the PMU's RTC compare 30 s after the commit and woke itself: a closed lid
or a menu suspend came back after half a minute. The timer is a test
knob (the sleep tests set it themselves), and with it at 0 the PMU keeps
its own compare and the sleep lasts until a key, the trackpad, the lid
or the power button.

Default it to 0. apple_sleep.t8142_wake_s=N still asks for a timed wake.

Signed-off-by: Nick <[email protected]>
@m0d16l14n1
m0d16l14n1 requested review from a team as code owners November 25, 2026 07:33
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 50bc7fab: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review ok approved by satchlj
Requested changes ok none
Hardware row at head ok in the PR body at 50bc7fab
Conflicts ok none
PR text ok Risk: two-way · T8142 (J813, J815) deep sleep only. applesleep.t8142wakes=N still asks for a timed wake.

Areas: area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 50bc7fab53cb
Blockers: none
Checked: diff, CI, hardware test row

Evidence
  • Code audit: t8142_timed_wake_secs defaults to 0 so normal sleep stays asleep indefinitely without arming the 12 s debug wake timer, while explicit module-parameter values remain capped at T8142_TIMED_WAKE_MAX_SECS.
  • Exact-head hardware row present on T8142 and all 25 CI checks passed (0 pending, 0 failed).

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Nov 25, 2026
@gig3m

gig3m commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

J813 (MacBook Air 13" M5) row at 50bc7fab53cb (#3134) and a8f7cec16bf6 (#3135), in m0d16l14n1/linux j815/prtest-r8 7b4bbe9 plus one local display-format patch (XRGB on the primary plane, for Hyprland). No sleep words on the command line: PASS.

  • Defaults as booted: mem_sleep s2idle [deep], "deep sleep is the default", deep=N untested_commit=N t8142_wake_s=0, nvme_apple.sleep_untested=N, appledrm.s2r_untested=Y.
  • Two plain systemctl suspends, internal panel only, Wi-Fi connected, woken by a key/trackpad touch (wake source MTP.DOCK.CHANNELS.AP0.IRQ). Each one: deep entry, 10 coprocessors stopped, PMU compare left as it was, 9 cores started in one burst, the radio's PCIe link retrained.
    • 20 s.
    • 4 min 48 s: no wake at 30 s.
  • After each: Wi-Fi reconnected (3/3 pings over Wi-Fi), Bluetooth powered, panel back. suspend_stats success=2 fail=0, 0 failed units, 0 kernel errors after the wakes, 0 WARN/BUG/Oops.

Not tested: external displays across a sleep (the DCPEXT point in the review), a lid-close sleep.

Assisted-by: LLM (Claude:Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants