Repository navigation
thermald: adaptive: Handle NotifyPlatform targets - #613
Open
boyakhil978 wants to merge 1 commit into
Open
boyakhil978 wants to merge 1 commit into
boyakhil978 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
What changed in this PR
Adds support for Adaptive NotifyPlatform targets by writing the target argument to the int3400 imok sysfs attribute, allowing firmware/EC to learn the currently active adaptive target.
Changes:
- Add
set_notify_platform()helper to handleNotifyPlatformadaptive targets. - Update adaptive target execution to dispatch
NotifyPlatformtargets to the new helper. - Parse the target argument and write it to
${int3400_base_path}imokwith logging on failures.
| File | Description |
|---|---|
| src/thd_engine_adaptive.h | Declares the new set_notify_platform() helper for adaptive target execution. |
| src/thd_engine_adaptive.cpp | Implements NotifyPlatform handling by parsing the argument and writing it to imok, and adds dispatch logic in execute_target(). |
Review effort: Lite
Copilot stopped reviewing on behalf of
spandruvada due to an error
October 28, 2026 03:24
Adaptive tables can contain NotifyPlatform targets on the IETM
participant. The Windows DTT stack passes the argument to the firmware
through IETM.IMOK, so the firmware learns which adaptive target is
active. thermald drops them today ("cdev IETM not found").
HP uses this to set the EC's cooling mode. On the HP Spectre x360 14
(board 8C15), IMOK maps the argument to EC field HPCM, and the table
has NotifyPlatform targets for every mode, including ones (In_bag_1,
U_CS_Com_*, U_CS_Q1) that the BIOS's own profile switch never sets.
The int3400 driver already exposes IMOK as the write-only "imok"
attribute. Write the argument there.
Tested on board 8C15: with the EC put in Cool mode via imok (HPCM
0x02) and the BIOS profile on Balanced, thermald selects U_CS_B_A,
logs "NotifyPlatform 5" and the EC's HPCM returns to 0x01. Under 20
minutes of CPU+GPU load in Performance on AC, the adaptive engine
(2.5.13, before this change) holds SEN2 at or below 58C.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Akhil Boyapati <boyakhil978@gmail.com>
boyakhil978
force-pushed
the
notify-platform-imok
branch
from
October 29, 2026 04:06
a311bda to
62c0368
Compare
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.

Adaptive tables can contain
NotifyPlatformtargets on the IETM participant. The Windows DTT stack passes the argument to the firmware throughIETM.IMOK, so the firmware learns which adaptive target is active. thermald currently drops these targets (cdev IETM not foundin the log).The int3400 driver already exposes
IMOKas the write-onlyimoksysfs attribute, so this change writes the target's argument there.Why it matters
HP uses
IMOKto set the EC's cooling mode. On the HP Spectre x360 14 (board 8C15, Meteor Lake),IMOKmaps its argument to the EC fieldHPCM. The GDDV adaptive table hasNotifyPlatformtargets for every mode, including ones the BIOS profile switch never sets (In_bag_1,U_CS_Com_*,U_CS_Q1).Testing (board 8C15)
echo 7 > imok, HPCM0x02) with the BIOS profile on Balanced. The patched thermald then selectsU_CS_B_A, logsNotifyPlatform 5, and HPCM returns to0x01.U_CS_P_Aand held SEN2 at or below 58 °C. Without adaptive mode, this laptop's EC powers it off after ~10 s at SEN2 ≥ 68 °C.Related kernel fix, sent to platform-driver-x86:
hp-wminow masks the thermal profile query to its low byte. Without it, readingplatform_profilereturns-EINVALon this board because the firmware packs flags and posture into the upper bytes.🤖 Generated with Claude Code