Skip to content

Add omarchy-power-profiles-daemon 0.30, with a CPPC driver for ARM laptops - #897

Merged
ryanrhughes merged 1 commit into
masterfrom
add-omarchy-power-profiles-daemon
Oct 9, 2026
Merged

ryanrhughes merged 1 commit into
masterfrom
add-omarchy-power-profiles-daemon

Conversation

@dhh

@dhh dhh commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

omarchy-power-profiles-daemon is upstream power-profiles-daemon 0.30 (pinned to its tag) plus one patch that adds a CPU profile driver for the generic ACPI CPPC cpufreq driver (cppc_cpufreq). It provides/conflicts with power-profiles-daemon, with no replaces, so nothing swaps automatically. The companion Omarchy PR switches the base package list and adds a migration.

Why

Stock power-profiles-daemon only drives intel_pstate, amd_pstate and ACPI platform_profile. ARM laptops on cppc_cpufreq (NVIDIA N1X, Snapdragon X) fall through to the placeholder driver, so balanced and power-saver change nothing and there's no performance profile for omarchy-powerprofiles-set to pick on AC.

On the N1X, the default schedutil + EAS ramps too slowly for bursty UI work, which makes Chromium feel sluggish.

The driver

Profile Settings
performance auto_select=0, performance governor
balanced schedutil, CPPC autonomous selection (auto_select=1), EPP 64
power-saver schedutil, autonomous selection, EPP 192
  • Only claims policies whose scaling_driver is cppc_cpufreq, that offer both the schedutil and performance governors, and whose auto_select / energy_performance_preference_val are writable. Anything else falls back to the placeholder as today, so Intel/AMD machines are unaffected.
  • If the first activation fails, it restores the settings found at probe time.
  • Reapplies the active profile on resume, in case firmware resets the CPPC registers.
  • Also rewrites the powerprofilesctl shebang to /usr/bin/python3 at package time. Omarchy currently does this with a sed, so a mise/venv python3 without PyGObject can't break it.

Testing

Measured on an NVIDIA N1X laptop. The workload was a Chromium page re-rendering a 5,000-row list per keystroke, with simulated typing. Each mode ran 3–6 times, alternating modes between runs.

schedutil (today) balanced (EPP 64) performance
Median keystroke → frame 120–144 ms 56 ms 32 ms
p90 280–328 ms 184–192 ms 136 ms
Missed frames, 5s scroll at 120Hz 44–51 1–6 1
Idle battery draw 11.5 W 11.1 W 15.4 W
  • All 137 upstream tests pass in check(), including 5 new CPPC tests (each runs under both D-Bus names). The new tests cover both policies switching, the missing-schedutil fallback, a non-CPPC cpufreq driver, a missing autonomous selection, and reapplying on resume. I checked that the resume and schedutil tests fail with their fixes disabled.
  • Built with makepkg on aarch64. There's no Docker here, so I didn't run bin/build; CI does the clean builds. Installed on the N1X: it swaps cleanly for power-profiles-daemon, the service stays enabled, all three profiles write the expected sysfs values, and Omarchy's menu and AC/battery switching pick them up.
  • tests/pinned-sources.sh passes, and helpers/upstream-watch.py check reports already current.
  • Reviewed with Codex. Its three findings (missing-schedutil probe, rollback on first activation, test covering only one policy) are fixed. Power-saver's EPP 192 hasn't been benchmarked.

Notes

  • Upstream version bumps will come from the git_tags watch. If the patch stops applying to a new release, that bump's build fails, which is the cue to rebase it.
  • The driver is written to upstream standards. The plan is to propose it to freedesktop and drop the patch once it's merged.

🤖 Generated with Claude Code

…ptops

power-profiles-daemon only drives intel_pstate, amd_pstate and ACPI
platform_profile, so ARM laptops on cppc_cpufreq (NVIDIA N1X, Snapdragon X)
get placeholder profiles that change nothing and no performance profile.

This packages upstream 0.30 with a CPPC driver patch: balanced (EPP 64) and
power-saver (EPP 192) use CPPC autonomous frequency selection, performance
runs the performance governor. The driver only claims policies with the
schedutil and performance governors and writable autonomous selection knobs,
restores probe-time settings if the first activation fails, and reapplies the
profile on resume. The package provides and conflicts with
power-profiles-daemon, and fixes the powerprofilesctl shebang at package time
so Omarchy no longer needs to sed it.

Tested on an NVIDIA N1X laptop: median keystroke-to-frame latency in Chromium
went from ~130ms (schedutil) to ~56ms on balanced at the same idle power, and
~32ms on performance, which Omarchy selects on AC. All 137 upstream tests
pass, including five new CPPC tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanrhughes
ryanrhughes enabled auto-merge (squash) October 9, 2026 14:35
@ryanrhughes
ryanrhughes merged commit cbded97 into master Oct 9, 2026
8 checks passed
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: omarchy-power-profiles-daemon (x86_64, PR artifact); omarchy-power-profiles-daemon (aarch64, PR artifact)

  • edge/x86_64: omarchy-power-profiles-daemon-0.30-1-x86_64
  • edge/aarch64: omarchy-power-profiles-daemon-0.30-1-aarch64

Commit cbded97 · run

ryanrhughes added a commit that referenced this pull request Oct 14, 2026
Our CPPC driver (#897) ran balanced and power-saver as CPPC autonomous
frequency selection at EPP 64 and 192 with the schedutil governor. On the
NVIDIA N1x that let the kernel's energy-aware scheduling keep Hyprland on
the Cortex-A725 cores while the firmware held them at their 338 MHz floor,
and the desktop lagged.

NVIDIA's own driver, proposed upstream as !236 and shipped in their RTX
Spark images, takes its place. It sets the preference per core type (E/P:
5/5 in performance, 76/114 in balanced, 76/153 in power-saver), and uses
the governor to turn EAS on and off: schedutil in power-saver and in
balanced on battery, performance otherwise. The preferences only take
effect with autonomous selection on, which NVIDIA's images and Omarchy's
N1x setup turn on outside the daemon.

The driver only probes on processors that report "NVIDIA RTX Spark" in
SMBIOS, so other cppc_cpufreq machines, which our driver also claimed, get
stock power-profiles-daemon's placeholder profiles. The first start after
the upgrade comes up in balanced, because the saved profile names the old
driver.
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