Skip to content

soc: apple: sleep: Enable T6020 deep sleep by default - #4227

Closed
DjDeveloperr wants to merge 1 commit into
mainfrom
feat/t6020-sleep-default
Closed

DjDeveloperr wants to merge 1 commit into
mainfrom
feat/t6020-sleep-default

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What

Drop .untested = true on t6020_sleep_soc in drivers/soc/apple/sleep-t6020.h, update apple_sleep_test_known_profiles in drivers/soc/apple/sleep-test.c to expect !soc->untested for apple,t6020-sleep, and update drivers/soc/apple/Kconfig help text so T6020 (M2 Pro) deep sleep is offered and selected by default without apple_sleep.deep=1 or apple_sleep.untested_commit=1.

All follow-ups from #3999 review (6175485736) are closed on main (c77250fb4a9d):

Tested

  • Static & build checks on 7b7afa6263a4:
    • scripts/checkpatch.pl --strict --git HEAD~1..HEAD: 0 errors, 0 warnings, 0 checks (51 lines checked).
    • ARCH=arm64 LLVM=1 W=1 drivers/soc/apple/sleep.o with CONFIG_APPLE_SOC_SLEEP_KUNIT_TEST=y: 0 warnings.
  • Hardware qualification row on J414s (Mac14,9, M2 Pro 10-core, T6020, OS firmware 27.2, m1n1/boot.bin sha256 196da4c690882ac64a70932e2dbb5affa0828e533117c975633e1b6705a9bd38):
    • Kernel: 7.3.0-j414s-qual-c772 (main c77250fb4a9d, tree a27800eeb800, build ID 06dd9b583c8d98644179c91acc7fb402d629a978, Image sha256 9ef2ec2b0a1eeee22d2c4f9f57513bfc7de906e6c13e7d7de832c9860dc5f271, stock config + DTB).
    • Boot ID: 1cb03ed8-85e9-4c73-a4b0-4d24252fb624, Apple SoC Watchdog + systemd dead-man timer armed throughout and disarmed cleanly.
    • 4/4 sleeps in one boot (suspend_stats = 4/0, zero resets, BAD_LINES = 0, taint unchanged 4 -> 4):
      1. s2idle (rtcwake -d /dev/rtc0 -m freeze -s 15) with default appledrm.s2r_untested=Y (appledrm.s2r_untested omitted from /proc/cmdline, sysfs parameter read Y; internal 389c00000.dcp + external 289c00000.dcp and 315c00000.dcp bound): GPU held for sleep: submitted=2083 completed=2083 pending=0 -> GPU released after sleep: running=Ok(0) pending=0; post-wake panel 117/500, eDP-1 connected/enabled/On, kwin_wayland 3024x1964, kscreen-doctor --dpms off/on (Off bl=0 -> On bl=117), dEQP-VK.api.smoke.* 8/8, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi wld0 up.
      2. Deep sleep mux: apple-display-crossbar: replace the T602x selector fields instead of OR-ing them #1 (rtcwake -d /dev/rtc0 -m mem -s 20) after Vulkan GPU load (dEQP-VK.api.smoke.* 8/8 pre-sleep): boot object resumes 0 -> 1, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 7457 us (pending=0); post-wake dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.199 s / 44.1 kHz 2.100 s (rc=0), panel 117/500 eDP-1 On, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
      3. Deep sleep drm/apple: release a stale DPTX link before borrowing a Type-C route #2 (rtcwake -d /dev/rtc0 -m mem -s 20) after internal-panel DPMS off/on (Off bl=0 -> On bl=117 pre-sleep): boot object resumes 1 -> 2, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 3350 us (pending=0); post-wake dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.197 s / 44.1 kHz 2.084 s (rc=0), panel 117/500 eDP-1 On, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
      4. Deep sleep HID: haptics for the Apple SPI trackpad #3 (rtcwake -d /dev/rtc0 -m mem -s 20, consecutive): boot object resumes 2 -> 3, sep 0x1000030f (0), both PCIe ports link back, PWREN and PERST# cycled as at probe, apple_sep back, GPU fw 27.2 back in 3040 us (pending=0); post-wake DPMS Off bl=0 -> On bl=117, dEQP-VK.api.smoke.* 8/8, timed audio 48 kHz 2.197 s / 44.1 kHz 2.071 s (rc=0), apple_sep live keyctl trusted-key SEP_SEAL_UNSEAL_OK bytes=226, panel 117/500 eDP-1 On, PCIe identical (0 dead), NVMe O_DIRECT rc=0, Wi-Fi up.
    • Clean stock return verified (7.3.0-47.fc45.aurora.aarch64, boot b41bdc32-3f5e-4715-b01b-bf3cf76e8569).
    • Archive: work/j414s-qual-c772-20261203/ (SHA256SUMS).

Risk

Two-way. Re-adding .untested = true (or passing mem_sleep_default=s2idle) reverts T6020 to s2idle default immediately. Scoped strictly to t6020_sleep_soc (apple,t6020-sleep); other SoCs are untouched.

Not yet

  • Qualified on J414s (10-core M2 Pro, T6020, OS firmware 27.2); not yet tested on J416s (16-inch M2 Pro) or J474s (Mac mini M2 Pro).
  • This commit itself (7b7afa6263a4) has not yet been booted directly on hardware without apple_sleep.deep=1 apple_sleep.untested_commit=1; hardware qualification above ran on its exact parent c77250fb4a9d with those flags enabled.

Drop the .untested gate on t6020_sleep_soc so deep sleep is offered and
selected by default on T6020 (M2 Pro) without apple_sleep.deep=1 or
apple_sleep.untested_commit=1, and update the KUnit profile expectation
and Kconfig help text.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 3, 2026 20:42
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m2 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Merge readiness at 7b7afa62: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, pr-text / pr-text, KUnit plan
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 7b7afa62, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · . Re-adding .untested = true (or passing mem_sleep_default=s2idle) reverts T6020 to s2idle default immediately. Scoped strictly to t6020_sleep_soc (apple,t6020-sleep); other SoCs are untouched.

Areas: area:platform

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

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Superseded by #4228 (per-board apple,sleep-tested; in t6020-j414s.dts instead of dropping .untested globally for all T6020 boards).

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:m2 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant