Skip to content

fix the thermal config path and the cluster order - #64

Closed
Zarathos30 wants to merge 1 commit into
AxionAOSP:lineage-23.2from
Zarathos30:lineage-23.2
Closed

fix the thermal config path and the cluster order#64
Zarathos30 wants to merge 1 commit into
AxionAOSP:lineage-23.2from
Zarathos30:lineage-23.2

Conversation

@Zarathos30

Copy link
Copy Markdown

AxPerfConfig only looked in /vendor/etc and /system/etc, while device/axion/common installs ax_perf_thermal.xml in /system_ext/etc, so no platform was parsing its thermal config. Read system_ext first, keeping the old paths as fallback.

publishMetadata() indexed an ArrayMap keyed by group, which iterates by ascending key hashCode, so the published cluster order followed the hash of the group names instead of the config file. On a live POCO F7, ax_cpu_small_freqs holds the table of policy7. Use a LinkedHashMap.

Change-Id: Ic50484d827acfe2ce5c0e4354cbd22db1c3f340f

AxPerfConfig only looked in /vendor/etc and /system/etc, while device/axion/common
installs ax_perf_thermal.xml in /system_ext/etc, so no platform was parsing its
thermal config. Read system_ext first, keeping the old paths as fallback.

publishMetadata() indexed an ArrayMap keyed by group, which iterates by ascending
key hashCode, so the published cluster order followed the hash of the group names
instead of the config file. On a live POCO F7, ax_cpu_small_freqs holds the table
of policy7. Use a LinkedHashMap.

Change-Id: Ic50484d827acfe2ce5c0e4354cbd22db1c3f340f
Signed-off-by: Zarathos30 <vale.rigni@gmail.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 18:30

Copilot AI 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.

🟡 Changes recommended

The new thermal-config lookup order changes precedence (system_ext now overrides vendor), which needs an explicit decision/justification to avoid unintended device-specific behavior changes.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates AxionOS performance/thermal configuration handling in system services to (1) find the thermal config where it’s actually installed on Axion devices and (2) ensure published CPU cluster metadata preserves the cluster ordering defined in the config XML.

Changes:

  • Add /system_ext/etc/ax_perf_thermal.xml as a thermal config search location for AxPerfConfig.
  • Preserve cluster order from the config when publishing CPU cluster frequency metadata by switching from ArrayMap to LinkedHashMap-backed ordering in AxKernelManagerService.
File summaries
File Description
services/core/java/com/android/server/kernel/AxKernelManagerService.java Publishes CPU cluster metadata using insertion order so cluster roles match config file ordering.
services/core/java/com/android/server/am/AxPerfConfig.java Looks for thermal config in /system_ext/etc in addition to existing vendor/system paths.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 92 to 96
sLoaded = true;
boolean loaded = loadFrom(VENDOR_THERMAL_CONFIG, ATMC_TAG)
boolean loaded = loadFrom(SYSTEM_EXT_THERMAL_CONFIG, ATMC_TAG)
|| loadFrom(VENDOR_THERMAL_CONFIG, ATMC_TAG)
|| loadFrom(SYSTEM_THERMAL_CONFIG, ATMC_TAG);
if (!loaded) {
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.

3 participants