Skip to content

feat(power): lower refresh rate on battery#2428

Draft
atimofeev wants to merge 1 commit into
AvengeMedia:masterfrom
atimofeev:master
Draft

feat(power): lower refresh rate on battery#2428
atimofeev wants to merge 1 commit into
AvengeMedia:masterfrom
atimofeev:master

Conversation

@atimofeev
Copy link
Copy Markdown

@atimofeev atimofeev commented May 15, 2026

Add a Power & Sleep setting that lowers eligible displays to 60 Hz on battery and restores their previous mode on AC power.

Skip displays without an available 60 Hz mode, displays with a single refresh-rate option, current modes at or below 60 Hz, and VRR-enabled outputs.

Apply niri changes at runtime through output commands and use wlr-output-management as fallback.

Closes #1203

@atimofeev atimofeev marked this pull request as draft May 15, 2026 21:16
@atimofeev
Copy link
Copy Markdown
Author

Need help with additional testing, as I only have a single device with multiple refresh rates display (240/60).

Also, changes to DisplayService.qml might be overengineered.

@atimofeev atimofeev changed the title feat(power): lower refresh rate on battery (#1203) feat(power): lower refresh rate on battery May 15, 2026
@atimofeev
Copy link
Copy Markdown
Author

Here's the first issue:

  • When you restart dms being on battery, it thinks that configured refresh rate is 60hz and it never goes back to the preferred 240hz

Probably can be resolved with this logic:

  • Get active monitor profile refresh rate and use it as baseline
  • If monitor profiles are not configured, fall back to monitor preferred refresh rate
  • Re-check these steps on profile or power source change

Add a Power & Sleep setting that lowers eligible displays to 60 Hz on battery and restores their previous mode on AC power.

Skip displays without an available 60 Hz mode, displays with a single refresh-rate option, current modes at or below 60 Hz, and VRR-enabled outputs.
Apply niri changes at runtime through output commands and use wlr-output-management as fallback.
@atimofeev
Copy link
Copy Markdown
Author

atimofeev commented May 16, 2026

Implemented stateless transitions between 60hz and higher refresh rates.
Also improved logging to be more human-readable.

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.

Refresh rate change on power source

1 participant