Skip to content

feat(auto-cpufreq): add auto-cpufreq daemon monitor and control plugin#914

Open
4rmcyt wants to merge 4 commits into
noctalia-dev:mainfrom
4rmcyt:feat/auto-cpufreq
Open

feat(auto-cpufreq): add auto-cpufreq daemon monitor and control plugin#914
4rmcyt wants to merge 4 commits into
noctalia-dev:mainfrom
4rmcyt:feat/auto-cpufreq

Conversation

@4rmcyt

@4rmcyt 4rmcyt commented Jun 6, 2026

Copy link
Copy Markdown

Summary

  • Bar widget showing active CPU governor and turbo state, color-coded by profile (powersave/performance)
  • Panel with CPU usage, frequency, temperature, battery status, and segmented controls for force override and turbo boost
  • Right-click context menu for quick override without opening the panel
  • Reads override state directly from auto-cpufreq pickle files (/run/override.pickle, /opt/auto-cpufreq/override.pickle) — always in sync with the daemon
  • Works with Intel (intel_pstate) and AMD (k10temp, amd_pstate) CPUs
  • Battery status via sysfs (dynamic device detection — works with BAT0, BAT1, etc.)
  • Uses SystemStatService for CPU stats (usage, freq, temp)
  • pkexec for elevated actions with graceful error banner if polkit not configured

Test plan

  • Plugin loads with qs -c noctalia-shell
  • Bar widget shows governor and turbo state
  • Panel opens on click, shows CPU stats, battery, governor info
  • Force override buttons reflect real daemon state (reads pickle file)
  • Turbo boost buttons reflect real turbo override state
  • pkexec error banner appears when polkit not configured
  • Settings panel saves refresh interval and compact mode
  • Tested on Niri with AMD CPU (Matebook, Ryzen 7000)

Polkit setup

See setup_polkit.sh in the plugin directory — runs on any distro, detects binary path and privilege group automatically. NixOS instructions in README.md.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Automatic Manifest Check


File: auto-cpufreq/manifest.json

+  "repository": "",

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Automatic Code Quality Review


File: auto-cpufreq/BarWidget.qml

  • (H) Line 250: Do not use hardcoded values, always prefer to use the Style singleton instead
+                spacing: 1
  • (H) Line 263: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+                    text: "turbo: " + root.turboState

File: auto-cpufreq/Panel.qml

  • (H) Line 55: Do not use hardcoded values, always prefer to use the Style singleton instead
+                        spacing: 2
  • (H) Line 58: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+                            text: "auto-cpufreq"
  • (H) Line 160: Do not use hardcoded values, always prefer to use the Style singleton instead
+                        spacing: 2
  • (H) Line 308: Do not use hardcoded values, always prefer to use the Style singleton instead
+                        border.width: 1
  • (H) Line 370: Do not use hardcoded values, always prefer to use the Style singleton instead
+                        border.width: 1
  • (H) Line 411: Do not use hardcoded values, always prefer to use the Style singleton instead
+        spacing: 2
  • (H) Line 437: Do not use hardcoded values, always prefer to use the Style singleton instead
+            anchors { fill: parent; margins: 3 }
  • (H) Line 449: Do not use hardcoded values, always prefer to use the Style singleton instead
+            spacing: 1

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.

1 participant