Repository navigation
Conversation
|
Tested on a second J604: the Mac from #1931, with OS firmware 26.6.2 like yours. With this PR the fan runs for the whole load, and P+E holds about 13.7 W where the stock budget allowed 7.7 W. Method as yours: ten shell busy loops after 120 s idle, held for 180 s, sampled at about 1 Hz from sysfs and the
This fixes what I reported in #1931 on this Mac. I'll close that issue once this lands. Disclosure: an LLM (Claude) ran these boots and measurements on my Mac and drafted this. I reviewed it and am responsible for it. Assisted-by: LLM |
|
Thanks for the clear write-up and the J604 measurements. In this tree we select behaviour by a hardware property rather than a machine list. The new policy is chosen by Could the "unbudgeted" policy be selected from the device tree instead? For example, it could apply when the SMC hwmon node describes a fan (the J604 one-fan description in #1953 adds exactly that), or when a small If it helps, we can run thermal rows on our fan-cooled M1 Pro and M4 Pro to check that the shared policy code is unchanged there. |
|
The two J604 rows here, yours and the one from #1931, show the budget is what stops the fan. With this PR P+E holds 13.7 W where it was 7.7 W, and the fan keeps running. One request on how the policy is chosen. The reason for dropping the budget is that the machine has a fan the SMC runs on the SoC's heat. That is a property of the hardware, and the device tree already describes it: the fan node under
That keeps the policy tied to what the board has, so it does not grow into a board list as more fan machines run on this driver. The KUnit case does not need to change. |
The T8132 PMP thermal driver runs one policy on every M4 Mac on the
firmware path: the die guard (cooling from 106 C, target 110 C, full
protection 115 C, shutdown after three samples at 120 C) plus the
fanless MacBook Air's measured-rail energy budget, a 600 J burst at up
to 20 W, then 8 W regulated toward an 85 C filtered die with a 4 W
floor.
On a Mac with a fan that budget defeats the fan, whose speed the SMC
appears to set from the heat the SoC makes. On the J604 (MacBook Pro
14-inch, M4), with ten busy loops for 180 s on Aurora's linux-aurora
7.3.0.aurora1-37 package, the burst ran out after 53 s, the P and E
rails (PP0b + PPbb) fell from up to 22.7 W to 5-12 W, the heatpipe
power (PHPC) from up to 28 W to 8-17 W, and 19 s later the SMC set the
fan target to 0 for the rest of the load. macOS 27.2 on the same Mac,
same load: the fan ramps from 2500 rpm to its 6550 rpm maximum and
never stops.
Drop the budget on every board whose device tree describes a fan: a
child of the SMC hwmon node with apple,fan-maximum. On the current
T8132 device trees that is the J604, the J623 and J624 (iMac) and the
J773g (Mac mini); the J713 and J715 (Air) have no fan node and keep
the budget. The die guard stays on every board: the rails are still
read and reported, a rail fault or a telemetry gap still selects full
protection and recovers one step per second, but sustained power no
longer restricts.
Tested on a J604 whose Linux stub runs the 26.6.2 OS firmware, AC,
power profile performance, the same load; stock is Aurora's
linux-aurora 7.3.0.aurora1-37 package, "this commit" is
integration/aurora of 2026-11-20 plus this commit (the device tree
selected the unbudgeted path: "no power budget (fan cooled; rail
faults still restrict)"):
stock this commit
P+E rails, 60-180 s 7.7 W mean 16.4 W mean, 15.4 W min
fan target 0 from 72 s never 0 once started;
3630 rpm at 120 s, 4400
at 170 s
die, 60-180 s (sysfs) mean 80 C mean 104 C, max 107.5 C
Over 15 minutes of the same load the fan reached about 5600 rpm at
6 min and 5970 at 15 min, the P and E rails about 17.4 W, the die a
101.5 C mean (highest logged sample 108.75 C, highest sample in the
driver log 110.25 C). At idle the fan is off. The CPU is now held by
the die guard, not by power.
Assisted-by: LLM
Signed-off-by: Friedrich <261542475+aeries0x@users.noreply.github.com>
1df8dfb to
8c9ec70
Compare
|
Updated in 8c9ec70: On the current T8132 DTs that selects the J604, J623 and J624, and also the J773g. You mentioned the J773g has no fan node yet, but Re-tested on the J604 at this head; the PR description has the full table. The boot log shows the DT selection ("no power budget (fan cooled; rail faults still restrict)"). Under ten busy loops, P+E held 16.4 W at 60-180 s (stock: 7.7 W) and 17.4 W at 5-15 min, with the fan reaching 5970 rpm and never stopping. CPU+GPU for 180 s gave P+E 12.7 W and GPU 5.2 W with no errors. KUnit The M1 Pro and M4 Pro won't reach this code, since |
|
Thanks for 8c9ec70, and for the correction about the J773g: |
On the J604 (MacBook Pro 14-inch, M4),
apple-pmp-thermalapplies the fanless Airs' energy budget: a 600 J burst at up to 20 W, then 8 W regulated toward an 85 °C filtered die, with a 4 W floor. The SMC appears to set the fan speed from the heat the SoC makes, so under a sustained all-core load the budget starves the fan: it stops during the load and the CPU stays at 5-9 W (7.7 W mean). #1931 reports the same on another J604.This PR drops the budget on every board whose device tree describes a fan, and keeps the die guard as it is. A board counts as fan cooled when a child of the SMC hwmon node has
apple,fan-maximum. On the current T8132 DTs that is the J604, the J623 and J624, and the J773g; the J713 and J715 keep the budget.Changes on those boards:
apple_pmp_power_init_unbudgeted(): the rails are still read and reported (power_statusshowsbudget=0, the hwmon sum channel is labelled "CPU/GPU rail sum"). A rail fault or a telemetry gap still selects full protection and recovers one step per second; sustained power never restricts.temp-sensorhas the J713's limits: 110 °C target and 125 °C maximum on Ta000m, Te000m, Te001m and Tp000m-Tp002m.apple_pmp_power_release(), shared by both paths; the Airs run the same arithmetic as before.Tested
J604 (Mac16,1, Linux stub on the 26.6.2 OS firmware), AC, power profile performance. Kernel:
integration/aurora50c5079 plus this commit, with #1888 (the J604 speaker enable) reverted locally so the test kernel keeps the speakers off; Stage 2: aura 1.0.0b13.1 + U-Boot aurora11. The boot log shows the DT selection:apple-pmp-thermal: T8132 provisional policy: ... no power budget (fan cooled; rail faults still restrict). Stock: Aurora'slinux-aurora7.3.0.aurora1-37 package with aura 1.0.0b13.1 (same budget logic as this base). Load: ten shell busy loops after two minutes idle, sampled every 1-4 s from sysfs. No SMC writes. "P+E" is PP0b + PPbb, without the GPU rail.compute.heavy, depth 8) for 180 s: P+E 12.7 W, GPU 5.2 W, die mean 104 °C, max 108.75 °C sampled (110.5 °C in the driver log), fan 2500 -> 4860 rpm, never 0; no GPU or other new error in the kernel log.--strictand a W=1 LLVM build of both changed files: clean. Aurora's host tests: same results as the base. KUnit (kunit.py run --arch=arm64, QEMU): apple-pmp-policy 8/8 passed.Without the budget, the die guard sets the limit. It steps both clusters together and its 108 °C backstop reacts to short peaks, so under this load P runs at about 3.47 GHz and E at 2.17 GHz.
Assisted-by: LLM