Repository navigation
Exclude non-hybrid CPUs from intel-lpmd via cpu_hybrid check - #287
Open
hotline1337 wants to merge 2 commits into
Open
hotline1337 wants to merge 2 commits into
hotline1337 wants to merge 2 commits into
Conversation
ventureoo
requested changes
Oct 8, 2026
hotline1337
force-pushed
the
fix/intel-lpmd-hybrid-cpus
branch
from
October 8, 2026 16:42
ffe4593 to
73ea542
Compare
ventureoo
requested changes
Oct 9, 2026
hotline1337
force-pushed
the
fix/intel-lpmd-hybrid-cpus
branch
from
October 9, 2026 20:10
73ea542 to
982464c
Compare
Add a generic cpu_hybrid profile key which requires the running CPU to be hybrid (have E-cores). The cpus file of the Atom (E-core) perf PMU at /sys/devices/cpu_atom is relied upon instead of blacklisting individual device IDs: the file has to contain a CPU number, since non-hybrid dies of hybrid SoCs (e.g. Alder Lake-S without E-cores) still expose the PMU without any Atom CPU in its cpus list.
intel-lpmd only supports hybrid Intel CPUs (with E-cores), but the cpu_family/cpu_models filter also matches non-hybrid Alder Lake SKUs sharing the same family and model, so the daemon was installed and exited immediately on those systems. Set cpu_hybrid for the profile to skip them generically.
hotline1337
force-pushed
the
fix/intel-lpmd-hybrid-cpus
branch
from
October 9, 2026 20:44
982464c to
3bb4472
Compare
ventureoo
approved these changes
Oct 10, 2026
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.
Summary
cpu_hybridprofile key:cpu_hybrid = trueonly matches systems whose CPU is hybrid (has E-cores).cpu_hybrid = trueon theintel-lpmdprofile, so it no longer matches non-hybrid CPUs that share the samecpu_family/cpu_models.blacklisted_device_idsapproach from Add blacklisted IDs and exclude non-hybrid CPUs from intel-lpmd #286.Context
This is a rework of #286 based on feedback and discussion on Discord.
The previous approach (maintaining a device blacklist) was rejected as fragile and unmaintainable. Instead, as suggested by maintainers, this PR implements a generic detection mechanism using the Atom PMU sysfs interface (
/sys/devices/cpu_atom).How the check works
On hybrid CPUs the kernel registers the Atom (E-core) perf PMU under
/sys/devices/cpu_atom, next to thecpu_core(P-core) PMU, while non-hybrid CPUs only expose the unifiedcpuPMU.The directory alone is not a reliable signal, though: non-hybrid dies of hybrid SoCs (e.g. Alder Lake-S without E-cores, such as the i5-12400F) still expose
/sys/devices/cpu_atom, but theircpusfile contains no CPU at all (just a line feed).hwd_misc::is_hybrid_cpu()therefore reads/sys/devices/cpu_atom/cpus, and requires the file to actually contain a CPU number; a missing or unreadable file counts as non-hybrid.Changes
src/hwd_misc.rs: addedis_hybrid_cpu().src/profile.rs:cpu_hybridis read inparse_profile()and emitted inprofile_into_toml().src/data.rs: profiles withcpu_hybridset are only matched when the detected hybridness agrees.profiles/pci/power_management/profiles.toml:intel-lpmdsetscpu_hybrid = true.tests/profiles/cpu-profile-test.toml+ unit tests for the detection (with E-cores / without E-cores / missing PMU).Verification
cargo fmt --all -- --check,cargo clippy --all-targets -- -D warningsandcargo testall pass./sys/devices/cpu_atom/cpuscontains only0x0Aandis_hybrid_cpu()returnsfalse, sointel-lpmdis no longer offered there.