Skip to content

Add blacklisted IDs and exclude non-hybrid CPUs from intel-lpmd - #286

Closed
hotline1337 wants to merge 2 commits into
CachyOS:masterfrom
hotline1337:fix/intel-lpmd-non-hybrid-cpus
Closed

hotline1337 wants to merge 2 commits into
CachyOS:masterfrom
hotline1337:fix/intel-lpmd-non-hybrid-cpus

Conversation

@hotline1337

Copy link
Copy Markdown

Summary

  • Implemented parsing and serialization for blacklisted_device_ids, blacklisted_class_ids, and blacklisted_vendor_ids in src/profile.rs (the fields and filtering logic already existed in HardwareID and src/data.rs, but were never populated by parse_profile).
  • Excluded Alder Lake-S processors without E-Cores from the intel-lpmd profile by blacklisting Host Bridge PCI ID 4650.

Background & Problem

intel-lpmd requires hybrid Intel CPU architecture (E-Cores). On non-hybrid processors such as the desktop Core i5-12400F, the service starts and exits immediately due to lack of hybrid core support.

Both hybrid (e.g. i5-12600K, i7-12700K) and non-hybrid (e.g. i5-12400, i3-12100) Alder Lake-S desktop processors share the same CPU family (6) and model (151). However, non-hybrid variants are physically strapped to Host Bridge device ID 0x4650 (6P+0E, 4P+0E, 2P+0E dies), while hybrid variants use 0x4660 (8P+8E) or 0x4668 (8P+4E).

Blacklisting device 4650 prevents chwd from incorrectly matching and installing intel-lpmd on:
i5-12600, i5-12600T, i5-12500, i5-12500T, i5-12490F, i5-12400, i5-12400F, i5-12400T, i3-12300, i3-12300T, i3-12100, i3-12100F, i3-12100T, Pentium Gold G7400/G7400T, Celeron G6900/G6900T.

Changes

  1. src/profile.rs: Read blacklisted_device_ids, blacklisted_class_ids, and blacklisted_vendor_ids in parse_profile(), and emit them in profile_into_toml().
  2. src/data.rs: Added test blacklisted_device_id_rejects_matching_device.
  3. profiles/pci/power_management/profiles.toml: Added blacklisted_device_ids = "4650" to intel-lpmd.
  4. tests/profiles/cpu-profile-test.toml: Updated test profile and test assertion.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The blacklist is preserved through profile parsing and serialization, applied by existing matching logic, and adequately tested.

Review effort: Balanced
Findings: None

What changed in this PR

Adds blacklist field support so intel-lpmd is not offered on unsupported non-hybrid Alder Lake-S CPUs.

Changes:

  • Parses and serializes hardware ID blacklists.
  • Excludes PCI device 4650 from intel-lpmd.
  • Adds parsing and matching tests.
File Description
src/​profile.rs Adds blacklist parsing, serialization, and tests.
src/​data.rs Tests blacklist-based device rejection.
profiles/​pci/​power_management/​profiles.toml Blacklists the non-hybrid Alder Lake-S host bridge.
tests/​profiles/​cpu-profile-test.toml Adds blacklist data to the parser fixture.

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

@hotline1337

Copy link
Copy Markdown
Author

Superseded by #287

@hotline1337 hotline1337 closed this Oct 8, 2026
@hotline1337
hotline1337 deleted the fix/intel-lpmd-non-hybrid-cpus branch October 8, 2026 15:57
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