Skip to content

soc: apple: sleep: T8122: deep sleep by default on J613 - #3760

Merged
satchlj merged 9 commits into
mainfrom
fix/t8122-deep-sleep-tested
Dec 3, 2026
Merged

satchlj merged 9 commits into
mainfrom
fix/t8122-deep-sleep-tested

Conversation

@satchlj

@satchlj satchlj commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

What: deep sleep by default on the M3 MacBook Air 13" (J613, T8122): no apple_sleep.deep=1 and no apple_sleep.untested_commit=1 on the command line. Required for daily-use deep sleep on J613 on the default command line.

T8122's sleep data is marked untested in the driver, which does two things: deep sleep is offered only with apple_sleep.deep=1 and is never the default, and every sleep stops at a dry run before the commit unless apple_sleep.untested_commit=1. Rather than flipping the entire T8122 family before every board is verified, the board devicetree declares when deep sleep is verified on that machine:

  1. dt-bindings: soc: apple: sleep: add apple,sleep-tested: a boolean on the sleep node.
  2. soc: apple: sleep: take the untested opt-ins off a node with apple,sleep-tested: on a SoC marked untested, a node with the property gets deep sleep offered, as the default mem_sleep, and committing. It runs exactly the steps a sleep runs today with both parameters set. What derived data needs regardless (PMU step notes, the T8142 last-WFI stub and probe reports) stays keyed on the SoC. A node without the property keeps today's behaviour, including a DT from an older boot loader.
  3. arm64: dts: apple: t8122-j613: sets apple,sleep-tested on &sleep in arch/arm64/boot/dts/apple/t8122-j613.dts (inherited by t8122-j613-25g83.dts). Neither t8122-j615.dts nor t8122-j615-25g83.dts receives it.

Default mem_sleep: this PR covers it. The driver already makes deep the default sleep state for any SoC it doesn't treat as untested (suspend_set_ops(), then it demotes to s2idle only when untested). So on a node with apple,sleep-tested, mem_sleep reads s2idle [deep] and a plain systemctl suspend sleeps deep. mem_sleep_default=s2idle still picks s2idle.

Depends on: #3504 (M3 GPU firmware-driven deep sleep), #3590 (audio clocks across deep sleep), and #4037 (T8122 V27 DCPext DART save/restore & ext_idle) — all merged and included in this head (83a3357be3f9, merged cleanly onto main bbb91e2a416d).

Tested:

  • DT / static checks at 83a3357be3f9: compiled all four J613/J615 DTBs and verified /soc/sleep-controller@2d0700000:
    • t8122-j613.dtb: apple,sleep-tested present (sha256: b1376ddc0f3df5c67531a4b3169bcb94f1b6cc473e8c2c34b6f23bf4f0383433)
    • t8122-j613-25g83.dtb: apple,sleep-tested present
    • t8122-j615.dtb: absent
    • t8122-j615-25g83.dtb: absent
  • 27.2 stub J613 (MacBook Air 13" M3, T8122) hardware row at exact head 83a3357be3f9 (26B123, mBoot-20457.41.3, default command line — no apple_sleep.* params): PASS
    • Boot: /proc/device-tree/soc/sleep-controller@2d0700000/apple,sleep-tested present; /sys/power/mem_sleep defaulted to s2idle [deep]; apple-sleep logged sleep data derived for this SoC, through full sleeps and wakes on this machine (apple,sleep-tested) and deep sleep is the default: boot object resumes 0; 0 failed units.
    • 3/3 consecutive default deep sleeps (rtcwake -d rtc1 -m mem -s 15): boot object resumes 0 -> 1 -> 2 -> 3, wake NUB.SPMI0.SW3, 156 of 224 AP pins restored every wake, apple-dcp V27 wake plain-on 0@23, aurora-g16 GPU firmware back in 1165 us / 1215 us / 1157 us, Borealis glmark2-es2-drm 1718 / 1720 / 1727 FPS (vulkaninfo Apple M3 G15G C0 / Borealis), 48 kHz & 44.1 kHz silent audio capture timing 4033/4017, 4025/4023, 4024/4025 ms, Wi-Fi UP, 0 failed units.
    • 1/1 s2idle (rtcwake -d rtc1 -m freeze -s 12): suspend_stats: success=4 fail=0, Borealis 2256 FPS, audio capture 4031/4041 ms, Wi-Fi UP, 0 failed units.
    • 0 Oops / BUG / WARN / Call Trace / GPU faults / DART faults / EDAC errors; 0 xART diffs before/after trial and back on permanent default.
  • 27.2 control rows without apple,sleep-tested (posted in comments below, same sleep.c and binding):
    • J773g (M4 Mac mini, T8132, 27.2 stub): PASS (mem_sleep unchanged [s2idle]).
    • J615 (MacBook Air 15" M3, T8122, 27.2 firmware): PASS (mem_sleep unchanged [s2idle]).

Risk: two-way · J613 (27.2 and inherited 25G83 DTBs) only (a plain revert restores the opt-ins). Every other Mac, including J615 (27.2 and 25G83), is unchanged. Only a DT built from this tree carries the property, so a machine changes behaviour once its boot loader's devicetree includes it.

Not yet:

  • Long sleeps and energy drain (every wake in this row was a 15 s RTC wake).
  • Wakes other than the RTC (lid, keyboard, power button).
  • External displays across a deep sleep.
  • Other T8122 boards (J615 does not set apple,sleep-tested in this PR).
  • Audio playback after a wake (only silent capture clock timing was measured).

The sleep driver keeps a SoC whose sleep data is derived behind two
opt-ins: deep sleep is offered only with apple_sleep.deep=1, and every
sleep stops before the commit unless apple_sleep.untested_commit=1.
Whether a full sleep and wake works also depends on the firmware a
machine runs, which the devicetree profile already describes, so let the
node say when that machine has been through them.

Signed-off-by: Satya Benson <satya@benson.earth>
…eep-tested

On a SoC marked untested, a node with apple,sleep-tested gets deep sleep
offered and as the default sleep state, and its sleeps commit, with no
command-line parameter. It runs the same steps a sleep runs today with
apple_sleep.deep=1 and apple_sleep.untested_commit=1.

What derived data needs regardless of the opt-ins stays keyed on the
SoC: the PMU step notes and the T8142 last-WFI stub and probe reports.

A node without the property, including one from an older boot loader's
devicetree, keeps today's behaviour.

Signed-off-by: Satya Benson <satya@benson.earth>
The J613 on the 25G83 (26.6) firmware has been through repeated full
deep sleeps and wakes on the T8122 sleep path: 15 of 15 with no reset,
the GPU, audio clocks and display coprocessor back after each. Mark the
sleep node apple,sleep-tested in that firmware profile, so deep sleep is
the default and commits without apple_sleep.deep=1 or
apple_sleep.untested_commit=1.

The 27.2 profiles do not carry it: on the J615 with 27.2 firmware a
committed sleep is still reset after the commit.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

Conflict-only rebase onto current main (645b086d9989) to resolve conflicts in apple,t8140-sleep.yaml (adjacent to apple,nco) and drivers/soc/apple/sleep.c (binned-part fewer_cpus and soc->derived split).

Old head: c1efd0c9e51f
New head: 06284a2c1323

Pulls in merged #3504 (M3 GPU deep sleep), #1490 (J613 USB4), and #3865.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Merged main (4f205524bacb, now including merged #3504, #1490, and #3865) into the branch (06284a2c1323 -> f039f2782821, zero conflicts, PR diff unchanged). Next: run the default-command-line J613 deep-sleep row at f039f2782821 before promoting from draft.

Pulls in merged #3504 (M3 GPU firmware-driven deep sleep) and recent main commits.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Merged current main (971fa22e9692, including merged #3504 for M3 GPU firmware-driven deep sleep) into the branch -> head 574954eb4051. PR diff is unchanged (3 files). Building and running the exact-head default-command-line J613 deep-sleep + s2idle verification row now.

@satchlj

satchlj commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Row: 574954eb4051 + J613 (MacBook Air 13" M3, T8122, 25G83 / 26.6.2 firmware, non-debug config, exact default command line — no apple_sleep.deep / apple_sleep.untested_commit, DTB from this head) + PASS:

  • Boot check: /proc/device-tree/soc/sleep-controller@2d0700000/apple,sleep-tested present; /sys/power/mem_sleep defaulted automatically to s2idle [deep]; apple-sleep logged sleep data derived for this SoC, through full sleeps and wakes on this machine (apple,sleep-tested) and deep sleep is the default: boot object resumes 0.
  • Baseline: Borealis (Apple M3 (G15G C0), Mesa 26.3.0-devel (git-07f2c6c04c), Vulkan 1.4.363), glmark2-es2-drm offscreen 1005 FPS (Score: 1004), /sys/kernel/debug/asahi-m3/progress 470 -> 1483 (+1013, healthy=1), wlan0 UP, AppleJ613 audio present, 0 failed units.
  • 3/3 consecutive default deep sleeps (rtcwake -d rtc1 -m mem -s 15, plain mem selecting default [deep]):
    • Wake 1: boot object resumes 0 -> 1, wake NUB.SPMI0.SW3, 156 of 224 AP pins restored, M3 GPU firmware back in 3179 us, Borealis glmark2 968 FPS (Score: 967), progress 1517 -> 2492 (+975, healthy=1), wlan0 UP, audio present, 0 failed units.
    • Wake 2: boot object resumes 1 -> 2, M3 GPU firmware back in 943 us, Borealis glmark2 942 FPS (Score: 941), progress 2531 -> 3479 (+948, healthy=1), wlan0 UP, audio present, 0 failed units.
    • Wake 3: boot object resumes 2 -> 3, M3 GPU firmware back in 3489 us, Borealis glmark2 974 FPS (Score: 973), progress 3515 -> 4495 (+980, healthy=1), wlan0 UP, audio present, 0 failed units.
  • 1/1 s2idle (rtcwake -d rtc1 -m freeze -s 12): suspend_stats: success=4 fail=0, Borealis glmark2 990 FPS (Score: 989), progress 4519 -> 5515 (+996, healthy=1), wlan0 UP, audio present, 0 failed units.
  • dmesg: 0 Oops / BUG / WARN / Call Trace / GPU faults / EDAC errors.

Ready for review now that #3504 has merged and the exact-head default-command-line row is in.

@satchlj
satchlj marked this pull request as ready for review December 2, 2026 07:50
@satchlj
satchlj requested review from a team as code owners December 2, 2026 07:50

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes at 574954eb4051. The mechanism is good. The board it's switched on for is the problem.

The code is fine. Without apple,sleep-tested, s->untested is exactly soc->untested, so every place that reads it keeps today's behaviour: apple_sleep_valid(), the mem_sleep default demotion in probe, dry_run in .begin, the stop in .enter and apple_sleep_dry(). Apart from where s->untested is set and the new log line, nothing reads soc->untested any more. The binding is a plain boolean under additionalProperties: false. A DT property is also how Ryan's no-board-gates rule wants this done. I wouldn't change anything in sleep.c or the yaml.

Blocker 1: scope is 27.2 only for the M3 Air. Ryan ruled on 12-02 that the 27.2-only rule applies per machine. Models already on the 27.2 stub, the M3 Air among them, get rows, merges and PR scope on 27.2 only. A 25G83 row doesn't count as proof for them, and a change that only matters on 25G83 is out of scope. J613's 27.2 board file is arch/arm64/boot/dts/apple/t8122-j613.dts. t8122-j613-25g83.dts is that file plus t8122-j613-dcp-25g83.dtsi. So:

  • drop the &sleep hunk from t8122-j613-dcp-25g83.dtsi;

  • put it at the end of t8122-j613.dts:

    /* Through full sleeps and wakes: deep sleep by default. */
    &sleep {
    	apple,sleep-tested;
    };
    
  • post an exact-head row from the J613 booted on the 27.2 stub. Use the same shape as your 25G83 row: the default command line, mem_sleep reading s2idle [deep], 3 default deep sleeps and 1 s2idle, GPU/Wi-Fi/audio back after each wake, 0 failed units, and no Oops, WARN or GPU faults.

Blocker 2: the J615 gets it with no row. t8122-j613-dcp-25g83.dtsi is also included by t8122-j615-25g83.dts, the experimental J615 profile. At this head that J615 gets deep sleep as the default, committing, and it has never been slept. (#3413 is the J615 resetting after a committed sleep on 27.2.) Moving the property into t8122-j613.dts fixes this as well, because no J615 file includes it.

I checked both placements on pc (CHECK_DTBS, LLVM, dtschema 2026.9). There were 0 warnings in either case:

DTB has the property at this head after moving it to t8122-j613.dts
t8122-j613.dtb (27.2) no yes
t8122-j613-25g83.dtb yes yes
t8122-j615.dtb (27.2) no no
t8122-j615-25g83.dtb yes no

t8122-j613-25g83 still inherits the property after the move. That's harmless, and your row already covers it.

If the 27.2 J613 doesn't make it through committed sleeps yet (#3413 may hit it too), keep this as a draft. The binding and driver change should land with the first 27.2 board that uses them, not on their own.

Checks at 574954eb4051. Hosted apple-build, dt-checks, host-tests and KUnit plan are green at this head. On pc I also ran these:

  • dt_binding_check on apple,t8140-sleep.yaml: clean;
  • CHECK_DTBS on the four J613/J615 DTBs: 0 warnings;
  • drivers/soc/apple/sleep.o (asahi config, LLVM): builds with no warnings;
  • the KUnit planner on these three files: no suites;
  • tools/asahi/sep-suspend-errors-tests.py, which reads sleep.c: 7/7.

Rows needed to merge:

  • J613 on the 27.2 stub at the new head (yours), as above.
  • J773g (M4 mini, 27.2) control, which we'll run. sleep.c is shared and T8132 goes through the same probe, .valid and .begin paths, so the row checks that /sys/power/mem_sleep and the apple-sleep probe lines match main and that one default deep sleep wakes clean. If the new head changes only the J613 DTS, a run at 574954eb4051 still counts, since the sleep.c and binding commits stay the same.

Once the property moves, the title and the Risk line need updating too ("25G83 firmware" becomes 27.2 J613).

Move apple,sleep-tested from t8122-j613-dcp-25g83.dtsi to
t8122-j613.dts so J613 enables default deep sleep on the 27.2 board
devicetree (with t8122-j613-25g83.dts inheriting it) and
t8122-j615-25g83.dts no longer inherits the property without a row.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj satchlj changed the title soc: apple: sleep: T8122: deep sleep by default on the 25G83 firmware soc: apple: sleep: T8122: deep sleep by default on J613 Dec 2, 2026
@satchlj
satchlj marked this pull request as draft December 2, 2026 08:28
@satchlj

satchlj commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Thanks for the review and for catching the J615 25G83 leak.

Pushed cea9f3c8f46e on top of 574954eb4051 (so the sleep.c and binding commits are unchanged):

  • Dropped &sleep { apple,sleep-tested; }; from arch/arm64/boot/dts/apple/t8122-j613-dcp-25g83.dtsi and added it at the end of arch/arm64/boot/dts/apple/t8122-j613.dts.
  • Verified compiled DTBs: t8122-j613.dtb and t8122-j613-25g83.dtb carry apple,sleep-tested; t8122-j615.dtb and t8122-j615-25g83.dtb do not.
  • Updated the PR title and description for J613 (27.2), and moved the PR back to draft until an exact-head 27.2-stub J613 row (and the J773g 27.2 control row) land.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Row: cea9f3c8f46e9d18d4d5c8371dfbdee86483d2f2 + J773g (Apple M4 Mac mini, T8132, 27.2 stub) + PASS (27.2 control without apple,sleep-tested).

  • Boot: 7.3.0-j773g-pr3760-cea9f3c8 (boot_id=bcd513bb-4b34-44c7-a745-74f2a863eb71), exact-head t8132-j773g.dtb (01a14be2..., apple,sleep-tested absent), default cmdline (no mem_sleep_default or apple_sleep.* overrides).
  • /sys/power/mem_sleep: s2idle [deep] — identical to stock 7.3.0-ARCH-m4main-6c83a2a6 (boot_id=21564087-69fe-448d-be51-ec60300e9bc4).
  • apple-sleep probe lines (byte-for-byte identical to stock, no (apple,sleep-tested) suffix, 0 new sleep.c probe messages):
    • apple-sleep 380700000.sleep-controller: no PCIe tunables for ANS: suspend-to-RAM with it stopped will be refused
    • apple-sleep 380700000.sleep-controller: deep sleep is the default: boot object resumes 0
  • Suspend/resume: rtcwake -d /dev/rtc1 -m mem -s 8 entered PM: suspend entry (deep) and cleanly refused before commit on the pre-existing J773g 27.2 no tunables to bring ANS's PCIe block back check (PM: suspend exit); rtcwake -d /dev/rtc1 -m freeze -s 5 (s2idle) suspended and woke cleanly (RC=0).
  • Health: 0 failed systemd units, 0 Oops/BUG/WARNING lines.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Row: cea9f3c + J615 (MacBook Air 15" M3, T8122, macOS 27.2 firmware) + default cmdline + PASS (27.2 control without apple,sleep-tested).

  • Exact-head kernel 7.3.0-aurora-b7s3760 (fleet94 config), as a one-shot non-default entry with the saved entry's options unchanged (no apple_sleep.*). The J615's own Stage 2 DT was not changed.
  • The sleep node has no apple,sleep-tested. /sys/power/mem_sleep = [s2idle]. apple-sleep still says sleep data derived for this SoC, untested: deep sleep is off (apple_sleep.deep=1 offers it), and a sleep stops before the commit (dry run) and deep sleep available, not the default, the same as the production kernel.
  • s2idle 2/2 PASS (rtc0, 15 s; suspend_stats success 0 -> 2). Wi-Fi, BT, NVMe fine; 0 failed units; Enforcing; no oops; DCP/kernel error counts the same as production's boot.
  • Restored to the saved entry (verified).

So on a J615 with 27.2 firmware this PR changes nothing until the J615 tree carries the marker.

…tested

Signed-off-by: Satya Benson <satya@benson.earth>

# Conflicts:
#	arch/arm64/boot/dts/apple/t8122-j613.dts
@satchlj

satchlj commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

Row: 83a3357be3f9da7cb4779b93387b8cc922d31b64 + J613 (MacBook Air 13" M3, T8122, macOS 27.2 / 26B123, mBoot-20457.41.3) + default cmdline + PASS

Merged origin/main (bbb91e2a416d, including merged #4037 1dd48899bb34 and #4052 bbb91e2a416d) cleanly into fix/t8122-deep-sleep-tested (83a3357be3f9); the sleep.c and binding commits are unchanged and git diff origin/main..HEAD remains strictly the three expected files (apple,t8140-sleep.yaml, t8122-j613.dts, drivers/soc/apple/sleep.c).

  • Offline DTB check at 83a3357be3f9:
    • t8122-j613.dtb: apple,sleep-tested present (sha256: b1376ddc0f3df5c67531a4b3169bcb94f1b6cc473e8c2c34b6f23bf4f0383433)
    • t8122-j613-25g83.dtb: apple,sleep-tested present
    • t8122-j615.dtb: absent
    • t8122-j615-25g83.dtb: absent
  • Boot (7.3.0-1-pr3760-ARCH, exact-head t8122-j613.dtb, exact default command line — zero apple_sleep.* params):
    • /proc/device-tree/soc/sleep-controller@2d0700000/apple,sleep-tested: present
    • /sys/power/mem_sleep: s2idle [deep]
    • dmesg:
      • apple-sleep 2d0700000.sleep-controller: sleep data derived for this SoC, through full sleeps and wakes on this machine (apple,sleep-tested)
      • apple-sleep 2d0700000.sleep-controller: deep sleep is the default: boot object resumes 0
    • Pre-sleep baseline: 48/44.1 kHz silent audio capture 4023/4033 ms, Borealis glmark2-es2-drm 1762 FPS (vulkaninfo: Apple M3 G15G C0 / Borealis), Wi-Fi UP, 0 failed units.
  • 3/3 consecutive default deep sleeps (rtcwake -d rtc1 -m mem -s 15):
    • Cycle 1: boot object resumes 0 -> 1, wake NUB.SPMI0.SW3, 156 of 224 AP pins restored, V27 DCP wake plain-on 0@23, aurora-g16 GPU firmware back in 1165 us, audio capture 4033/4017 ms, Borealis 1718 FPS, Wi-Fi UP, 0 failed units.
    • Cycle 2: boot object resumes 1 -> 2, wake NUB.SPMI0.SW3, 156 of 224 AP pins restored, V27 DCP wake plain-on 0@23, aurora-g16 GPU firmware back in 1215 us, audio capture 4025/4023 ms, Borealis 1720 FPS, Wi-Fi UP, 0 failed units.
    • Cycle 3: boot object resumes 2 -> 3, wake NUB.SPMI0.SW3, 156 of 224 AP pins restored, V27 DCP wake plain-on 0@23, aurora-g16 GPU firmware back in 1157 us, audio capture 4024/4025 ms, Borealis 1727 FPS, Wi-Fi UP, 0 failed units.
  • 1/1 s2idle (rtcwake -d rtc1 -m freeze -s 12):
    • suspend_stats: success=4 fail=0, audio capture 4031/4041 ms, Borealis 2256 FPS, Wi-Fi UP, 0 failed units.
  • Cleanliness: 0 Oops / BUG / WARN / Call Trace / GPU faults / DART faults / EDAC errors; 0 xART diffs before/after trial and back on permanent default.

With #4037 merged, the 27.2 control rows (J773g and J615) green, and this exact-head 27.2 J613 default-cmdline row passing, moving #3760 out of draft and ready for review.

@satchlj
satchlj marked this pull request as ready for review December 3, 2026 06:15
@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (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 19dbc9db: not ready yet

Check Detail
CI at head ok 11 checks passed
Review ok approved by DjDeveloperr, RyanTheTide
Requested changes ok none
Hardware row at head no no line with the head SHA 19dbc9db, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · J613 (27.2 and inherited 25G83 DTBs) only (a plain revert restores the opt-ins). Every other Mac, including J615 (27.2 and 25G83), is unchanged. Only a DT built from this tree carries the property, so a machine changes behaviour once its boot loader's devicetree includes it.

Areas: area:platform

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

…tested

Signed-off-by: Satya Benson <satya@benson.earth>

# Conflicts:
#	drivers/soc/apple/sleep.c
@satchlj

satchlj commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

Merged origin/main (cff875630c61, #3629) cleanly into fix/t8122-deep-sleep-tested (83a3357be3f9 -> 19dbc9dbb3953c4a79dcad4166e62cc54dac2667): 2-line adjacency conflict in apple_sleep_probe() right after the s->untested log. git diff origin/main..HEAD is byte-identical to the verified head 83a3357be3f9 (3 files, +37/-10), and #3629's new !s->soc->derived check is a no-op on T8122.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 3, 2026

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The merge keeps the sleep-tested property on J613 only and preserves the base’s missing-parts check. T8122 is marked derived, so the new adjacent base check does not change the tested path. The J613 receipt on the immediately preceding head covers three default-command-line deep cycles and one s2idle, and J615 remains the no-property control.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving the code at 19dbc9dbb395. This answers our earlier change request. One thing is left before it merges: a J613 row at this head (below).

Our two blockers. The property now sits in t8122-j613.dts, not in the 25G83 dtsi, so the J615 no longer gets it. The J613 on the 27.2 stub passed 3/3 default deep sleeps and 1/1 s2idle at 83a3357be3f9.

Only the J613 changes. The head is current main (cff875630c61, with #3629) plus the three files. I built these DTBs from it:

DTB apple,sleep-tested
t8122-j613, t8122-j613-25g83 yes
t8122-j615, t8122-j615-25g83, j433, j434, j504 no
t6030-j516s, t8132-j713, t8132-j773g, t8140-j700 no

In sleep.c, s->untested can only differ from soc->untested on a node with the property. Only T8122 and T8112 are marked untested, and no T8112 file sets it. T8132 and T8140 go through the same code as on main, including #3629's missing-parts check.

What moved between 83a3357be3f9 and this head.

  • sleep.c: #3629's missing-parts check and its display_power_dt flag. The check is behind !s->soc->derived. T8122 is derived, so the J613 never runs it, and the flag is read only there.
  • The binding and t8122-j613.dts: unchanged.
  • The J613 DTB: #4064 moves the idle polling delay of six CPU thermal zones from 500 to 2000 ms.
  • The DART, radio, display-gate and DCP changes from main are for T8132 and T6031. The J613 has no managed-sids host, and T8122 doesn't set only_120hz_modes.

Checks on this exact tree. sleep.o at W=1 with WERROR (LLVM): no warnings. The 11 DTBs above build. dt-doc-validate (dtschema 2026.9) and yamllint on the binding: clean. Host tests pass: sep-suspend-errors 7/7, m3-sleep-steps 4/4, display-sleep-merge, dart-sleep power, snapshot and writer, tb-cio-sleep. Hosted apple-build, host-tests and dt-checks are green.

Still needed to merge: a J613 (27.2) row at 19dbc9dbb395, from satchlj. The merge policy carries a row over a merge of main only when the touched files don't conflict. I repeated this merge and sleep.c conflicts in apple_sleep_probe(), where the two checks meet. The resolution is right: it keeps both checks. But the row has to be run on it. The same shape as the last one is fine (default command line, 3 deep sleeps, 1 s2idle). Please don't merge main again before the row unless you have to.

Not blocking: the PR text says the J773g control row read [s2idle]. The row itself says s2idle [deep], same as stock. Please fix that line, and the head it names.

@github-actions github-actions Bot removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@satchlj
satchlj merged commit 6985e45 into main Dec 3, 2026
14 checks passed
@satchlj
satchlj deleted the fix/t8122-deep-sleep-tested branch December 3, 2026 06:48
@RyanTheTide

Copy link
Copy Markdown
Contributor

Row: 19dbc9d + J615 (MacBook Air 15" M3, T8122, macOS 27.2 / 26B123 stub) + default cmdline + PASS (with apple,sleep-tested added for J615 in a local test DTB; that line is now linux#4076)

  • Exact-head kernel 7.3.0-m3x3760 (fleet config minus display KUnit) as a non-default one-shot entry with the saved entry's options: no apple_sleep.*, no mem_sleep_default=. The head's own t8122-j615.dtb plus the one property, booted through a one-boot DT trial; the committed boot chain was not changed.
  • Probe: "sleep data derived for this SoC, through full sleeps and wakes on this machine (apple,sleep-tested)", "deep sleep is the default". mem_sleep at boot: s2idle [deep]. Params deep=N untested_commit=N.
  • 3 committed deep sleeps with the PMU RTC (rtc1, 20 s): boot object resumes 0 -> 1 -> 2 -> 3, wake NUB.SPMI0.SW3, 22-24 s each. Then 1 s2idle.
  • After each wake: eDP connected/enabled, backlight back, aurora-g16 health failed 0, Wi-Fi up with ping, 3 ALSA cards / 2 sinks. glmark2 after the cycles. 0 Oops/WARN, 0 GPU faults, 0 failed units, suspend_stats fail 0.
  • Seen, not from this change: one Bluetooth: hci0: command 0x0c01 tx timeout on wake 2 (Bluetooth powered afterwards); DCP firmware syslog lines at each wake with the panel back.

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) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants