Repository navigation
pmgr-misc: PMP resume fix, idle fabric governor and PMP for j314s - #91
Merged
4 commits merged intoOct 15, 2026
Merged
4 commits merged into
4 commits merged into
Conversation
Boot leaves the fabric at its high p-state and the driver only lowers it for system suspend, so the fabric stays high whenever the system is awake. On a t6000 MacBook Pro with nothing attached, lowering it while idle saves about 0.5 W with the display off and 0.6 W at half brightness. Add an idle_fabric_pstate parameter, 0 (off) by default. When set, a worker lowers the fabric to that p-state while every cpufreq policy runs at its lowest frequency, no external hold is taken and none of the GPU, AVD and ISP power domains is active (actual state on, or target on with auto power management, as the power domain driver reads them). If any expected voter domain is missing, the governor never lowers. While the fabric is high the worker uses a deferrable timer, so it never wakes an idle CPU; while it is low it uses a normal 250 ms timer, which limits how long new load runs at reduced bandwidth (kernel memcpy drops from 23.6 to 14.7 GB/s at fabric 1). This trades burst bandwidth for idle power and is not a bandwidth guarantee. apple_pmgr_fabric_hold() and apple_pmgr_fabric_release() let users the governor cannot see keep the fabric up; a hold raises it and waits until the hardware reports the boot p-state. The worker starts and stops with the parameter, prepare stops it and raises the fabric before any device suspends, and complete restarts it. Bind attributes are suppressed so the workers and holders cannot outlive the driver. Signed-off-by: Marcelo Alcantara <[email protected]>
External display domains stay powered even when idle, so the pmgr-misc idle fabric governor cannot tell from them whether an external display is active. Take a fabric hold before an external CRTC powers up and release it when the CRTC turns off, so scanout never starts or runs on a lowered fabric. The internal display was qualified at the low fabric p-state and does not hold it. Signed-off-by: Marcelo Alcantara <[email protected]>
With PMP enabled in the device tree, its firmware manages system power states, including the fabric (p-state 3 while awake on t6000) and DCS (6). pmgr-misc still wrote its own suspend p-states for both in suspend_noirq and restored the boot ones in resume_noirq; on a t6000 MacBook Pro the system then never woke from s2idle. Testing each write on its own showed the DCS write is the one that breaks resume. The fabric write is safe and matters: with the fabric at its suspend p-state, s2idle power with nothing attached drops from 2.62 W to 2.27 W at the 5 V input. When the PMP node is available, lower only the fabric for suspend, saving PMP's desired fabric p-state and handing it back on resume, and leave DCS alone. Keep the idle fabric governor off and make fabric holds delegate to the firmware. This keys on the device tree configuration rather than on the PMP driver having booted its firmware. Signed-off-by: Marcelo Alcantara <[email protected]>
Let m1n1 enable the Power Management Processor on the 14-inch MacBook Pro (M1 Pro). PMP runs the fabric at p-state 3 and DCS at 6 while awake instead of the boot 7 and 9. Measured with nothing attached: awake idle from the battery drops by about 0.8 W with the backlight at 0 and by about 1.0 W with the display off (5.0 to 4.0 W). PMP only resumes from s2idle when pmgr-misc leaves DCS alone; with pmgr-misc lowering just the fabric for sleep, s2idle power with nothing attached is 2.27 W at the 5 V input: 0.35 W below PMP with no host writes and 0.45 W below the standard configuration. The earlier variant that skipped all host writes woke 10 of 10 timed wakes with a Thunderbolt peer attached; the fabric-only variant is qualified separately. Only j314s has been qualified; other t600x boards keep PMP off. Signed-off-by: Marcelo Alcantara <[email protected]>
be1c019
|
Thanks @maralcbr, this is merged through #123 with your four commits unchanged and one review-fix commit on top. We can't push to your fork. The fixes:
The default path was checked on our M1 Air (lab job |
This was referenced Oct 29, 2026
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.
Summary
Battery work on the 14-inch M1 Pro (t6000, j314s). Four commits:
apple_pmgr_misc.idle_fabric_pstateparameter (default 0, off) lowers it while every cpufreq policy sits at its minimum and the GPU, AVD and ISP power domains are off. It raises the fabric again as soon as any of that changes.Measurements
j314s, Aurora 2026.10.09.8 base, nothing attached. 5 V input power comes from the USB-C port of a second Mac; battery numbers come from the M1's own gauge over 15-minute windows.
Resume with PMP: 23 of 23 timed wakes across three runs, 10 of them on the final fabric-only variant with a Thunderbolt peer attached and traffic checked after each wake. The fabric came back at PMP's level 3 after every wake. Before this series, three kernels never woke from s2idle with PMP enabled.
Governor: the fabric was low for 86–92 % of idle samples, and under a CPU busy loop it was back to 7 within a second. Kernel memcpy at fabric 1 is 14.7 GB/s against 23.6 GB/s at 7, so the governor is opt-in and trades burst bandwidth for idle power.
Limits
Testing
Built for arm64 (16 KiB pages) on this branch. Hardware runs were done on an equivalent lab branch carrying lab-only timed-wake and register-readout patches, which aren't part of this PR.
@iconidentify @DjDeveloperr, could you review? I'd value your view in particular on the PMP ownership split in commit 3 and on enabling PMP for j314s by default.