Skip to content

fix: Add policy3 big cluster detection and fix GPU multi-line parsing#155

Merged
Rve27 merged 1 commit intoRve27:mainfrom
dijama:fix/policy3-and-gpu-parsing
Feb 3, 2026
Merged

fix: Add policy3 big cluster detection and fix GPU multi-line parsing#155
Rve27 merged 1 commit intoRve27:mainfrom
dijama:fix/policy3-and-gpu-parsing

Conversation

@dijama
Copy link
Copy Markdown

@dijama dijama commented Feb 2, 2026

Summary

  • Add cpufreq policy3 support for big cluster detection. Devices where the big cores start at policy3 (e.g. Snapdragon 8 Gen 2 on Sony Xperia 5V, pdx237) were not detected, causing the big cluster section to be entirely missing from the SoC screen. Adds policy3 sysfs path constants to SoCUtils and checks policy3 before policy4/policy6 in detectBigClusterConfig().

  • Fix readAvailableFreqGPU() and readAvailableGovGPU() to handle multi-line sysfs output. The previous implementation used firstOrNull() which only read the first line of output. Some kernels split GPU frequency tables and governor lists across multiple lines. Now uses flatMap over all output lines to capture all entries.

Tested on

  • Sony Xperia 5V (XQ-DE72, pdx237) — Snapdragon 8 Gen 2
  • CPU topology: policy0 (4x A510), policy3 (4x A715), policy7 (1x X3)
  • GPU: Adreno 740, single governor (msm-adreno-tz)
  • LineageOS 23.0

Test plan

  • Big cluster (policy3) now detected and displayed on SoC screen
  • CPU frequency and governor controls functional for all three clusters
  • GPU frequency list fully populated from multi-line sysfs output
  • GPU governor list fully populated from multi-line sysfs output
  • No regression on policy4/policy6 devices (code path unchanged for those indices)

🤖 Generated with Claude Code

Devices with big cores on cpufreq policy3 (e.g. Snapdragon 8 Gen 2 on
Sony Xperia 5V) were not detected, causing the big cluster to be missing
from the SoC screen entirely. Add policy3 sysfs path constants and check
policy3 before policy4/policy6 in detectBigClusterConfig().

Also fix readAvailableFreqGPU() and readAvailableGovGPU() to handle
multi-line sysfs output. The previous code only read the first line via
firstOrNull(), which missed entries when the kernel splits output across
multiple lines.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Rve27 Rve27 merged commit 85f1343 into Rve27:main Feb 3, 2026
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.

2 participants