Skip to content

J615: expose die temperatures and preserve T8122 GPU thermal fallback - #410

Open
ericjuta wants to merge 3 commits into
omacom:integration/aurorafrom
ericjuta:fix/j615-thermal-safe-cap
Open

ericjuta wants to merge 3 commits into
omacom:integration/aurorafrom
ericjuta:fix/j615-thermal-safe-cap

Conversation

@ericjuta

@ericjuta ericjuta commented Nov 7, 2026

Copy link
Copy Markdown

Summary

Separate the opt-in T8122 GPU performance ceiling from its boot/sensor-failure cap, and expose the complete J615 SoC die sensor set.

Three commits:

  1. hwmon: add J615's six GPU-family and six CPU die keys; require all twelve to be discovered before registering the zone.
  2. drm/asahi: preserve the state-2 boot/failure cap even when asahi.t8122_pstate_cap=5 is requested. Off/hold cannot boost above the safe cap; lower requested ceilings still win. Add regression coverage for missing, failed, stale, stuck and implausible readings, pacing, hot/critical temperatures and recovery.
  3. docs/tools: explain the guarded ceiling, qualification procedure and older-kernel warning; update one-shot help.

The default ceiling remains 2. Non-T8122 cap selection is unchanged. This also conservatively bounds T8122 boards without usable sensor feedback.

Validation

  • rustc --edition=2021 --test tools/asahi/m3-runtime-tests.rs -o /tmp/j615-thermal-runtime-tests and execution: 24 passed on the rebased branch.
  • bash -n tools/aurora-sep/air-gpu/air-gpu-oneshot.sh: passed.
  • Existing running J615 custom kernel 7.2.11-dcpexp-thermal+, configured with asahi.t8122_pstate_cap=5 asahi.m3_thermal=on, logs runtime cap 5 -> 4 -> 3 -> 2 at 80.3–80.5 C, then recovery 2 -> 3 -> 4 -> 5 at 66.5–67.7 C. This is observed runtime behavior, not proof that the freshly rebased branch is the running binary.
  • The newly rebased branch has not had a full kernel build/boot test. Sensor-failure behavior is covered by host tests, not injected hardware faults. No claim of calibrated temperatures or hardware safety certification.

Scope

Based on current integration/aurora (8eddf5a). Excludes existing display/brightness PRs #354, #356 and #357, local boot deployment scripts, and USB power workarounds. The intermittent USB-C -28/revalidation failure is unresolved and is not claimed fixed here.

@ericjuta

ericjuta commented Nov 8, 2026

Copy link
Copy Markdown
Author

Additional J615 hardware observations (2026-11-08): the currently running combined kernel is 7.2.11-dcpexp-usb-recovery-20261108, with asahi.t8122_pstate_cap=5 and asahi.m3_thermal=on. All nine locally modified thermal-related source/docs files are byte-for-byte identical between the earlier thermal working tree and this USB-recovery build tree. The installed Image matches the build Image by SHA-256; installed asahi/macsmc-hwmon module build IDs match the build artifacts. This is provenance for the combined local build, not a claim that the rebased PR branch was built or booted unchanged.

The current boot registered all 12 listed J615 die keys. Runtime logs show cap 2 -> 3 -> 4 -> 5 with cool readings, and 5 -> 4 -> 3 -> 2 with readings of 80.5–83.8 C; the firmware summary reports peak state 5. The user reports stable unplug/replug and lid-open/closed use on this combined kernel. No sensor-failure injection or sustained thermal qualification was performed in this audit.

Please keep the sensor/fallback correctness work separate from raising default performance limits. Review coordination with overlapping #135 is still needed, particularly explicit thermal-Off semantics. The all-keys requirement concerns the selected sensor list; it does not establish calibrated coverage of the hottest physical location, nor does it prevent an explicit partial sensor-list override. These observations do not establish hardware safety or qualify #317.

Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
@ericjuta

Copy link
Copy Markdown
Author

Rebased onto integration/aurora 39d5f88ab4e5 (the branch was 32 commits behind) and force-pushed; new head 6fc58762cd8f. No conflicts. All three commits now carry a Signed-off-by, which they lacked.

One real fix came out of this: the branch edits a help line in tools/aurora-sep/air-gpu/air-gpu-oneshot.sh but did not update that script's SHA-256 pin in install-aurora-sep.sh, so 11 cases of tools/aurora-sep/tests/test_air_gpu.py failed ("does not match its published checksum"). The old head had this too; full CI never ran on it. The pin is now updated in the docs commit and test_air_gpu.py passes.

Tested at this head on an arm64 Arch host (clang 23.1.5), not on the CI image:

  • host-tests.py --group aurora-sep --group tools: 163 suites, 152 passed, 6 known failures, 5 failed. None of the 5 comes from this PR:
    • tools/asahi/g15-pb-growth-tests.py and g15-stats-drain-tests.py need rustup, which this host does not have.
    • tools/testing/selftests/drivers/gpu/apple-dcp/run.sh (6 cases) and tools/aurora-sep/recipes/mesa-m3/tests/test-session-env.sh (sh and bash) fail identically on plain 39d5f88ab4e5 here, so I take them as host differences. CI is the judge for those.
  • tools/asahi/m3-runtime-tests.rs and m3-batching-tests.rs pass.
  • check-commits.py: all signed off; one checkpatch warning on the docs commit.
  • compile-check.py builds the changed C object (macsmc-hwmon); it does not compile the Rust sources.

Not tested: this exact head has not been booted. The J615 hardware results above are from a combined local kernel that carries these changes with others.

@ericjuta
ericjuta force-pushed the fix/j615-thermal-safe-cap branch from da758c5 to 6fc5876 Compare November 16, 2026 10:41
@ericjuta

Copy link
Copy Markdown
Author

J615 finding next to this PR: the board has no CPU thermal zones

This PR's governor limits the GPU only. Separately, the J615 device tree (t8122-j615) has no thermal-zones node, so nothing slows the CPU on temperature. The die sensors this PR exposes made that visible.

Without zones (combined local kernel, asahi.m3_thermal=on, cap 5):

  • 8 busy CPU threads: 105.5 C after 150 s, still rising.
  • -j8 kernel build: 110-114.6 C held for about 22 minutes.
  • The GPU cap dropped 5 -> 2 as designed; CPU cooling states stayed 0.

With the J613 block from 30db282 ("t8122-j613: Add CPU thermal zones") carried to the J615 unchanged (six zones, 58/95 C passive, 110 C critical, 6 W sustainable-power, E cluster capped at state 3), applied as a local device tree overlay:

  • 8 threads, 170 s: peak 87.7 C; P cluster 3.1-3.6 GHz (from 4.06).
  • -j8 kernel build, 20 min: two-minute means 89-92.6 C, peak 97.2 C, 6 of 545 samples at or above 95 C, no upward trend after minute 6; P cluster mean 2.93 GHz; both clusters unthrottled within 25 s.
  • 8 W was also tried: peak 96.3 C on the 8-thread test with no P-cluster frequency gain, so I went back to 6 W.

Limits: one machine, local overlay on the packaged DTB, combined local kernels (7.2.11-dcpexp-combined-20261111 and 7.2.11-dcpext-pr356-combined-20261116), not this PR's head. CPU + GPU load together and the 110 C critical power-off are not tested.

This does not change anything in this PR. It is a reason not to read the GPU governor as full thermal protection on the J615. I can send the zones as a separate t8122-j615 DTS patch if that is wanted.

@freber

freber commented Nov 17, 2026

Copy link
Copy Markdown

Claude Code wrote this up from my tests.

J615 (15-inch M3 Air) results for this PR's code. My kernel has #410's changed lines exactly as in 6fc58762cd8f. They sit on bed544b here and on 39d5f88ab4e5 in the PR, so this is not a boot of the exact head. The kernel also has #491, the J615 display and memory floor patches and a T8122 series that lets the GPU use states 6 to 8 under the m3_thermal limit. It's my daily kernel since 2026-11-17 (three boots so far).

  • macsmc_soc_die lists all 12 keys (Tg0D Tg0P Tg0X Tg0b Tg0j Tg0v Te05 Te0P Tp05 Tp0L Tp0b Tp0r). On each boot the first die reading came 8.2 to 9.0 s after the driver's "no reading yet" line at 2.7 s. The runtime cap stayed at 2 until then. There were no fallback lines after that.
  • Which key runs hottest depends on the load, so the governor needs all 12. In 600 s of GPU-only load at state 2 it was a P-core key (Tp0b 86.4 C, Tg0P 80.5 C). With a higher limit the GPU ran at states 2 to 5 and the GPU keys led (Tg0P 93.8 C with the limit at 90 C, 95.9 C at 92 C). Under a combined CPU and GPU load it was the E-cluster key Te0P.
  • The critical step goes to state 2 as it should. With the default 80 C limit, a combined load started all 8 cores at once and the die jumped past the 88 C critical point between two readings. The cap went from 8 to 2 in one step (logged as critical at 95.9 C). It stayed at 2 for the whole 300 s while arm64: dts: apple: t8122-j615: Add CPU thermal zones #491's zones held the die at 95 C (max 95.8, mean 94.9).
  • With the default 80 C limit, 600 s of GPU-only load stepped down to state 2 within 5 s and stayed there. The hottest key ended at 86.4 C.

The session summaries found no asahi errors, faults or timeouts in the kernel log. The throughput and tuning numbers belong to the state 6 to 8 series (#317). I'll post them with the PR for it.

@freber

freber commented Nov 18, 2026

Copy link
Copy Markdown

Claude Code wrote this up from my tests.

I ported this PR and #491 to 7.3 in aurora-silicon/linux#2203, together with #500, since 7.3 ships from aurora-silicon. Your four commits keep you as author and keep your Signed-off-by. My Signed-off-by follows yours.

On 7.3 the die keys already come from apple,soc-die-keys in t8122.dtsi, so the port drops the J615 key table. In the port the hwmon commit keeps the rule that the J615 registers macsmc_soc_die only with all 12 keys present. If you'd rather open the 7.3 version of #410 and #491 yourself, I can drop them from #2203 and stack on yours.

@ericjuta

Copy link
Copy Markdown
Author

@freber keep them in aurora-silicon/linux#2203, thanks. Authorship and sign-off as you have them is fine, and I'd rather not split the 7.3 review across two PRs. Dropping the J615 key table in favour of apple,soc-die-keys makes sense. Ping me if anything needs changing on my side.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants