Repository navigation
arm64: dts: apple: t8152-j873g: let userspace set the fan speed - #3632
Merged
RyanTheTide merged 1 commit intoNov 29, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
In automatic mode the J873g SMC holds its fan at the F0Mn minimum; t8152-j873-thermal.dtsi records it there even at 93 C under sustained full load. fan1_target is read-only because fan-F0Ac has no apple,fan-manual-control, so nothing on Linux can raise the fan. Mark the fan apple,fan-manual-control, as the J714s and J575c fans are, so userspace can set it, for a fan curve like the one macOS runs on this Mac. The node already names the F0md mode key. This SMC has no Ftst unlock key; F0md is writable and takes the manual mode directly. The SMC drives the fan until userspace writes a target, and writing 0 hands it back. The J873g devicetree describes no SoC die fan trip and no hotspot fan assistance, so no kernel thermal policy takes the fan. Signed-off-by: Eric Hileman <4987539+ericvhileman@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: MERGE at e92996a1
Blockers: none
Checked:
- Audited
+8/-0DT addition inarch/arm64/boot/dts/apple/t8152-j873g.dts(DCOSigned-off-by:present,MERGEABLEonmain,What:/Tested:/Risk: two-waypresent). - Verified
apple,fan-manual-controlis a valid boolean property inDocumentation/devicetree/bindings/hwmon/apple,smc-hwmon.yaml(L184) and thatfan-F0Acalready defines all required companion keys (F0Mn,F0Mx,F0Tg,F0md). - Verified
drivers/hwmon/macsmc-hwmon.c(L572, L1366) gates writablefan1_targetonapple,fan-manual-controlwith clamping to[F0Mn, F0Mx]and automatic SMC handback on0, without engaging hotspot fan assistance (noapple,soc-die-*properties in the J873g DT). - Exact-head
e92996a1J873g (T8152, FW 27.2) hardware row verified (fan1_target0644,2200rpm applied and returned to1000rpm on0,9900clamped to4900rpm max, 15-min all-core load check, clean reboot back to SMC control,0failed units).
Evidence
arch/arm64/boot/dts/apple/t8152-j873g.dtsL505–525: single booleanapple,fan-manual-control;underfan-F0Ac, matchingt6050-j714s.dtsandt6041-j575c.dts.- Fork PR
dt-checkswas skipped; letreadiness/dt-checksclear if triggered before merge.
Contributor
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
Contributor
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Mark the J873g (Mac mini M6) fan
apple,fan-manual-control, sofan1_targetis writable and userspace can raise the fan, which the SMC's automatic mode leaves at its 1000 rpm minimum under load.Tested: J873g / T8152 (Mac mini M6) at
e92996a1062:fan1_target0644; 2200 rpm ran at 2200 and went back to the SMC's 1000 rpm after 0; 9900 was clamped to the 4900 rpm maximum; 15 min all-core load with the fan held at 1000 rpm peaked at 89.6 C with no trip and no SMC override; a reboot with the fan held came up under SMC control; 0 failed units and the same kernel warnings as with the base DTB.Risk: two-way door · J873g only (one devicetree property)
Not yet: s2idle and poweroff with the fan held (this Mac mini is headless and remote, with no RTC to wake it); a second J873g; a row on an Aurora distribution kernel and its default command line (this row's kernel is a NixOS build of
mainat66fbacc273c6, command line below);CHECK_DTBSon my side (theapple,smc-hwmonbinding declares the property;dt-checkscovers it here).@joshuaswarren
Details
fan-F0Acalready names the mode, target, minimum and maximum keys (F0md,F0Tg,F0Mn,F0Mx); this adds onlyapple,fan-manual-controland a comment with the reason, ast6050-j714s.dts(#1944) andt6041-j575c.dts(#2898) do. No driver change.macsmc_hwmon.fan_control=1was the only way to set this fan; J873g: all CPU performance states under SMC thermal zones (M6 Mac mini) #1798's rows used it for a userspace fan controller on this Mac (fan up to 4344-4900 rpm; 1305 bogo ops/s with it, 970 with the fan held at its minimum). Since hwmon: macsmc: Drop the fan_control module parameter #2448 the devicetree property is the only path, and J873g does not have it.F0Mn/F0Mx, read fresh on each write, and writing 0 hands the fan back to the SMC (Documentation/hwmon/macsmc-hwmon.rst).Ftstunlock key;F0md(ui8) is writable and takes the manual mode directly, as on the J575c.apple,soc-die-*properties, so hotspot fan assistance stays off, and no SoC-die passive trip, so the M5 governor's fan curve does not govern; the property makes no kernel policy drive the fan.macmonsamples over 7 days on J873g Mac minis show 1000 rpm below about 58 C, a 90th percentile of 2613 rpm at 71 C, and a highest sampled speed of 2620 rpm.66fbacc273c61117ed2e927991843742f828a11b, the commit the test Mac's kernel was built from. Both trial boots run that kernel binary, initramfs and command line; only the DTB differs. It merges intomain(498d53fd4a701fdb37a292db6d7938503bd03955) without conflicts, and the mergedt8152-j873g.dtb, decompiled withdtc -s, differs frommain's only by this property.drivers/hwmon/macsmc-hwmon.cis identical at both;drivers/mfd/macsmc.candinclude/linux/mfd/macsmc.hhave changed onmainsince (mfd: macsmc: Initialise the completions before the RTKit #2935, mfd: macsmc: take the dark wake reasons from the device tree #3272, thermal: apple-pmp: validate SMC rail key metadata once per binding #3288), which this row does not exercise.Evidence
Machine and build. Mac mini M6,
apple,j873g/apple,t8152; system firmware 27.2, OS firmware 27.0; aura Stage 1 1.0.0b14, Stage 2 1.0.0b17. Kernel 7.3.0 built from66fbacc273c6(NixOS 26.11 with nixos-aurora). Command line:user4k=on earlycon console=tty0 rd.shell=0 rd.emergency=reboot nvme_apple.flush_interval=0 firmware_class.path=/run/aurora-firmware/vendorfw quiet rd.udev.log_level=3 udev.log_level=3 systemd.show_status=auto root=fstab loglevel=3 lsm=landlock,yama,bpf panic=15 arm64.nowfxt. SELinux is not enabled on this system, so there is no denial count.Method. Two aura-try
boot=one-shot trials on 2026-11-29, each the installed kernel, initramfs and command line with one of two DTBs, both built from this branch asscripts/Makefile.dtbsbuilds them (clang -E, thendtc -@):66fbacc273c6946d3b0aa41c…(byte-identical to the Mac's installed base DTB)e92996a10623c7298ea3f9f9…apple,fan-manual-control;infan-F0Ac, nothing elseLoad is 12 ×
sha256sum /dev/zerofor 900 s. Temperatures are the 30 CPU die zones (smc-te*,smc-tp*), read about once a second and logged every 11 s; "hottest" is the hottest of them, "mean" their mean. Their lowest passive trip is 110 C; the load would have stopped at 105 C.Base DTB (the fan as it is on
main).fan1_targetecho 2200 > fan1_targetas root:Permission denied; fan stays at 1000 rpmHead DTB.
fan1_targetfan1_min1000,fan1_max4900; the property is in/proc/device-treefan1_targetreads 1000fan1_max), then 0fan1_targetreads 4900; 4990 rpm after 3 s, then 4898-4910; after 0: 892 rpm at 3 s, 1000 rpm from 6 s onsystemctl rebootfan1_target1000 at 20 s uptimestays in mode … after releaseorcannot hand the fans backon any bootDie temperature under the two loads (fan at 1000 rpm in both):
Regression, base boot against head boot. 0 failed units on both. Kernel messages at warning level and above in the first 120 s, with numbers and addresses folded: the same 16 distinct lines (54 messages) on both, none from
macsmc; 10 messages at error level and above on each, counted at 125 s of uptime.macsmc-hwmonlogs the same two lines on both (CPU0 cluster/CPU1 cluster: higher states handed to its thermal zones).