Repository navigation
Conversation
3926193 to
abc6ee8
Compare
d808c54 to
b189876
Compare
c99d8b7 to
6deb620
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
Before this can merge, please reword the comments that name macOS driver classes and methods, mark steps as RE or decompile-verified, or say where a value was read. That covers mainly t6040-sleep.c, plus t6040-usb2.c, dcp.c and macsmc.c. Each comment should say what the hardware or firmware does: the register, the bits, the order, and what you measured on the J616s. Values and code can stay as they are.
2ce0d80 to
7aefde0
Compare
|
Done in 7aefde0, thanks for the pointer to #1625.
Rebased onto aea2deb on the way. Tested on the J616s on this head (suspend-to-RAM, hibernation, suspend-to-RAM again; details in the description). That round was on battery without the dock, so the external displays have not run on this head yet; I will add that run. What is left in |
|
Tested on a second J616s (M4 Pro, 24 GB, firmware of a macOS 27.0 install), Linux at EL2 under aura main 27298d21 (includes aura#148), kernel = integration + this series:
Four commits on top of 7aefde0 are on
Checks on that branch: universal config builds (both controllers =y, and each one off), sleep KUnit 6 pass / 1 skip, checkpatch --strict clean, s2idle 3/3 with no kernel errors and the deep rows above on the J616s, s2idle 3/3 on an M1 Pro and an M2 with no new kernel errors. |
…uspend The T6041 (M4 Max) has the AICv3 of T8122 and now a suspend-to-RAM driver of its own. Give "apple,t6041-aic3" its own info, the T8122 one with fw_suspend, so the AIC state the sleep loses is saved and put back as on T8140. Nothing else in the driver looks at fw_suspend. Also in aurora-silicon#1477 (T6040 sleep), which admits apple,t6041-aic3 the same way; drop this one when that lands. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
apple_nvme_t6040_hw is only matched by "apple,t6041-nvme-ans2". Give it the sleep fields T8140 uses: register ANS with the sleep core (sleep_traced), flush namespace 1 only, the OS's own, and send the full shutdown notification at suspend. The T6041 sleep driver stops ANS through the sleep core's coprocessor stop. On T6041 the sleep core's last check (the shutdown notification has completed) does not run: the T6041 driver calls only the coprocessor stop. Also in aurora-silicon#1477, which sets the same fields with sleep_untraced on the same struct; drop this one when that lands. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
The PMP's SRAM loses its contents in a real sleep. On the J616C's 26.6.2 firmware its __DATA segment is at 0x500761000, 0x7d000 bytes: back up (0x61000, 0x7d000) of the SRAM, as T8140 does for its own. Also in aurora-silicon#1477, whose HW_CFG_T6041 has the same range; drop this one when that lands. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
On apple,t6041, write the keys macOS writes last before MBSE slpa in a trace of its sleep: WKTP = 2 (AppleSMCEmbedded, going to sleep), then pmVC. The value written is 0x101, as the bring-up kernel runs it; the comment, taken over from it, says the trace has 0x100. That difference is open. Also in aurora-silicon#1477, which writes WKTP through a sleep_wktp parameter; drop this one when that lands. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
A conventional host (internal ports with the radio and the SD reader) loses its power in a real sleep: the endpoints sit unpowered or in reset behind a link that is down. On a firmware suspend, save what only the port registers hold; on the noirq resume, note which ports lost their link and keep a copy of their functions saved state before the PCI core spends it on the down link; in the normal resume phase (after the SMC, which owns the PWREN GPIOs) bring each such port up again as probe does, then restore its functions. Only for hosts that are not tunneled, have no managed SIDs, no PIO DMA supplier and more than a root bus; s2r_conventional turns it off. The suspend-to-idle paths (domain hold, adopted links) are unchanged. Also in aurora-silicon#1477 (0ab1a66), which this follows; drop this one when that lands. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
1599341 to
9bee928
Compare
|
Picked up, thanks for the second machine and the four commits. Head is f259e90 on integration/aurora 107b361 (the brcmfmac
If you would rather merge 9bee928 first and take the 35 commits as a second pull request, say so and I will split it there; they sit on top and nothing below them changed. On the J616s here, kernel from this head with Not verified: T8140 on the merged driver (its object differs from before only in the functions that now go through the part; a sleep on a T8140 would be welcome), and external displays, the dock and the kept USB hosts on this head. The USB3 miss on your dock port ("AP idle not acknowledged: -62") is under Open; I could not try for it without a dock. |
… K116s deep-sleep base Base: Jens Axboe's K116s series of 2026-11-12 (40 patches on integration/aurora 2b4523c), the tree his K116s runs at EL2. aurora-silicon#1477 brings the generic Apple SoC sleep driver with per-SoC parts (sleep.c, sleep-t6040.c) to start a T6050 part from. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
|
@fbalazsy thanks for picking up the fixups and folding the T6040 controller into sleep.c. To merge this we need:
|
|
Closing in favour of a stack of smaller pull requests, so that each subsystem can be reviewed and merged on its own. The commits are the ones of this pull request, restricted to each part's files and kept in the same order. The tree at the top of the stack (#1916) is identical to this pull request's tree at 59454c7. The hardware results above apply to that tree. Merge order:
Each part builds on its own and has its own checks. GitHub cannot stack pull requests from a fork, so each pull request also carries the commits of the ones before it; its description says which commits are its own. The open GPU item (a second hibernation started right after a resume) is described in #1915 and will get its own pull request. The review discussion stays here for reference. |
## Changed contracts M4 Pro (G16S) on the Borealis driver: the standing battery passes, with the backend fixes it found and its receipt. The one route change is on G16S only: the fused f16 decode SDPA arm no longer waits for the cooperative matrix there. The G16S decode defaults are not part of this PR. | Commit | Contract | |---|---| | elementwise: keep the f16 rsqrt source from being a bare widening on G16S | The f16 elementwise pipelines (sqrt, exp, rsqrt, normal, erfinv) compile on G16S. The AGX packer refused `rsqrt` of a bare f16 widening; the f16 variant ORs the operand bits with `params.dims >> 16` (always 0), so the value is bit-identical. Fixed 15 failing cases. | | quantized gemv group: form the token-multi route for rows > 1 | `dispatch_quantized_gemv_group` compared `node.size()` with `n`, so the multi-row route never formed. It now compares with `rows * n`, and the fused_chain test requires the route to form instead of comparing the composed route bit for bit (a 1-ulp flake). | | sdpa prefill: close the flash submission every 4e9 MACs, route oversized score bindings to flash; sdpa prefill flash: no submission split while a tape records | A 16384x8 flash prefill (~550 GMAC at ~50 GMAC/s) ran as one ~11 s submission past the per-job GPU timeout (`Error(110)`). The tile loop now commits every 4e9 MACs, except while a compiled tape records (`encoder.in_tape_recording`, as in `dispatch_qmm_tile`); a new case checks 3 commits eager vs 1 recorded, identical bits. Shapes whose score matrix exceeds `maxStorageBufferRange` take the flash kernel; under a capability simulation that branch refuses by name when the hardware lacks the kernel's workgroup and shared memory. | | sdpa decode f16 arm: no longer gated on the cooperative matrix; sdpa decode f16 arm: keep the cooperative-matrix gate outside G16S | The shader never used the cooperative matrix. On G16S only (`sdpa_decode_f16_without_coopmat_part` in `device.h`) the gate drops that clause; every other part keeps it. Decode SDPA f16 on G16S, us per call, composed -> fused: 1100 keys 586 -> 177, 4096 keys 1872 -> 308, 263 keys 254 -> 141, 37 keys 153 -> 124. bf16 unchanged. The capability-simulation backing check covers only the f16 arm, so `m1-stock-no-coopmat` on lavapipe is 10/10 again. | | tests: distributed ops load MPI at run time, gdn_bf16_state compiles, no latched statics | The distributed test detects an MPI loaded with dlopen; `test_gdn_bf16_state` compiles with GCC 16; `MLX_OMARCHY_GDN_PF` and `MLX_OMARCHY_GDN_STATE_F32` are read live. | | tests: stream-independence floor for Aurora Borealis | Two-stream overlap floor 0.80 when the driver id is Aurora Borealis (measured 0.83-0.93 over 8 runs, every copy byte-for-byte correct); every other driver keeps 0.95. The correctness checks are unchanged. | | tests: require the token-multi group to form on G16S only | The token-multi case requires a formed group on G16S, where its per-row bit identity is measured; other subgroup-32 parts report the count. | | shaders: round to f16 with an integer RNE conversion instead of packHalf2x16 | GLSL leaves the rounding of `packHalf2x16` implementation-defined, and a development Mesa build lowers it to round-toward-zero. `shaders/omarchy_half.h` adds `omarchy_f16_bits_rne` (integer RNE, 0 mismatches against the hardware conversion over all 2^32 float32 patterns); fused_chain, swiglu, fast_trio, qmm_vec, qmm_fma, sdpa_decode_native_p1 and cast_int use it. On G16S with the system Mesa the outputs are bit-identical to the `packHalf2x16` shaders and the time per call is the same within run-to-run spread (`rne-ab.txt`); M1/M2 not measured here. | | receipts: repo-relative test path in the token-multi stock Mesa log | `fused-chain-token-stock-mesa.txt` names `tests/omarchy/test_fused_chain.cpp`. | | qmm gemv group: epilogue sizes follow the rows * n node | The Add epilogue checks compare with `node.size()` (rows * n) and take the addend as the full (rows, n) residual or the (n) bias. Single-row groups check the same sizes as before; the token route builds no epilogue. | | shaders: include omarchy_half.h after the #extension directives | The header follows the last `#extension` in each of the seven shaders (in swiglu inside the f16 branch, its only user). | | tests: pin omarchy_f16_bits_rne and the f16 rsqrt operand | `omarchy_f16_rne_tests`: the header compiled as C++ against fixed IEEE half bits and CPU `astype(float16)` at 65504, 65519, 65520, 2^-14, 2^-24, 2^-25, normal and subnormal ties, quiet NaNs and -0, plus a strided sweep of the float32 bit space; on the GPU the same inputs through a strided float32 -> float16 astype (cast_int.comp) and the f16 rsqrt route. The GPU cases skip without a Vulkan device. | | receipts | `receipts/2026-11-13-m4-pro-g16s-gpu/`: battery, model runs, the dual-Mesa battery, the RNE A/B and the stock-Borealis pipeline sweep. | ## What ran The standing battery at 532bbb48 (this tree plus the f16 qmm cooperative-matrix shader change now in #437, which no suite reaches on stock Borealis, where the cooperative matrix is not exposed; a later battery of a tree containing this one ran 63 units with no failure) on stock Borealis `05ddb00f5c`, one process per suite plus the 8 capability-simulation profiles: 78 units, 1090 test cases, all pass. On `main` the same battery fails `primitive`, `fast_ops`, `fused_chain`, `compiled_tape` and `sdpa_decode_fused` on the f16 `rsqrt` packer refusal, `distributed` on the MPI check, the 16384x8 flash prefill on the GPU timeout, two capability-simulation profiles on the f16 decode gate, and `test_gdn_bf16_state` does not compile with GCC 16; the commits above fix each of these. `omarchy_ane_runtime_tests` links the libane runtime sources and is not built here, as on `main`. On a356ccd with the same Mesa: `omarchy_f16_rne_tests` 4/4 (12408 assertions), `fused_chain` 42/42, `fast_ops` 52/52, `matmul_family` 46/46, `primitive` 107/107, `sdpa_decode_fused` 7/7, `copy_offset` 29/29, `qmv_batch` 4/4, `fast_regression` 2/2, `runtime` 60/60, `eq_math` 7/7, `sdpa_prefill_flash` 16/16. ## Hardware | | | |---|---| | Machine | MacBook Pro 16-inch, M4 Pro (J616s, T6040), 14 CPU cores, 48 GB | | GPU | `Apple M4 Pro (G16S B1)`, subgroup 32, 32 KiB shared memory, `maxStorageBufferRange` 2 GiB - 1, no `VK_KHR_cooperative_matrix` | | Driver | Mesa 26.3.0-devel `git-05ddb00f5c`, Borealis, Vulkan 1.4.363 | | Kernel | Linux 7.3.0, aurora-silicon/linux `integration/aurora` with the J616s series of aurora-silicon/linux#1477 | | Toolchain | GCC 16.1, glslc 2026.4, Python 3.14.9 | ## Mesa and the opt-in routes Stock Borealis `05ddb00f5c` builds and runs the opt-in routes the suites reach, the multi-token GEMV included (the token-multi case dispatches `qmm_vec_q4_multi_token4_subgroup_bf16` and `..._token8_subgroup_bf16`; raw log in `fused-chain-token-stock-mesa.txt`). `shaders-refused-stock-borealis.txt` comes from a standalone pipeline sweep with other device features and a fixed layout; it is not a list of backend refusals. No Mesa change is needed for anything measured here. ## Related - The f16 qmm cooperative-matrix fix of #425 (7d7bdb0) is not in this PR: it is #437, on top of #429 (@RyanTheTide) as asked in the #429 review. - aurora-silicon/mesa#319 (the cooperative matrix default on the M4 Pro and fixes for the two compile refusals the battery found with #275) and aurora-silicon/mesa#299 (@RyanTheTide, the same default across the AGX3B ISA) are the Mesa side. The backend default in 4a9a827 only sets `ASAHI_AGX3B_COOPERATIVE_MATRIX=1` when the variable is unset, so it changes nothing once either lands. - #411 (@RyanTheTide, register-blocked f32 tile without a cooperative matrix) merges cleanly with this branch. - Replaces the backend fixes of #425, which is closed. The ANE lane 3 is #438. The G16S decode defaults and split-K rows of #425's follow-up work come in a separate PR after their measurements.
…merges aurora-silicon#1941 brought a second copy of struct dcp_s2r_layout (this tree had it from the J815 sleep work); aurora-silicon#1808 names nvme's sleep_traced, which this tree calls sleep_coproc (with sleep_untested, from the aurora-silicon#1477 rework). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
…shuaswarren#439) ## Changed contracts M4 Pro (G16S) on the Borealis driver: the standing battery passes, with the backend fixes it found and its receipt. The one route change is on G16S only: the fused f16 decode SDPA arm no longer waits for the cooperative matrix there. The G16S decode defaults are not part of this PR. | Commit | Contract | |---|---| | elementwise: keep the f16 rsqrt source from being a bare widening on G16S | The f16 elementwise pipelines (sqrt, exp, rsqrt, normal, erfinv) compile on G16S. The AGX packer refused `rsqrt` of a bare f16 widening; the f16 variant ORs the operand bits with `params.dims >> 16` (always 0), so the value is bit-identical. Fixed 15 failing cases. | | quantized gemv group: form the token-multi route for rows > 1 | `dispatch_quantized_gemv_group` compared `node.size()` with `n`, so the multi-row route never formed. It now compares with `rows * n`, and the fused_chain test requires the route to form instead of comparing the composed route bit for bit (a 1-ulp flake). | | sdpa prefill: close the flash submission every 4e9 MACs, route oversized score bindings to flash; sdpa prefill flash: no submission split while a tape records | A 16384x8 flash prefill (~550 GMAC at ~50 GMAC/s) ran as one ~11 s submission past the per-job GPU timeout (`Error(110)`). The tile loop now commits every 4e9 MACs, except while a compiled tape records (`encoder.in_tape_recording`, as in `dispatch_qmm_tile`); a new case checks 3 commits eager vs 1 recorded, identical bits. Shapes whose score matrix exceeds `maxStorageBufferRange` take the flash kernel; under a capability simulation that branch refuses by name when the hardware lacks the kernel's workgroup and shared memory. | | sdpa decode f16 arm: no longer gated on the cooperative matrix; sdpa decode f16 arm: keep the cooperative-matrix gate outside G16S | The shader never used the cooperative matrix. On G16S only (`sdpa_decode_f16_without_coopmat_part` in `device.h`) the gate drops that clause; every other part keeps it. Decode SDPA f16 on G16S, us per call, composed -> fused: 1100 keys 586 -> 177, 4096 keys 1872 -> 308, 263 keys 254 -> 141, 37 keys 153 -> 124. bf16 unchanged. The capability-simulation backing check covers only the f16 arm, so `m1-stock-no-coopmat` on lavapipe is 10/10 again. | | tests: distributed ops load MPI at run time, gdn_bf16_state compiles, no latched statics | The distributed test detects an MPI loaded with dlopen; `test_gdn_bf16_state` compiles with GCC 16; `MLX_OMARCHY_GDN_PF` and `MLX_OMARCHY_GDN_STATE_F32` are read live. | | tests: stream-independence floor for Aurora Borealis | Two-stream overlap floor 0.80 when the driver id is Aurora Borealis (measured 0.83-0.93 over 8 runs, every copy byte-for-byte correct); every other driver keeps 0.95. The correctness checks are unchanged. | | tests: require the token-multi group to form on G16S only | The token-multi case requires a formed group on G16S, where its per-row bit identity is measured; other subgroup-32 parts report the count. | | shaders: round to f16 with an integer RNE conversion instead of packHalf2x16 | GLSL leaves the rounding of `packHalf2x16` implementation-defined, and a development Mesa build lowers it to round-toward-zero. `shaders/omarchy_half.h` adds `omarchy_f16_bits_rne` (integer RNE, 0 mismatches against the hardware conversion over all 2^32 float32 patterns); fused_chain, swiglu, fast_trio, qmm_vec, qmm_fma, sdpa_decode_native_p1 and cast_int use it. On G16S with the system Mesa the outputs are bit-identical to the `packHalf2x16` shaders and the time per call is the same within run-to-run spread (`rne-ab.txt`); M1/M2 not measured here. | | receipts: repo-relative test path in the token-multi stock Mesa log | `fused-chain-token-stock-mesa.txt` names `tests/omarchy/test_fused_chain.cpp`. | | qmm gemv group: epilogue sizes follow the rows * n node | The Add epilogue checks compare with `node.size()` (rows * n) and take the addend as the full (rows, n) residual or the (n) bias. Single-row groups check the same sizes as before; the token route builds no epilogue. | | shaders: include omarchy_half.h after the #extension directives | The header follows the last `#extension` in each of the seven shaders (in swiglu inside the f16 branch, its only user). | | tests: pin omarchy_f16_bits_rne and the f16 rsqrt operand | `omarchy_f16_rne_tests`: the header compiled as C++ against fixed IEEE half bits and CPU `astype(float16)` at 65504, 65519, 65520, 2^-14, 2^-24, 2^-25, normal and subnormal ties, quiet NaNs and -0, plus a strided sweep of the float32 bit space; on the GPU the same inputs through a strided float32 -> float16 astype (cast_int.comp) and the f16 rsqrt route. The GPU cases skip without a Vulkan device. | | receipts | `receipts/2026-11-13-m4-pro-g16s-gpu/`: battery, model runs, the dual-Mesa battery, the RNE A/B and the stock-Borealis pipeline sweep. | ## What ran The standing battery at 532bbb48 (this tree plus the f16 qmm cooperative-matrix shader change now in joshuaswarren#437, which no suite reaches on stock Borealis, where the cooperative matrix is not exposed; a later battery of a tree containing this one ran 63 units with no failure) on stock Borealis `05ddb00f5c`, one process per suite plus the 8 capability-simulation profiles: 78 units, 1090 test cases, all pass. On `main` the same battery fails `primitive`, `fast_ops`, `fused_chain`, `compiled_tape` and `sdpa_decode_fused` on the f16 `rsqrt` packer refusal, `distributed` on the MPI check, the 16384x8 flash prefill on the GPU timeout, two capability-simulation profiles on the f16 decode gate, and `test_gdn_bf16_state` does not compile with GCC 16; the commits above fix each of these. `omarchy_ane_runtime_tests` links the libane runtime sources and is not built here, as on `main`. On a356ccd with the same Mesa: `omarchy_f16_rne_tests` 4/4 (12408 assertions), `fused_chain` 42/42, `fast_ops` 52/52, `matmul_family` 46/46, `primitive` 107/107, `sdpa_decode_fused` 7/7, `copy_offset` 29/29, `qmv_batch` 4/4, `fast_regression` 2/2, `runtime` 60/60, `eq_math` 7/7, `sdpa_prefill_flash` 16/16. ## Hardware | | | |---|---| | Machine | MacBook Pro 16-inch, M4 Pro (J616s, T6040), 14 CPU cores, 48 GB | | GPU | `Apple M4 Pro (G16S B1)`, subgroup 32, 32 KiB shared memory, `maxStorageBufferRange` 2 GiB - 1, no `VK_KHR_cooperative_matrix` | | Driver | Mesa 26.3.0-devel `git-05ddb00f5c`, Borealis, Vulkan 1.4.363 | | Kernel | Linux 7.3.0, aurora-silicon/linux `integration/aurora` with the J616s series of aurora-silicon/linux#1477 | | Toolchain | GCC 16.1, glslc 2026.4, Python 3.14.9 | ## Mesa and the opt-in routes Stock Borealis `05ddb00f5c` builds and runs the opt-in routes the suites reach, the multi-token GEMV included (the token-multi case dispatches `qmm_vec_q4_multi_token4_subgroup_bf16` and `..._token8_subgroup_bf16`; raw log in `fused-chain-token-stock-mesa.txt`). `shaders-refused-stock-borealis.txt` comes from a standalone pipeline sweep with other device features and a fixed layout; it is not a list of backend refusals. No Mesa change is needed for anything measured here. ## Related - The f16 qmm cooperative-matrix fix of joshuaswarren#425 (7d7bdb0) is not in this PR: it is joshuaswarren#437, on top of joshuaswarren#429 (@RyanTheTide) as asked in the joshuaswarren#429 review. - aurora-silicon/mesa#319 (the cooperative matrix default on the M4 Pro and fixes for the two compile refusals the battery found with joshuaswarren#275) and aurora-silicon/mesa#299 (@RyanTheTide, the same default across the AGX3B ISA) are the Mesa side. The backend default in 4a9a827 only sets `ASAHI_AGX3B_COOPERATIVE_MATRIX=1` when the variable is unset, so it changes nothing once either lands. - joshuaswarren#411 (@RyanTheTide, register-blocked f32 tile without a cooperative matrix) merges cleanly with this branch. - Replaces the backend fixes of joshuaswarren#425, which is closed. The ANE lane 3 is joshuaswarren#438. The G16S decode defaults and split-K rows of joshuaswarren#425's follow-up work come in a separate PR after their measurements.
…uspend The T6041 (M4 Max) has the AICv3 of T8122 and now a suspend-to-RAM driver of its own. Give "apple,t6041-aic3" its own info, the T8122 one with fw_suspend, so the AIC state the sleep loses is saved and put back as on T8140. Nothing else in the driver looks at fw_suspend. Also in aurora-silicon#1477 (T6040 sleep), which admits apple,t6041-aic3 the same way; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
apple_nvme_t6040_hw is only matched by "apple,t6041-nvme-ans2". Give it the sleep fields T8140 uses: register ANS with the sleep core (sleep_traced), flush namespace 1 only, the OS's own, and send the full shutdown notification at suspend. The T6041 sleep driver stops ANS through the sleep core's coprocessor stop. On T6041 the sleep core's last check (the shutdown notification has completed) does not run: the T6041 driver calls only the coprocessor stop. Also in aurora-silicon#1477, which sets the same fields with sleep_untraced on the same struct; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
The PMP's SRAM loses its contents in a real sleep. On the J616C's 26.6.2 firmware its __DATA segment is at 0x500761000, 0x7d000 bytes: back up (0x61000, 0x7d000) of the SRAM, as T8140 does for its own. Also in aurora-silicon#1477, whose HW_CFG_T6041 has the same range; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
On apple,t6041, write the keys macOS writes last before MBSE slpa in a trace of its sleep: WKTP = 2 (AppleSMCEmbedded, going to sleep), then pmVC. The value written is 0x101, as the bring-up kernel runs it; the comment, taken over from it, says the trace has 0x100. That difference is open. Also in aurora-silicon#1477, which writes WKTP through a sleep_wktp parameter; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
A conventional host (internal ports with the radio and the SD reader) loses its power in a real sleep: the endpoints sit unpowered or in reset behind a link that is down. On a firmware suspend, save what only the port registers hold; on the noirq resume, note which ports lost their link and keep a copy of their functions saved state before the PCI core spends it on the down link; in the normal resume phase (after the SMC, which owns the PWREN GPIOs) bring each such port up again as probe does, then restore its functions. Only for hosts that are not tunneled, have no managed SIDs, no PIO DMA supplier and more than a root bus; s2r_conventional turns it off. The suspend-to-idle paths (domain hold, adopted links) are unchanged. Also in aurora-silicon#1477 (0ab1a66), which this follows; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
…uspend The T6041 (M4 Max) has the AICv3 of T8122 and now a suspend-to-RAM driver of its own. Give "apple,t6041-aic3" its own info, the T8122 one with fw_suspend, so the AIC state the sleep loses is saved and put back as on T8140. Nothing else in the driver looks at fw_suspend. Also in aurora-silicon#1477 (T6040 sleep), which admits apple,t6041-aic3 the same way; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
apple_nvme_t6040_hw is only matched by "apple,t6041-nvme-ans2". Give it the sleep fields T8140 uses: register ANS with the sleep core (sleep_traced), flush namespace 1 only, the OS's own, and send the full shutdown notification at suspend. The T6041 sleep driver stops ANS through the sleep core's coprocessor stop. On T6041 the sleep core's last check (the shutdown notification has completed) does not run: the T6041 driver calls only the coprocessor stop. Also in aurora-silicon#1477, which sets the same fields with sleep_untraced on the same struct; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
The PMP's SRAM loses its contents in a real sleep. On the J616C's 26.6.2 firmware its __DATA segment is at 0x500761000, 0x7d000 bytes: back up (0x61000, 0x7d000) of the SRAM, as T8140 does for its own. Also in aurora-silicon#1477, whose HW_CFG_T6041 has the same range; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
On apple,t6041, write the keys macOS writes last before MBSE slpa in a trace of its sleep: WKTP = 2 (AppleSMCEmbedded, going to sleep), then pmVC. The value written is 0x101, as the bring-up kernel runs it; the comment, taken over from it, says the trace has 0x100. That difference is open. Also in aurora-silicon#1477, which writes WKTP through a sleep_wktp parameter; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
A conventional host (internal ports with the radio and the SD reader) loses its power in a real sleep: the endpoints sit unpowered or in reset behind a link that is down. On a firmware suspend, save what only the port registers hold; on the noirq resume, note which ports lost their link and keep a copy of their functions saved state before the PCI core spends it on the down link; in the normal resume phase (after the SMC, which owns the PWREN GPIOs) bring each such port up again as probe does, then restore its functions. Only for hosts that are not tunneled, have no managed SIDs, no PIO DMA supplier and more than a root bus; s2r_conventional turns it off. The suspend-to-idle paths (domain hold, adopted links) are unchanged. Also in aurora-silicon#1477 (0ab1a66), which this follows; drop this one when that lands. Assisted-by: LLM Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
J616s (MacBook Pro 16", M4 Pro, T6040) running Linux at EL2 under aura: hibernation and suspend-to-RAM with the desktop session kept. Builds on #1445, which is merged.
Update 2026-11-14, evening (head 59454c7)
331 commits on integration/aurora 7c71d6d. A rebase and one CI commit; the series itself is unchanged (
git range-diffshows every commit of 22d338f as equal).Rebase. onto 0a02a04 and then 7c71d6d: #1892 (G17P: one UAT execution context shared by a VM's queues), #1896 (dt-bindings:
apple,tunabletype) and #1901 (host-test runner). No conflicts. With #1892 the queues of one VM share an execution context; the cold republish after a resume resets each context's scheduler page and work-list head and each compute queue, and it runs with no command in flight, so the shared work-state claims are empty there. Not run on hardware at this base; the hardware runs of the afternoon update are on the previous base.ci: mask the pattern list of unmatched-property dt-schema messageschosenwarnings of the base (t6030-j514s/j516s and six t8132 trees), whose "does not match any of the regexes" text lists every vendor prefix and so changes with theauraprefix this series adds.apple-dt-check.shnow masks that list the way it already masks phandle values. No device tree of this series has a new warning.Local checks on this head: the host tests (shimmed 344/344), KUnit g1 (1735 tests, the same five
apple-display-gate-t6041-maxfailures as at the base), the Rust KUnit suite (645 tests, 643 passed, 2 skipped).The open item of the afternoon update (placements in the GPU kernel window failing with -EBUSY after a second hibernation started right after a resume) stays out of this pull request; its fix will come separately.
Update 2026-11-14, afternoon (head 22d338f)
330 commits on integration/aurora d89d8c0. Two new commits for the G17 GPU after a resume from disk, and a rebase.
take the compute channel claim through the preparation gateGate::admit_claim): a closed gate refuses it and the command waits for the reopen; a freeze that closes the gate while a claim is being taken joins it. KUnit cases added. The commit that moved the re-boot off the PM notifier now says in its message that this later commit fixes its open case.name the step that fails in a republish after hibernationRebase. onto 1f5037a and then d89d8c0. The only conflicts were in
drivers/accel/ane/ane_h16_hwx.cagainst #1882 (H17 programs from zin_ane_compiler 10.205), resolved by keeping both sides:LC_NOTErt.versionnote #1882 accepts.SG_NORELOC(#1882); the series' exact flags for the other segments stay.N_STABentry must have section 0 and value 0 (one rule for H16 and H17).The H17 KUnit cases of #1882 pass on the merged loader (two expectations take the H16 form, where the series accepts what H17 accepts).
Run on hardware (J616s, three displays, aura main 9887a6b5):
Open (new, intermittent): in two of those five pairs the second republish itself succeeded, but afterwards the driver could not place new objects in the GPU kernel window: the page-table entries of ranges its allocator considered free still held leaves (host RAM, inside the driver's own tables), so these placements failed with -EBUSY, render publications waited out their 2 s deadline, the compositor got -ETIMEDOUT and a Vulkan encode client
VK_ERROR_DEVICE_LOST. A normal reboot recovers. The leaves were not mapped anywhere else in the window. A likely cause, not yet confirmed: from the freeze until the relink in the republish, the no-map table that holds the window's second level is treated as stale, and a walk then follows only the links the driver recorded itself; the levels above it, which the boot loader wrote, have no recorded link, so a walk in that window finds no leaves at all (seen at the freeze), and an unmap done in that window would return the range to the allocator with its leaves still in place. Not fixed in this head. It was seen only with the second hibernation started right after the first resume, never in a single hibernation from the desktop through systemd; the fix will come as a separate pull request, so it does not hold this one up.Local checks on this head's tree: the host tests (shimmed 344/344; unshimmed, the same 31 failures from this host's compilers as on the previous head), KUnit g1 (1735 tests, the same five
apple-display-gate-t6041-maxfailures as the previous head; the H17 program cases of #1882 pass), the Rust KUnit suite (645 tests, 643 passed, 2 skipped,asahi_g17_claim_gateincluded). The device tree is unchanged by the rebase since the last check (no new warning, the 12 changed bindings pass on 1f5037a).Related open PRs: #1876 (aop_als: stop the reports for a system sleep and on unbind) changes the same file as
iio: aop_alshere; the version here has been tested on the T8140 CT817 by @niteria (see their comment), which is the case #1876 asks about, and #1876's unbind part is not in this series. #1889 (sn201202x idle sleep on T6041) touchestipd/spmi.cnext to this series' restore changes; they are independent. #1870 and #1892 (G17) touchg17/runtime.rsandmmu.rs; no overlap with the two new commits' logic.Update 2026-11-14, morning: rebase onto 5b36eff (head e87a6ed)
328 commits on integration/aurora 5b36eff. The series of a7f9a76, rebased with no other change; the tree is that head's with the base's changes merged in. Two conflicts, both resolved by keeping both sides:
drivers/gpu/drm/apple/dcp-internal.hstruct apple_dcp_hw_datakeeps the base'sonly_120hz_modesnext to the series's2r_pipesandnr_s2r_pipes.tools/asahi/g17-compute-deadline-tests.pyextend()(the series) and theAdmissionWaitreport (the base, #1866).Local checks on this head: the host tests (shimmed 343/343; unshimmed, the same 31 failures from this host's compilers as on the base), KUnit g1 (1730 tests, the same five
apple-display-gate-t6041-maxfailures as the previous head), the Apple device-tree check (no new warning, the 12 changed bindings pass).Update 2026-11-14, morning (head a7f9a76)
328 commits on integration/aurora 2129f55. The tree is that of 4521879 apart from comments, documentation and two debugfs header lines. It conflicted with 292773f in
struct apple_dcp_hw_data; see the update above.sleep-t6040.cnow only renames the driver state and the seq_file. No functional change.Local checks on this head: the host tests (shimmed 343/343; unshimmed, the same 31 failures from this host's compilers as on the base), KUnit g1 (1728 tests, the same five failures as the previous head, six on the base), the Apple device-tree check (no new warning, the 12 changed bindings pass).
Update 2026-11-14, early morning (head 4521879)
328 commits on integration/aurora 2129f55, one on top of ba5cf6e; it merged cleanly with 5d112b1 then.
pmdomain: apple: pmc)restore_earlycallback, and it returned unlesspm_resume_via_firmware()was set, which only the S2R path sets. The kernel restored from an image runs after a boot loader that started from a reset PMC, with every agent disabled on every rail, so after a hibernation no floor was honoured and the memory clock stayed at its lowest state until the next boot. The restore now has arestore_earlycallback of its own; the S2R path is unchanged. KUnit case added.Run on hardware (J616s, three displays): before the fix, after one hibernation the PMC read 0 in every enable word, a CPU memory copy ran at 31 GB/s and token generation of a 4B language model on the GPU at about 36 tokens/s instead of 55, while prefill was unchanged. With the fix, cold boot and then one hibernation from the desktop in reboot mode: enables 0xb on DCS and SOC, both floors honoured, the copy at 123 GB/s, decoding at 58.6 tokens/s; restore of devices 335 ms, "GPU firmware republished after resume in 1373 ms", all displays back, no kernel warning.
Local checks on this head: the host tests (shimmed 343/343), KUnit g1 (the new PMC case passes; the same five failures as the previous head, six on the base), the Apple device-tree check (no new warning).
Update 2026-11-14, night (head ba5cf6e)
327 commits on integration/aurora 2129f55. The base gained 85 commits since a34d26c, among them T8132 (J713) sleep, the J713 radio sleep and the CIO PHY sleep, and the old head no longer applied to it, so this is a rebase with conflicts resolved by hand. It merged cleanly with the tip of that time (5314798).
Rebase. Where both sides changed the same code:
soc/apple/sleep.cPS_PROT_SLICE()words and three displays; the T6040 part is selected throughAPPLE_SLEEP_T6040next to the base's T8132 entries (Kconfig,sleep.c, the sleep test).mfd/macsmc.cWKTPhandling stay.hci_bcm4377.cresumebcm4377_hci_resume()and reports back to it, before our cold-function handling. The host tests carry both sides' cases.pcie-apple.crtkit.happle_rtkit_cold_restart()and ourAPPLE_RTKIT_IDLE_RETAINED; the base's callers treat any nonzero return as an error, which is still right.apple,sleep.yamlps-prot, and its external display processors);apple,t8140-sleep.yamlis gone.apple-atc.h, USB4 router bindingcio_*calls (stubs when the PHY driver is not reachable). The router binding takes the base'sphy-names = "cio"; the T6040 routers int6040-usb4.dtsiname their PHY "cio" and the Thunderbolt driver asks for it by that name.Three things the merge broke without a conflict, fixed in the commits they belong to: the T8132 NVMe table entry uses our renamed sleep flag; the G16 GPU of the T8132 registers for the first stops with our argument list; the brcmfmac suspend host test models a restored image (the restart behind the restore in the last push had no stub for it).
New since f96cb63 (7 commits: hibernation speed, and the HDMI link after a sleep):
wiphy_suspend577 -> 58 ms).Run on hardware on the first six commits (J616s, 48 GB, aura main 9887a6b5, HDMI + DP in picture-by-picture, USB Ethernet, two boots): cold boot (three displays, ANE without a timeout, SEP, Wi-Fi, Bluetooth, KVM, fans taken by the SMC); suspend-to-idle; suspend-to-RAM twice (noirq resume 116-117 ms, resume of devices 3.2 s,
wiphy_suspend58 ms, three displays back); two hibernations from the desktop in reboot mode, the second started right after the first had resumed, with a Vulkan render client, a Vulkan compute loop and a reader of the GPU's statistics running across both: freeze of devices 88-96 ms, restore of devices 343 ms, both PCIe ports back; "hibernation exit" before "GPU firmware republished after resume in 2401 / 2411 ms"; the statistics read during the republish blocked for 2.4 s and returned; at the second hibernation "GPU drained for hibernation" came after the republish line; both clients ran on without an error; a suspend-to-RAM after them. No kernel warning in the journal.On the previous head plus the 6 commits (same set-up, one boot): the same hibernation with lzo and lz4; restore of devices 1255 -> 335 ms against the old head, freeze of devices 608 -> 89 ms.
With the HDMI commit on top (same set-up, two boots): cold boot with three displays; suspend-to-RAM three times (resume of devices 3.21-3.22 s, noirq 118 ms, three displays back, no warning); a hibernation from the desktop with the HDMI display attached: "GPU firmware republished after resume in 2395 ms", HDMI, DP and the panel back and enabled, the compositor kept running. The converter had its sink ready at each wake, so the deferred start ran on its first attempt; the path where the sink comes late was not reached.
Open: a hibernation requested while the GPU firmware is still being booted again after a resume (within about 2.5 s of it) waits for that work as intended, but the boot then fails with -EBUSY and the GPU is lost for its clients. Found by writing
diskto/sys/power/statetwice in a row with the hook that hibernates this machine bypassed; through systemd the next hibernation starts about 15 s after a resume, so the normal path does not reach it. Not fixed in this head; the commit message says so. Fixed in 22d338f, see the afternoon update.Not run: the GPU driver unloaded and loaded again, a USB4/Thunderbolt device, a T8132.
Update 2026-11-13, late night (head f96cb63)
320 commits on integration/aurora a34d26c, a fast-forward of 6e7d5e4 by 15 commits; it merged cleanly with the tip of that day (1d2ef21).
mfd: macsmc: own the pmVC request for the VDD_CIO rail: the SMC driver writes the pmVC key for the sleep controller (same key, value and moment as before).g17/hibernate.c(the gate is registered at module load).__TEXTwithSG_NORELOC, the symbol table (debugging entries, size for whole models), kernel data split over__KERN_0..__KERN_nand bound with its constants, surface names longer than seven bytes, a bound by the total mapped size, the declared buffer size in an EXECUTE descriptor when the section is smaller, a selftest and the documentation of the forms.Run on hardware on the same tree (one boot, three displays, a Type-C hub with Ethernet and a USB3 disk attached): cold boot (all displays lit, ANE, ProRes, AES, Touch ID, fans taken by the SMC); suspend-to-RAM three times with the hub attached (devices back, the disk's filesystem intact, no pmVC warning); suspend-to-idle; dry run 2; a sleep refused at the enclave; a hibernation aborted before the image (devices recovered in 0.93 s); one hibernation from the desktop in reboot mode with a Vulkan render client and a Vulkan compute client running (restored, GPU firmware back in 2.5 s, both clients kept running without an error, SEP attached again, fingerprint listed) followed by a suspend-to-RAM with both clients still running. ANE on this kernel: the add-128 selftest, an Apple-compiled add bit-exact, and a Parakeet encoder (load 0.88 s, execute 79-80 ms) bit-exact against the reference output of the same model.
Local checks: the full host test suite, KUnit g1 (ANE included) base vs head, the ANE boot and transport KUnit, the Rust KUnit, the sep-source jobs and the Apple device-tree check.
Not run: the GPU driver unloaded and loaded again with a desktop on it, a USB4/Thunderbolt device.
Update 2026-11-13, night (head 6e7d5e4)
305 commits on integration/aurora a34d26c; the PR did not conflict then. The base moved twice during the day (4277bdd, a34d26c). The rebase onto the second one dropped two commits of the series: the base now carries the T6041 ProRes encoder (
media: apple: proresby RyanTheTide), so the ProRes part ofmedia: apple: ProRes on T6041 and the ISP across sleepandmedia: apple: prores: drop a store that the suspend already madeare gone; what is left of the first ismedia: apple: isp: ask the sleep controller whether the power is lost(a dry run keeps the power, so the ISP must not stop its firmware for it). Since the first update of the day (1ea066e) these were added:pm_hibernate_is_loading()for drivers, an arch hook for cleaning the pages of a loaded image (ARCH_HIBERNATION_CLEAN_IMAGE), an admission hook and two arm64 hooks (layout cookie, nosave pages) that aura-hibernate.c fills, and a record the loading kernel leaves so the restored kernel knows whether another boot loaded it (the SEP uses it instead of the PMP restart counter). A hibernation that ends before an image exists now recovers the devices (PMSG_RECOVER) instead of running their restore callbacks, and 13 drivers lost the check that guarded against that.READ_ONCE/WRITE_ONCE, the once-per-machine power check is documented and atomic; the S2R warm restarts share their firmware return; unused includes dropped;apple_rtkit_idle()reports an idle that kept the firmware's memory apart from an error.physandstruct phyinstead of a node pointer. DP IN 1 of a tunnel gets PCLK1 as well (as on T6030 and T8132). These commits were not run on a USB4/Thunderbolt device (none here); they are separate commits and carry that note, so they can be tested or dropped on their own.Run on the head of the previous rebase (8acba58, without its last commit, the Thunderbolt-only PCLK1 one), one boot, HDMI + DisplayPort in picture-by-picture, USB3 disk, no dock: cold boot (all three displays lit, ANE, ProRes, AES, Wi-Fi, BT, Touch ID, fans taken by the SMC); suspend-to-RAM four times (wake record
MBSE 0x10650, noirq resume 113-120 ms, devices 560-580 ms); suspend-to-idle; dry run 2 ("a real commit would go on here (0 check(s) failed)"); a sleep refused at the enclave's request in the deep path (no SIO message, fans taken after); a hibernation aborted before the image (pm_testdevices: devices recovered, SEP session kept, display and radios up); two hibernations from the desktop in reboot mode in one boot (restored, 14 CPUs, SEP attached again, fingerprint listed, Wi-Fi and BT up, RTC alarm kept) each followed by a suspend-to-RAM.Local checks on the head: the full host test suite (the one failure it showed is fixed), KUnit g1 (1708 passed; the five
apple-display-gate-t6041-maxcases fail as they do on the base), the Apple device-tree check (no new warnings,apple,sleep.yamland the USB4 router binding pass).Run on this head (with an unrelated local series in
drivers/accel/ane, which does not touch sleep): cold boot (three displays lit, ANE without timeouts, SEP, Touch ID, fans), the ProRes encoder through the base's driver (4 frames, no error; the frame header differs from the earlier driver in three bytes of colour metadata, the coded data is equal), suspend-to-RAM three times, suspend-to-idle, dry run 2, a sleep refused at the enclave, a hibernation aborted before the image (devices recovered, SEP session kept) and one hibernation in reboot mode (restored, SEP attached again, ANE restarted cold with no program replayed, fingerprint listed, radios up) followed by a suspend-to-RAM.Not run: the dock, a KVM guest across sleeps, a disk behind a hub, a USB4/Thunderbolt device.
Base
sleep.c) met three of the clean-up commits: the shared header now carries the base's definitions, the PMU write helper takes the USID as the base's does, and what the base reads from its match data (the PMU write command, the boot stage, the response vector's enable for the sleep) stays with the T6040 part as its own values. The 89 on top are new in this push and are listed under "New in this push".phy: apple: t6040: tolerate a busy recovery domain, AxxzyWasTaken'sspmi: apple: drop replies left by firmware at a firmware-driven resume) keep their authors and trailers.What is in it
pm_hibernate_is_restored()lets restore callbacks tell a restored image from an aborted hibernation; a boot chain with a fixed layout (aurahib=1) admits hibernation.sleep.c+sleep-t6040.c,struct apple_sleep_partinsleep-internal.h; one platform driverapple-sleep, the node enabled per board, on the J616s only). The entry takes the hardware down in a fixed order (CPU complexes, power gates, axi2af bridges, APCIe, DCS, the MasterMini S2R timer, then the commit word) and the wake brings the same blocks back, before syscore resume. The coprocessor and enclave registry stays insleep-registry.c; the driver binds it once in probe and each SoC's part gives the two answers (T8140's rules and T6040's are the ones they had).APPLE_T6040_SLEEPstays an option, now the switch of the T6040 part underAPPLE_SOC_SLEEP(withMFD_MACSMC=y). The part keeps its own suspend ops: suspend-to-idle passes through untouched and deep is offered only on a kernel booted witht6040_sleep.allow_entry=1. Four module parameters are left (allow_entry,dry_run,sleep_wd_secs,wd2_secs; 79 before); the progress marks, PMU records, probes, dumps and the experiments that were off by default are gone, the steps that were on by default are unconditional. Dry-run levels are 1 (every step that can be taken back, refused at the commit point) and 2 (also the last steps); the old level 1 never reached the commit point and is removed.hung_stopand session quarantine are used unchanged, the hibernation events go through its notifier, and an engine quarantined at bring-up is powered off for a sleep (and left off at the resume) instead of refusing every sleep of that boot.pm_sleep_ptr()instead of#ifdef CONFIG_HIBERNATIONin PM operations,dev_*messages from the T6040 part, the sleep node's unit address, bindings forapple,t6041-display-powerandaurora,s2r-mailbox. One of them fixes a build configuration: withCONFIG_HIBERNATION=na suspend-to-RAM stopped the display firmware and could not start it again; the restart is built for every system sleep now. For the comment, rename and constant commits the objects are identical before and after;sleep.obuilt without the T6040 part has every symbol unchanged from f259e90.New in this push (89 commits)
MBSE = slpwback: afterslpwand thenwakawith no sleep between, it stopped running the fans (0 rpm with the CPU die at 100 to 113 C) and refused a fan request until the reboot; after the whole commit (WKTP,slpa, the AP idle notice) and no power loss its sensor reports stood still as well, so the thermal zones read a constant. A dry run, a device that refuses, a wake event during the entry and a refusal at the commit point all ended there, on the previous head of this series too. On T6041 the whole sequence is now sent from the sleep controller's last stop, with interrupts off and every refusal behind it (apple_rtkit_ap_idle_polled()is new for that); on the other SoCsslpwmoves from.prepareto the noirq suspend, right before the commit. A suspend that ends short of the power loss sends the SMC nothing.AP idle not acknowledged: -62. The PHY now refuses that power-off while its firmware runs. With it: a powered-down sleep counts as the coprocessor's power cycle, a host whose USB3 is not back at a wake stays at USB2 and tries again at the next wake, and the CIO bring-up recovers the coprocessor and shuts the lanes down when it fails.mode set failed: -5of every suspend-to-idle with an HDMI display); the hotplug that reports the sink back sets the mode. A T6041 sleep keeps to the pipe's own power words; a firmware that was given up stays stopped across an S2R, and a dead internal processor no longer refuses every sleep; the sleep registers are mapped once at probe.sending frame failed (-19)at the first wake of a boot).roles.PM_POST_*, the LSTX level at a router stop keyed on T6040, the T6040 DP IN adapters kept disabled, no watch for a router whose node is disabled. Without a USB4 device here these ran as regressions only.timer_wakeupsinstead ofirq_timeoutsin the ANE's debugfs.macsmc_sleep_order_testexpects the lid read (it failed at the base); new KUnit cases for the SMC's last stop; the host tests of the PM callbacks follow the code they extract.Hardware results
J616s (48 GB), firmware 26.7.1, aura main (9887a6b5) at EL2, kernel built from this tree with
APPLE_SOC_SLEEPandAPPLE_T6040_SLEEPenabled.This head (278b7b9) is the rebase onto aa68b3c of the head the tables below were run on (4b0be95 on fdef45b), plus one commit (
dmaengine: apple-sio: stop the T6041 firmware at the sleep's commit). On the rebase (3d13866) with that commit's module: cold boots, three suspends to RAM, one suspend to idle, a level 2 dry run and two sleeps refused at the enclave's request, with the panel and both external displays, Wi-Fi and Bluetooth back each time. Hibernation and the tables below were not run again.On 4b0be95, one boot. Set-up: a Samsung G95NC in picture-by-picture with one half on the HDMI port and the other in DP alternate mode, a USB3 disk, charger; no dock. All three displays were seen lit after the boot and after every step.
mode set failed; the HDMI half is back with the firmware's hotplug, about 5 s after the wake.On the previous base (6970a51) the same commits ran over five kernels as they were written, most of it with a dock (hub, Ethernet, card reader), the USB3 disk and one USB-C DP display:
-62, 9 SuperSpeed links before and after. Before the fix: 2 of 2 lost USB3.drop_next_power_down_ack)apple_sepsleep_refuse_before_send), and after an RTC alarm that fired during the entry.Not run on either of these two heads: anything with the dock (it was run on the previous base only), the KVM guest across the sleeps, a USB4/Thunderbolt device (none here). T8140 was not run by me on any head, and the SMC and wake-time commits change paths it shares: the noirq
slpwon every SoC,device_enable_async_suspend()on the dwc3 glue, the BCM4388 restart, the skipped 100 ms insn201202x_resume.Review
The comments and commit messages of the 89 new commits follow the same rule as the rest since the last review: they say what the hardware or firmware does and what was measured on the J616s.
Checks
Run on 4b0be95 against its base fdef45b (not repeated after the rebase onto aa68b3c), on an aarch64 host with its own compilers (gcc 16, clang 23, rustc 1.99), not the pinned ones of the workflows.
tools/asahi/run-host-tests.pybrcmf-recovery-testsamong them). Without the shims 28 runs fail on this host's compilers; that run was not repeated at this base.apple-display-gate-t6041-maxcases that fail at the base as well (base: 1686 tests, those five andmacsmc_sleep_order_test, which passes with the series).boot.kunitconfigandtransport.kunitconfigdrivers/soc/apple/sep.kunitconfigapple_sep*) 301 of 301.scripts/dtc/apple-dt-check.sh(CHECK_DTBS on every Apple tree,dt_binding_checkon the changed bindings)sep-sourceworkflow: thetools/aurora-septests, the three DWC3/ATC compile profiles-Oones and the ABI step included); the threeapple-dwc3-atc-compile.shprofiles compile;apple-sep.obuilds.checkpatch.pl --stricton the commits written for this pushOpen
WARNINGattypec_altmode_update_active()came once in the same re-cabling and was not looked at.ignore_loglevel: unchanged from the previous description. Independent of sleep.usbcore.old_scheme_first=Yand the ports' fast-enumeration quirk took 0.64 s of it here with the same devices and device numbers; that is a setting, not part of this series.WKTPis written 0, and whether it loses its fan policy afterslpw+wakaas this one does (then its noirq path has the same hole after the noirq phase that the last stop closes on T6041); whethersn201202x_resumemay skip the 100 ms on every SoC with that controller; whether the AIC mask resync after a resume from disk should be registered for every SoC; whether a host left at USB2 by a wake should try a normal start at once instead of at the next wake. 263989e (DART in an off domain) is not in here.How to try
Deep sleep stays opt-in, on the kernel command line:
With
t6040_sleep.dry_run=1(writable at run time) the same request stops at the commit point and resumes warm.