Repository navigation
arm64: idle: T6050 idles in WFI even with idle=nop - #1152
DjDeveloperr merged 1 commit into
Conversation
m1n1 appends "idle=nop arm64.nowfxt" to the command line on every chip whose Apple system registers are locked (M4 and later), for kernels that do not preserve the state WFI loses there. It appends them after the user's arguments, so an idle= on the command line cannot override it. This kernel preserves that state (apple_wfi_quirk_init(), and WFxT is forced off for M4 and later in idreg-override), so on T6050 idle=nop only makes every idle CPU spin: cpuidle's two WFI states call cpu_do_idle(), which does nothing with idle=nop. Treat T6050 (MIDR parts 0x064 and 0x065) like T8142 and keep WFI as the idle method. On the 16-inch M5 Pro (J716s) the system then draws 9.8 W at idle on the charger instead of 16.4 W (SMC total system power), and a 56-minute idle soak with an FP consistency check on all 18 CPUs and four s2idle steps up to a real suspend/resume passed. On the 14-inch M5 Pro (J714s), betizzel measured 5.6 W against 15.3 W, and a per-CPU register check passed 250,000 1 ms sleeps on each of its 15 CPUs. Add apple_keep_idle_nop to keep idle=nop for comparisons and as a fallback that needs no new kernel. Link: betizzel/omarchy-m5@a5df9e4 Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com> Assisted-by: LLM Claude
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Tested on a J714s (14-inch M5 Pro), RAM-boot kit on the PR #1012 kit kernel with this commit cherry-picked, aura still appending SMC total system power (PSTR) / heatpipe (PHPC) at idle, same machine, same kit:
Under load it also lets a single core run at its top clock: a P core measured 4.60 GHz (dependent add chain) against 3.63 GHz with its five siblings spinning, and one busy P core draws 9.5 W total with the CLPC memory floor up (7.9 W without it) instead of 44 W. Two boots (about 10 minutes of idle, loads, GPU work): no SError, Oops or RCU stall. 🤖 Generated with Claude Code |
|
Tested on
Without this commit, integration/aurora's T6050 idle loop spins under the loader's |
d6a8ece
into
aurora-silicon:integration/aurora
m1n1 appends
idle=nop arm64.nowfxtto the command line on M4 and later chips with locked Apple system registers, after the user's arguments, so it cannot be overridden from the command line. Aurora's m1n1 and aura already skip the append for T8140, T8132, T6040 and T6041, but not for T6050, and the m1n1 builds people use on the M5 Pro (including ours) still append it. Withidle=nopboth cpuidle WFI states call acpu_do_idle()that does nothing, so the J716s (MacBook Pro 16-inch, M5 Pro) never actually idled: every idle CPU spun.This kernel already preserves the state WFI loses on these cores (
apple_wfi_quirk_init(), WFxT forced off in idreg-override), and 5c9cbb2 overridesidle=nopfor T8142 for the same reason. This extends that override to the T6050 MIDRs (parts 0x064 and 0x065) and addsapple_keep_idle_nop(documented in kernel-parameters.txt) to keepidle=nopfor A/B comparisons or as a fallback that needs no rebuild.Tested on: J716s,
integration/aurora+ the T6050 PRs + this patch (kernel7.3.0-gf080637018df), m1n1 still appendingidle=nop arm64.nowfxt, bootargskvm-arm.wfi_trap_policy=trap:Apple: preserving registers across WFI,Apple: idling in WFI, ignoring idle=nop; cpuidle driverapple_idle; CPU 0 spent 209 s of its first 211 s in the WFI state.panic_on_rcu_stall=1), Oops or SError; a floating-point consistency run passes on all 18 CPUs; CPU 0 had 409k WFI entries.pm_testfreezer, devices and platform, then a realecho mem > /sys/power/statewith power-button wake (346 s suspended,suspend_statssuccess 4 / fail 0, USB, Ethernet and battery back).arch/arm64/kernel/idle.obuilds withW=1(LLVM, arm64) onintegration/aurora4114f76; checkpatch--strictclean.Dependencies: none; applies on
integration/aurora4114f76.Open questions:
chip_id != ...list in m1n1/aurakboot.cthat already skipsidle=nop arm64.nowfxtfor T8140/T8132/T6040/T6041 (T6050 still needsarm64.nowfxtunless the kernel forces it, which it does)? The kernel override would then only matter for older loaders, as it does for T8142. Happy to send that one-liner instead or as well.