Skip to content

fix(power): reconcile refresh rate after resume - #3459

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
atimofeev:fix-power-resume-reconcile
Oct 7, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
atimofeev:fix-power-resume-reconcile

Conversation

@atimofeev

@atimofeev atimofeev commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

lowerDisplayRefreshRateOnBattery currently syncs refresh-rate targets only from property-change edges. During resume or dock reconnection, AC power state can flap. If a transient battery transition succeeds but the final AC transition is missed, displays remain at the temporary 60 Hz battery mode while the system is plugged in.

Schedule a short delayed reconciliation after onSessionResumed. Retry the existing debounced refresh sync at 1s, 5s, 15s, and 30s, reading the current BatteryService.isPluggedIn state each time. The existing power-change handler remains responsible for normal transitions; this only adds a level-based recovery path for missed edges.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Relates to #1203 and #2428.

Screenshots / video

No visual change.

Checklist

Additional validation:

  • nix flake check --no-build --no-write-lock-file — passed
  • nix build --no-write-lock-file .#dms-shell — passed
  • make lint-qml could not run without a running Quickshell instance populating the tooling VFS
  • Runtime test on a machine with USB-C AC state flapping is still pending; submitting as a draft for that validation

Assisted-by: AI coding assistant (implementation and PR draft)

@atimofeev
atimofeev force-pushed the fix-power-resume-reconcile branch from e3e780d to 74167e5 Compare October 6, 2026 12:10
@atimofeev
atimofeev marked this pull request as ready for review October 6, 2026 12:19
@bbedward

bbedward commented Oct 7, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: resume-reconcile timer chaining and reset in RefreshRateService.qml, interaction with syncDebounce/cascadeGuard/_lastAppliedTargets, the disabled-setting early return, SessionService.sessionResumed emission, and idle cost (one short-lived timer chain per resume, nothing runs while idle). Model: claude-opus-5-5.

@bbedward
bbedward merged commit 8fedfae into duxlabs-dev:master Oct 7, 2026
2 checks passed
bbedward pushed a commit that referenced this pull request Oct 7, 2026
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