Skip to content

arm64: dts: apple: t8132: CPU DVFS and deep idle on the cooled M4 Macs - #1035

Closed
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
dt/t8132-20261107
Closed

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
dt/t8132-20261107

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

The M4 cluster cpufreq and cpuidle nodes were enabled only on the J713 (MacBook Air 13), where they wait for that board's thermal owner. The MacBook Pro 14 (J604), both iMacs (J623, J624) and the Mac mini (J773g) have fans and the same SoC blocks, but booted without CPU DVFS or deep idle.

This enables cpufreq_e, cpufreq_p and cpuidle on those four boards. The J715 (MacBook Air 15) is fanless like the J713 and is left alone until it has the same thermal owner.

Checks: dtbs_check adds no warning.

Needs hardware test (no M4 base Mac here): /sys/devices/system/cpu/cpufreq/policy*/scaling_available_frequencies should list both clusters' states, and /sys/devices/system/cpu/cpu*/cpuidle/state*/usage should count up at idle.

🤖 Generated with Claude Code

… M4 Macs

The M4 cluster cpufreq and cpuidle nodes are only enabled on the J713
(MacBook Air 13), where they wait for that board's thermal owner. The
MacBook Pro 14 (J604), both iMacs (J623, J624) and the Mac mini (J773g)
have fans and run the same SoC blocks, but booted without DVFS or deep
idle.

Enable cpufreq_e, cpufreq_p and cpuidle on those four boards. The J715
(MacBook Air 15) is fanless like the J713 and stays as it is until it
has the same thermal owner.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
@techmore

techmore commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the full PR-head result: #1035 (comment)

Thanks for this. Hardware test on an M4 Mac mini, interim: CPU DVFS is tested, deep idle is not yet. The full run at this PR's head is in progress, and I'll add it here as a follow-up comment.

Mac and build

  • Mac mini (M4, 2024), apple,j773g apple,t8132 apple,arm-platform.
  • Distribution: Omarchy 4.0.0.r7519.gd367a56 (installed through GravityLinux packages). This is not an Aurora release tag.
  • Kernel 7.3.0-m4atlrx+ (Aurora base plus local test-only J773g bring-up patches). This is not this PR's head, which matters for deep idle (see below).
  • Device tree: our working J773g tree plus exactly this PR's three status flips (/cpuidle, /soc/performance-controller@210e20000, @211e20000 → okay). A sorted decompile diff shows only those three changes.
  • Loader: local compact m1n1 stage 2 (test build) → U-Boot from uboot-gravity 2026.07.asahi2.gravity203-1 → Limine 12.9.6-1. The installed m1n1 package (m1n1-gravity 1.6.1.gravity20261013-3) was not the stage 2 used for this boot.
  • Command line without idle=nop, nohlt or arm64.nowfxt.
  • Firmware: asahi,os-fw-version: 26.6.2; asahi,system-fw-version: unknown (read on the same Mac's normal boot).

Actions and results

Action Result
Boot, all 10 CPUs online pass
cpufreq policies register (apple-cpufreq, schedutil) pass: policy0 = CPUs 0,7,8,9, 18 states, 912 MHz–4.104 GHz; policy1 = CPUs 1–6, 8 states, 900 MHz–2.892 GHz
Frequency changes with load and idle pass: policy0 sampled at 1.800 GHz under load and 1.260 GHz after 90 s idle; policy1 sampled at 1.860 GHz in both
Stability: 20 s per-CPU load, 5-minute hold, clean reboot pass: no Oops, panic, lockup or watchdog reset
cpuidle driver and states register not tested: current_driver = none, no state* directories. My kernel's Apple cpuidle driver has no apple,t8132-cpuidle match; this PR's head (6f5b42e) does.
cpuidle state*/usage before/after idle not tested (same reason)
Second boot not tested: the first boot couldn't exercise cpuidle with this kernel; planned for the PR-head run

Addendum: outlier
On this boot scaling_max_freq for policy0 was 1800000, and for policy1 1860000, even though the available tables go up to 4104000 and 2892000. So under load the P-cores stayed at 1.8 GHz. I haven't found the source of that cap yet. I'll check it on the PR-head run and report whether it's still there.

Logs
No error-level lines related to cpufreq or cpuidle. The only cpuidle lines are the generic cpuidle: using governor ladder / menu.

@techmore

techmore commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Thanks, Ryan. Follow-up to my interim comment: pass on two complete boots at this PR's head on the M4 Mac mini. Both cpufreq policies listed available frequencies, and state1 idle usage increased on all 10 CPUs during a 90-second idle window.

Mac and build

  • Mac mini (M4, 2024), apple,j773g apple,t8132 apple,arm-platform.
  • Kernel: this PR's head 6f5b42eba076 plus one local TEST ONLY patch that restores Atlantic AQC113 RX on this Mini (needed for the test's network access; not CPU-related). No other patches. uname -r: 7.3.0-m4atlrx+.
  • Device tree: our working J773g tree plus exactly this PR's three status flips (cpufreq_e, cpufreq_p, cpuidle → okay). A sorted decompile diff shows only those changes.
  • Loader: local compact m1n1 stage 2 (test build) → U-Boot (uboot-gravity 2026.07.asahi2.gravity203-1) → Limine 12.9.6-1. The installed m1n1-gravity 1.6.1.gravity20261013-3 package was not the stage 2 used for this boot. Distribution: Omarchy 4.0.0.r7519.gd367a56 through GravityLinux packages; this is not an Aurora release tag.
  • Command line without idle=nop, nohlt or arm64.nowfxt.
  • Firmware: asahi,os-fw-version: 26.6.2; asahi,system-fw-version: unknown.

Actions and results (both boots)

Action Result
Boot, CPUs present/online 0-9 pass ×2
cpuidle driver registers pass ×2: current_driver = apple_idle, governor menu
cpuidle states on every CPU pass ×2: state0 and state1, both WFI / "CPU clock-gated", latency 1, residency 1, rejected 0
Idle states used pass ×2: state1 usage and time rose on all 10 CPUs over a 90 s idle window, and again after a 20 s all-core load
cpufreq policies register pass ×2: policy0 = CPUs 0,7,8,9; policy1 = CPUs 1–6; apple-cpufreq, schedutil
Frequency follows load pass ×2: policy0 1.260 GHz after idle → 1.800 GHz under load (all 40 samples) → 1.260 GHz after; policy1 held 1.860 GHz throughout
Stability pass ×2: 5-minute hold over SSH, no SError, Oops, panic, lockup or watchdog reset; no cpufreq/cpuidle errors; clean reboot

state1 usage, CPU 0, start → after 90 s idle → after load: boot 1 19650 → 41080 → 41351, boot 2 16807 → 40548 → 40792. Every other CPU shows the same pattern. Full per-CPU tables are available if useful.

Addendum: 1.8 / 1.86 GHz ceiling
scaling_max_freq stayed at 1800000 (policy0) and 1860000 (policy1) on both boots. The available-frequency lists topped out at 4104 and 2892 MHz; cpuinfo_max_freq reported 4464 and 2892 MHz. The cap appears consistent with the driver's bootstrap restriction: soc_t8132_info in apple-soc-cpufreq.c has .needs_thermal_owner = true and .max_unmanaged_pstate = 4 (P-state 4 = 1800 / 1860 MHz). My inference is that, without a J773g board thermal owner, that cap remains active; I haven't independently verified the active QoS constraint. boost was 1, the power profile was performance, no CPU thermal zone was present, and no thermal or throttling error was logged.

Untested: sustained load beyond 20 s, suspend/resume, and anything above the 1.8 / 1.86 GHz cap.

@aeries0x

aeries0x commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hardware test on the J604 (MacBook Pro 14", M4, Mac16,1): pass on both checks.

Build

  • integration/aurora 33bec40 with this PR's commit cherry-picked on top (the PR head itself is behind integration).
  • Device tree: t8132-j604.dts from this PR; the disabled AOP audio node removed locally (no functional change).
  • Local kernel config with sound disabled; cpufreq and cpuidle built in. Booted RAM-only through m1n1 (it appends idle=nop arm64.nowfxt).

Results

  • cpufreq: two policies, driver apple-cpufreq, governor schedutil.
    • policy0 (CPUs 0,7,8,9, P): 10 states, 912–4104 MHz
    • policy1 (CPUs 1–6, E): 8 states, 900–2892 MHz
  • cpuidle: driver apple_idle, states WFI WFI; state1/usage increased on all 10 CPUs during a 90 s idle window.
  • 10/10 CPUs online, no errors or oops in dmesg.

Not covered: frequency changes under load (my quick load test was inconclusive; I'll repeat it with a proper load).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants