Skip to content

Revert "thermal: apple-pmp: avoid P-core wakeups for cool idle polling" - #3803

Closed
RyanTheTide wants to merge 1 commit into
mainfrom
b7/revert-3546-pmp-cool-idle
Closed

RyanTheTide wants to merge 1 commit into
mainfrom
b7/revert-3546-pmp-cool-idle

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Reverts linux#3546 (merge 116542b, "thermal: apple-pmp: avoid P-core wakeups for cool idle polling").

On J713 (M4 Air, fleet91 9c353d7) the slower cool-idle polling turns spans where the PMP thermal sensors read dark into repeated -ENODATA reads. The thermal core marks thermal_zone2 broken and disables it, and the driver's guard latches p/e/gpu_level=8 fault=1. From then on a 10-thread load runs at 912/900 MHz P/E until the next reboot; deep sleep does not clear it. It latched after 5 h 27 min of uptime. The edge kernel (933f822, no #3546) does not show it. Evidence: HW sweep 12-02 comment on linux#2774 (issuecomment-7315328260).

Merge-then-fix: the dark-sensor handling is being redone in linux#2774; this restores the pre-#3546 polling until that lands.

Tested

  • Clean git revert -m 1 on main cafee21; no later commits touch the driver.
  • make W=1 LLVM=1 drivers/thermal/apple-pmp-thermal.o (arm64, fleet config): builds, no warnings.
  • No remaining references to the removed pmp-thermal-poll-tests.py host test.
  • J713 (M4 Air): this revert applied to fleet91 9c353d7 (same driver change), built with the kit config (control build .text == shipped module). Live module swap on the latched J713 (6 h 53 min uptime, level 8, P/E 912/900 MHz): guard back to level 0, fault=0, apple-pmp-die zone enabled, 10-thread load P 3984 / E 2496 MHz. Details: issuecomment-7316947667.

Risk

Risk: two-way · J713 (a plain revert of this revert restores #3546).

Low: restores the polling that shipped before 11-29 (fleet85 and earlier). The cost is the P-core wakeups #3546 removed at cool idle (idle power only).

Not yet

  • J713 7 h idle soak on the reverted module (to ~10:00 AEDT 12-02); result will be posted here.

This reverts merge 116542b (linux#3546).

On J713 (M4 Air, fleet91 9c353d7) the slower cool-idle polling turns
spans where the PMP thermal sensors read dark into repeated -ENODATA
reads, the core marks thermal_zone2 broken and disables it, and the
driver's guard latches p/e/gpu level 8 with fault=1. From then on a
10-thread load runs at 912/900 MHz P/E until the next reboot; deep
sleep does not clear it. It latched after 5 h 27 min of uptime.
The edge kernel (933f822, without #3546) does not show it.

Revert now; the dark-sensor handling is redone in linux#2774.
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners December 1, 2026 15:47
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at fac04943: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at fac04943
Conflicts ok none
PR text ok Risk: two-way · J713 (a plain revert of this revert restores #3546). Low: restores the polling that shipped before 11-29 (fleet85 and earlier). The cost is the P-core wakeups #3546 removed at cool idle (idle power only).
Hold no labelled hold by a maintainer

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Row (in progress): fac0494 (same driver change, applied to fleet91 9c353d7) + J713 (M4 Air) + recovers from the latch; 7 h soak running.

  • Built apple-pmp-thermal.ko from 9c353d7 with the fleet91 kit config (identical after olddefconfig). The unmodified control build has the same .text as the shipped fleet91 module, and the running module's build ID matches the kit. The revert is the only change.
  • The J713 was latched on stock fleet91: 6 h 53 min uptime, p/e/gpu_level=8 fault=1 error=-11, thermal_zone2 disabled, 10,149 telemetry errors, 10-thread load at P 912 / E 900 MHz.
  • After rmmod + insmod of the reverted module (no reboot), the guard steps down to level 0 with fault=0, apple-pmp-die is enabled, and a 10-thread load runs at P 3984 / E 2496 MHz.
  • Dark-sensor -61 samples still occur with the revert, but the guard recovers from them.
  • Soak: idle, read-only poll every 10 min and an 8 s 10-thread load check every hour, until about 10:00 AEDT. I'll post the result here.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at fac0494

Checked:

  • An exact revert of #3546 (merge 116542b). drivers/thermal/apple-pmp-thermal.c at this head is byte-identical to its state before #3546 (116542bd^1). No later main commit touches it.
  • tools/asahi/pmp-thermal-poll-tests.py is removed, and the one run-host-tests.py entry for it goes with it. The rest of the host-test table, which later merges grew, is untouched. git grep pmp-thermal-poll finds no other reference.
  • This restores the polling that shipped through fleet85, which the J713 sweep (edge 933f822, without #3546) shows without the 912/900 MHz latch.

Follow-ups (not blocking):

  • The dark-sensor -ENODATA handling that makes the cool-idle polling safe is tracked in #2774. Reland the P-core wakeup saving on top of it.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Soak result: FAIL. The revert does not prevent the latch. Please don't merge on my earlier row.

Same J713 boot, reverted module loaded at 15:55 (J713 clock): clean for 28 min, then at 16:24:07 a burst of sensor error -61 / thermal_zone2: Temperature check failed (-61), decision ... reason=sensor hard=1 level=8, zone2 disabled again (second Unable to get temperature), and power_status latched at p/e/gpu_level=8 fault=1 error=-11. The 10-thread load is back to P 912 / E 900 MHz.

So on this boot the dark-sensor spans latch the guard with or without #3546's slower cool-idle polling. #3546 isn't the cause, and the fix has to be the dark-sensor handling itself (#2774). Holding this PR; I'll test #2774's driver on the same J713, which now reproduces the latch within about 30 min.

@RyanTheTide RyanTheTide added the hold Held on purpose; skipped by the PR digest label Dec 1, 2026
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Dec 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing: the soak showed #3546 isn't the cause (the revert latched again on the same J713 boot), and the dark-sensor fix landed as #2774 (76d0b51). Not landing both avoids a double fix.

@RyanTheTide RyanTheTide closed this Dec 1, 2026
@RyanTheTide
RyanTheTide deleted the b7/revert-3546-pmp-cool-idle branch December 1, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) hold Held on purpose; skipped by the PR digest needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant