Skip to content

Refresh power-panel battery telemetry less often - #21006

Open
Cynnamoroll wants to merge 1 commit into
omacom:quattrofrom
Cynnamoroll:contributions/power-panel-7582
Open

Cynnamoroll wants to merge 1 commit into
omacom:quattrofrom
Cynnamoroll:contributions/power-panel-7582

Conversation

@Cynnamoroll

Copy link
Copy Markdown
Contributor

What changes

The open power panel launches omarchy-battery-status --shell every five seconds. Sample battery telemetry every 30 seconds while open, without changing the chart or profile refresh cadence. Keep immediate reads on open or reopen, delivered power-source changes while open, explicit charge-limit refreshes, and completion of a charge-limit action. The closed panel still does not poll.

Values without a change signal can wait up to 30 seconds for the next scheduled sample, plus normal timer scheduling and helper completion time. This addresses the remaining telemetry polling described in #7582.

Verification

  • In matched 62-second open-panel runs, periodic helper launches fell from 12 to 2, excluding the opening read. Profile discovery ran once on each build. Neither build polled the helper during the following 32 seconds closed. These are process counts, not CPU or power measurements.
  • The candidate displayed an unsignaled telemetry change on the next periodic read. Reopen, plug, unplug, explicit charge-limit refresh while open or closed, and charge-limit action completion each launched the helper once in separate trials. A power-source event while closed did not launch it.
  • Used the actual panel, controller, and battery service in an offscreen Quickshell 0.3.2 fixture, with a private D-Bus, synthetic UPower and a stub battery helper. A Qt window replaced the layer-shell surface; no production Hyprland session or physical battery was tested.
  • power-test.sh passed 54 checks, battery-status-test.sh passed 12 with the checkout environment, and git diff --check passed. The full shell suite was not run.

Screenshots

No visible change: layout, styling, and animations are unchanged. Unsignaled battery values update less often by design.

Keep immediate reads for panel opens, power source changes and
charge-limit updates. Poll the remaining battery telemetry every
30 seconds while the panel is open.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The power panel now samples battery telemetry every 30 seconds instead of every five seconds while open.

  • The power panel reads battery telemetry less often while it is open.

Reviews (1) · Last reviewed commit: "Refresh power-panel battery telemetry le..." · Reviewed by Greptile

@chessing234

Copy link
Copy Markdown
Contributor

your commit is in #21013, on the power panel after the charger share from #20891. the slower telemetry refresh is the panel timer only. the warning service is unchanged by it. @dhh @omarchybot if 21013 lands, this can close as superseded.

@chessing234

Copy link
Copy Markdown
Contributor

thanks. an open power panel still samples battery telemetry every 30 seconds, and still reads immediately on open, on a power-source change, and after a charge-limit action, in #21226. Please close this PR as superseded by #21226.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 High in Codex read the power panel diff and #7582 and classified the five-second battery-helper launches as a performance bug. DeepSeek V4.1 Flash, using its default effort, classified the longer sampling interval as an enhancement. The classification is open for maintainer review. #21013 and #21226 include the polling change and are both open.

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.

3 participants