Repository navigation
Conversation
|
Blockers: 1. The DT follows the J714s's: the same lower-case mode keys, and manual control on both fans. Manual targets are clamped to the minimum and maximum the SMC reports (drivers/hwmon/macsmc-hwmon.c:579-586), so the fan limits come from the machine.
HW row: J716c on the default command line: sensors shows both fans and the hotspot. Writing fan1/fan2 targets inside the range moves the tachometers to them, a value outside the range is clamped, and dropping the request returns both fans to automatic control. One s2idle cycle, and 0 SELinux denials, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
Under sustained GPU load the SMC's automatic fan mode lets the SoC hotspot pass 109 C on the J716c. Add fan assistance that leaves the firmware's power budget and the CPU policy alone: while the GPU is busy and the hotspot reaches 98 C, request the fans' rated speed. Hand them back to automatic control after a 30 s hold in which the GPU was idle or the hotspot stayed below 82 C, or at once when the hotspot cannot be read. A partial request (a later fan refusing after an earlier one accepted) is released before the next attempt. While boosted, the request is repeated on each step on which the GPU is busy and the hotspot is at or above 82 C, so fans the SMC took back when the hwmon cell was unbound and bound again between two such steps are set again. During the hold the request is not repeated: fans the SMC took back then stay automatic until such a step comes or the hold ends. A step that finds no provider reads no hotspot and ends the boost, and a new boost starts at 98 C. It is on by default wherever the SMC hwmon node describes what it needs: the SoC hotspot as the only key of the SoC die temperature zone (TCMb in apple,soc-die-keys), which is the only input the assistance reads, and at least one fan a policy may set (apple,fan-manual-control) that names its mode, target, minimum and maximum keys. The kernel fan request writes every fan that names a mode key, so each of those must have apple,fan-manual-control. Every boost request checks the node of the bound provider it writes to, under the provider lock, so a replaced provider is checked again. When the board is selected the device tree is scanned for such a node with every parent available; without one the governor stays idle. The new aurora.m5_hotspot_fans=0 opts out. Whenever the host power budget controller (m5_thermal_governor bit 0) is enabled it owns the fans with its own curve, and the assistance stays off. tools/asahi/m5-hotspot-fans-dt-tests.py compiles these checks against libfdt with a recording stand-in for the fan request, and runs them on synthetic trees and the T6050 board trees (the J716c with #2208's full description included), checking the exact set of fans each accepted request writes. Developed with Claude Code. Signed-off-by: Erik Bourget <erik@ebourget.net>
Under sustained GPU load the SMC's automatic fan mode lets the SoC hotspot pass 109 C on the J716c. Add fan assistance that leaves the firmware's power budget and the CPU policy alone: while the GPU is busy and the hotspot reaches 98 C, request the fans' rated speed. Hand them back to automatic control after a 30 s hold in which the GPU was idle or the hotspot stayed below 82 C, or at once when the hotspot cannot be read. A partial request (a later fan refusing after an earlier one accepted) is released before the next attempt. While boosted, the request is repeated on each step on which the GPU is busy and the hotspot is at or above 82 C, so fans the SMC took back when the hwmon cell was unbound and bound again between two such steps are set again. During the hold the request is not repeated: fans the SMC took back then stay automatic until such a step comes or the hold ends. A step that finds no provider reads no hotspot and ends the boost, and a new boost starts at 98 C. It is on by default wherever the SMC hwmon node describes what it needs: the SoC hotspot as the only key of the SoC die temperature zone (TCMb in apple,soc-die-keys), which is the only input the assistance reads, and at least one fan a policy may set (apple,fan-manual-control) that names its mode, target, minimum and maximum keys. The kernel fan request writes every fan that names a mode key, so each of those must have apple,fan-manual-control. Every boost request checks the node of the bound provider it writes to, under the provider lock, so a replaced provider is checked again. When the board is selected the device tree is scanned for such a node with every parent available; without one the governor stays idle. The new aurora.m5_hotspot_fans=0 opts out. Whenever the host power budget controller (m5_thermal_governor bit 0) is enabled it owns the fans with its own curve, and the assistance stays off. tools/asahi/m5-hotspot-fans-dt-tests.py compiles these checks against libfdt with a recording stand-in for the fan request, and runs them on synthetic trees and the T6050 board trees (the J716c with #2208's full description included), checking the exact set of fans each accepted request writes. Signed-off-by: Erik Bourget <erik@ebourget.net>
6bac3f1 to
ed06b61
Compare
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Addressed both items in
Verified |
Under sustained GPU load the SMC's automatic fan mode lets the SoC hotspot pass 109 C on the J716c. Add fan assistance that leaves the firmware's power budget and the CPU policy alone: while the GPU is busy and the hotspot reaches 98 C, request the fans' rated speed. Hand them back to automatic control after a 30 s hold in which the GPU was idle or the hotspot stayed below 82 C, or at once when the hotspot cannot be read. A partial request (a later fan refusing after an earlier one accepted) is released before the next attempt. While boosted, the request is repeated on each step on which the GPU is busy and the hotspot is at or above 82 C, so fans the SMC took back when the hwmon cell was unbound and bound again between two such steps are set again. During the hold the request is not repeated: fans the SMC took back then stay automatic until such a step comes or the hold ends. A step that finds no provider reads no hotspot and ends the boost, and a new boost starts at 98 C. It is on by default wherever the SMC hwmon node describes what it needs: the SoC hotspot as the only key of the SoC die temperature zone (TCMb in apple,soc-die-keys), which is the only input the assistance reads, and at least one fan a policy may set (apple,fan-manual-control) that names its mode, target, minimum and maximum keys. The kernel fan request writes every fan that names a mode key, so each of those must have apple,fan-manual-control. Every boost request checks the node of the bound provider it writes to, under the provider lock, so a replaced provider is checked again. When the board is selected the device tree is scanned for such a node with every parent available; without one the governor stays idle. Whenever the host power budget controller (m5_thermal_governor bit 0) is enabled it owns the fans with its own curve, and the assistance stays off. tools/asahi/m5-hotspot-fans-dt-tests.py compiles these checks against libfdt with a recording stand-in for the fan request, and runs them on synthetic trees and the T6050 board trees (the J716c with #2208's full description included), checking the exact set of fans each accepted request writes. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Thanks, ed06b61 covers both points: the commit carries only the human Signed-off-by, and t6050-j716c.dts:187-206 now keeps temperature discovery and the TCMb die key together, which the base supports since ad0f936 (a listed key joins its discovered channel instead of adding one). The fan nodes match the binding and the limits come from the SMC. Looks good to me. The only thing left is the hardware row you already list, on this exact commit and the default command line: in-range fan1/fan2 targets tracked, an out-of-range value clamped, release returning both fans to automatic, one s2idle cycle, and 0 SELinux denials, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Review at ed06b6189817: 0 code, CI, policy, or attribution blockers.
Checked:
- DT & safety (§1/§2/§3):
arch/arm64/boot/dts/apple/t6050-j716c.dtsenables&smc_hwmon, includeshwmon-fan-dual.dtsi, sets T6050F0md/F1mdmode keys withapple,fan-manual-control, and inherits bothapple,discover-temperaturesandapple,soc-die-keys = "TCMb"fromt6050-die0.dtsi(whichdrivers/hwmon/macsmc-hwmon.csupports sincead0f93637543, letting the discoveredTCMbchannel supplymacsmc_soc_die). Manual fan targets remain clamped to the SMC-reportedF*Mn/F*Mxbounds and default to SMC automatic control. - Attribution (§4): Commit
ed06b6189817carries human author/committer andSigned-off-by:only. - CI:
dt-checksandhost-testsgreen.
Still owed before approval/merge (§5):
- The J716c hardware verification row already listed under Still to run, booting this exact commit (
ed06b6189817) on the default kernel command line: in-rangefan1_target/fan2_targettracking, out-of-range clamping, return to automatic mode on release, ones2idlecycle, and regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors).
Assisted-by: LLM (Gemini 4 Neon)
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 review at verified live head ed06b6189817c8c5f4ed885c41f1689fe453acf5 (live integration/aurora 0f111a0dc307, not superseded; live CI 2/2 green: dt-checks and host-tests).
Checklist Summary
- §1 No model gating, §2 Production-ready, §3 Safety, §4 Attribution, §6 Naming: PASS (0 code/policy/attribution/naming/CI blockers).
- Enables
&smc_hwmoninarch/arm64/boot/dts/apple/t6050-j716c.dts, includeshwmon-fan-dual.dtsi, sets T6050F0md/F1mdmode keys withapple,fan-manual-control, and inherits bothapple,discover-temperaturesandapple,soc-die-keys = "TCMb"fromt6050-die0.dtsi(supported together indrivers/hwmon/macsmc-hwmon.csincead0f93637543). - Manual fan speed targets default to SMC automatic control and are clamped to the SMC-reported
F*Mn/F*Mxbounds inmacsmc-hwmon.c(§3 limits come from the machine). - Commit
ed06b6189817carries human author/committer (Erik Bourget) and humanSigned-off-by:only. - Note: PR #2162 (
70a00e583b03) updated&pinctrl_ap'sgpio-reserved-rangesthree lines above&smc_hwmonint6050-j716c.dts; 3-way merge remains clean, though rebasing onto currentintegration/aurorawhen running the final boot test is recommended.
- Enables
Blocker (§5 Evidence)
- Exact-head J716c hardware & regression row missing: Earlier tests ran on older custom kernel
7.3.0-ewb270+and did not cover out-of-range clamping, automatic-mode release,s2idle, or full regression counts (as noted under## Still to run). Before approval/merge, please post a J716c boot at exact live headed06b6189817(or rebased onto currentintegration/aurora) on the default kernel command line confirming:- In-range
fan1_target/fan2_targettracking; - Out-of-range target clamping to SMC
F*Mn/F*Mxbounds; - Return to SMC automatic control on release;
- One
s2idlecycle; - Regression counts:
0SELinux denials,0failed units, and0new kernel errors.
- In-range
Assisted-by: LLM (Gemini 4 Neon)
Enable the J716c SMC hwmon node and include hwmon-fan-dual.dtsi with the
T6050 F0md/F1md mode keys and manual fan control enabled.
Keep both apple,discover-temperatures and apple,soc-die-keys ("TCMb")
inherited from t6050-die0.dtsi so all readable T* float sensors are
discovered while the discovered TCMb channel also supplies the
macsmc_soc_die thermal zone.
Signed-off-by: Erik Bourget <erik@ebourget.net>
ed06b61 to
37fee82
Compare
|
Note 🤖 Gemini 4 Hydrogen responding on behalf of erikwb Rebased Verified locally on
Completed the exact-head
|
Problem
The J716c (16-inch M5 Max MacBook Pro) leaves
&smc_hwmondisabled, so its two fans and SMC temperature sensors (including theTCMbSoC hotspot used by the GPU thermal governor) are not exposed through hwmon or themacsmc_soc_diethermal zone.Change
Enable
&smc_hwmoninarch/arm64/boot/dts/apple/t6050-j716c.dtsand includehwmon-fan-dual.dtsi, overriding both fans' mode keys toF0md/F1mdwithapple,fan-manual-control.Keep both
apple,discover-temperaturesandapple,soc-die-keys = "TCMb"inherited fromt6050-die0.dtsi. Withmacsmc-hwmondiscovery supportingapple,soc-die-keys(commitad0f93637543), this discovers all readable floatT*SMC keys while also markingTCMbas themacsmc_soc_diethermal zone sensor. Fan targets remain under SMC automatic control until requested, and manual targets are clamped to the SMC-reported minimum and maximum speeds indrivers/hwmon/macsmc-hwmon.c.Testing
integration/aurora(275d59d3bc82) at commit37fee82e714ewith human-only attribution (Signed-off-by: Erik Bourget <erik@ebourget.net>).make ARCH=arm64 LLVM=1 CHECK_DTBS=y apple/t6050-j716c.dtbandmake ARCH=arm64 LLVM=1 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/hwmon/apple,smc-hwmon.yamlwith 0hwmonschema warnings;./scripts/checkpatch.pl --strict --git 275d59d3bc82..HEADreports 0 errors, 0 warnings, and 0 checks;tools/asahi/hardware-defaults-tests.py(6/6),tools/asahi/t6050-combo-join-tests.py(3/3), andtools/testing/selftests/drivers/apple/macsmc-j713.py(9190 checks) pass.t6050-j716c.dtbconfirmsstatus = "okay",apple,discover-temperatures,apple,soc-die-keys = "TCMb", andfan-F0Ac/fan-F1Ac(F0md/F1md,apple,fan-manual-control).caccad389b9cwith thesmc_hwmonDT node enabled (prior to keepingapple,discover-temperatures), a fan-setting comparison on the same kernel measured 4K High FSR2 Balanced Cyberpunk 2077 throughput at23.59/25.25FPS under SMC automatic cooling vs26.44/26.61FPS at rated manual fan speeds (ABBArun order); a subsequent build at77602a74a746with the identical resolvedsmc_hwmonDT node probedmacsmc-hwmonwith 0 errors and exposed 344 temperature channels includingTCMb.37fee82e714eonintegration/aurora275d59d3bc82, default kernel command line):macsmc-hwmonprobed cleanly, registeredmacsmc_soc_dieonTCMb(59243mC), discovered 344 temperature channels includingTCMb, and exposedFan 1(1350–5349RPM) andFan 2(1350–5777RPM).(2600, 2800)RPM tofan1_target/fan2_targettracked on both tachometers at(2599, 2807)RPM (and2500RPM tracked at(2549, 2566)RPM).F*Mn/F*Mxbounds: writing500clamped readback targets to(1350, 1350)RPM (input(1346, 1351)RPM); writing9999clamped readback targets to(5349, 5777)RPM (input(5219, 5544)RPM).0tofan1_target/fan2_targetreturned both fans to SMC automatic control (target(1350, 1458)RPM,input(1350, 1455)RPM after 10 s).s2idlecycle (rtcwake -m mem -s 10):rc=0,suspend_stats/success0->1,fail=0, clean resume (PM: suspend exit).aurora-peripherals.service, matching the daily baseline), 0macsmc-hwmonkernel errors (boot-time errors on plain275d59d3bc82were only from unmerged 27.2 GPU/DCPExt support on2302600000.gpuand external2b2e00000.dcp/302e00000.dcp, plus382280000.usbPM: device_prepare(): genpd_prepare returns -11on suspend prep).Still to run
Assisted-by: LLM (Anthropic:Claude, OpenAI:GPT-6.2 Sol, Google:Gemini 4 Neon, Google:Gemini 4 Hydrogen)