Skip to content

drm/asahi: g16: Log cooling decisions at debug, ceiling edges at info - #2744

Draft
RyanTheTide wants to merge 2 commits into
mainfrom
j713/g16-cooling-log-edges
Draft

RyanTheTide wants to merge 2 commits into
mainfrom
j713/g16-cooling-log-edges

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

G16 logs every change of its cooling decision at info level (M4 cooling: sample_ns=... limit=S<n>). On a fanless M4 Air under sustained GPU load the governor, budget and backstop move several times a second. During a 97-104 C desktop load on the J713 that was up to 82 lines in 10 s, which pushes older lines out of the kernel log buffer within minutes. Every boot also writes about 15 of them while the startup hold lets go.

Change

The full decision line moves to dev_dbg. At info level, G16 logs only the two edges: the ceiling dropping below the board's top state, and coming back to it, with the temperature and the number of decisions in between. The startup hold counts as "below the top", so a normal boot logs one line when it lets go. A deep wake also logs one pair (resume starts at the S1 ceiling and returns to the top within about 0.4 s). The cooling policy itself does not change.

#2676, which this was stacked on, has merged; the only diff from main is g16/power.rs.

Testing

  • make cpu in tools/testing/selftests/drivers/gpu/asahi-m4: 24/24 pass.
  • Builds clean as part of a full J713 kernel (the J713's t4 config) with this commit on top. power.rs is identical between drm/asahi: g16: run the M4 GPU on the macOS 27.2 firmware (26B123) #2676's ed41e08 and the head it was first built on.
  • The log rate in the Problem section is measured on the J713 default (t4) during a GNOME + 3D + video load.

Tested: J713 boot half at 5c1fc1f (comment below): one info line when the startup hold lets go, none across 3 s2idle cycles, one ceiling/top pair per deep wake. Head b4cb5bc is that commit merged with main (power.rs unchanged).
Risk: two-way · M4 (G16) GPU log level only

Still to run

  • The heat half on a J713: a sustained GNOME + 3D + video load; the M4 cooling info lines must be ceiling edges only, not decisions.
Measurement

M4 cooling lines per 10 s in the soak's kernel log (t4, die hotspot 97-104 C): 5, 54, 72, 82, 58, 4, 14. Ceiling values seen in those lines: S1 28, S2 24, S3 14, S4 19, S5 19, S6 44, S7 58, S8 61, S9 22.

service_power() logs every change of the cooling decision (governor,
budget, backstop, sensor error, ceiling) with dev_info. Under sustained
heat those inputs move several times a second. On the J713 (M4 Air,
fanless) a desktop load at 97-104 C wrote up to 82 such lines in 10 s,
enough to push older lines out of the kernel log buffer within minutes,
and every boot writes about 15 while the startup hold lets go.

Keep the full decision at dev_dbg. The info log gets only the two edges
a user cares about: the ceiling dropping below the board's top state,
and coming back to it, with the temperature and the number of decisions
in between. The startup hold counts as below the top, so a normal boot
logs one line when it lets go.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

This waits on #2676, which is still a draft; it can be folded into it or land right after it. Still needed: a J713 boot row showing one info line when the startup hold lets go and only the ceiling edge lines under a heat load.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Boot half of the J713 row at 5c1fc1f (13-inch M4 Air): the info lines this change leaves on a normal boot with sleeps.

The kernel is 7.3.0-bj713t6+: integration/aurora cacf355 plus the open J713 heads, including #2676 at ed41e08 and this PR at 5c1fc1f. It booted on the default command line (log in our 20261122-j713tips2-t6 trace, warm boot 3).

  • At boot: exactly one info line when the startup hold lets go: M4 cooling: back at the top S9 at 52500 mC after 17 decisions at 22 s. The per-decision lines stay at debug.
  • 3 s2idle cycles: no cooling lines.
  • Every deep wake: one pair of lines, ceiling S1 below the top S9 at ~43000 mC, then back at the top S9 0.3–0.4 s later. The resume starts at the S1 ceiling and returns to the top. The description doesn't mention this pair; it's one edge each way per deep wake, not a stream.

Still to run: the heat half. That means a sustained GNOME + 3D + video load on a kernel with this commit, counting the M4 cooling info lines, so that only ceiling edges show up and not the decisions.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr changed the base branch from djdev/g16-272 to main November 24, 2026 19:07
#2676, which this branch was stacked on, has merged; main merges cleanly
and leaves this branch's own change (g16/power.rs) as its only diff.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Updated to b4cb5bc: merged main. #2676 has landed, so the PR diff is now only g16/power.rs (+28/-1), unchanged from 5c1fc1f. The description now covers the deep-wake ceiling/top pair, has no stacking note, and has Tested/Risk lines. Still needed: the heat half on a J713 (queued).

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant