Skip to content

steamcompmgr: throttle frame callbacks to output refresh rate with VRR#2115

Open
matte-schwartz wants to merge 1 commit into
ValveSoftware:masterfrom
matte-schwartz:matts/vrr-mangoapp-powerusage
Open

steamcompmgr: throttle frame callbacks to output refresh rate with VRR#2115
matte-schwartz wants to merge 1 commit into
ValveSoftware:masterfrom
matte-schwartz:matts/vrr-mangoapp-powerusage

Conversation

@matte-schwartz
Copy link
Copy Markdown

With VRR active, vblank is forced true every main loop iteration. This causes overlay windows to receive frame callbacks at an uncapped rate, rendering continuously and skyrocketing power usage.

Instead, throttle overlay callbacks to the output refresh rate by tracking the last overlay latch time and skipping callbacks until a full refresh cycle has completed.

@matte-schwartz matte-schwartz force-pushed the matts/vrr-mangoapp-powerusage branch from 4307152 to 1d4c7fc Compare April 8, 2026 22:36
@matte-schwartz
Copy link
Copy Markdown
Author

after further testing, my old approach caused the mangohud performance graphs to update irregularly with VRR enabled when used in the Steam UI. I've reworked this to reuse the existing VRR FPS-limit schedule path instead so overlay updates are still paced properly.

…r VRR

Under VRR, the main loop forces vblank=true every iteration so games
can get commit wake-ups at their uncapped rate. Overlays fall through
the FPS-limit throttle, so mangoapp receives a frame callback every
main loop iteration and renders flat-out, spiking power usage.

Throttle overlays on the latch path only, leaving the commit-done path
alone so overlay commits are still marked done immediately and the next
game-commit scanout picks up the freshest frame.
@matte-schwartz matte-schwartz force-pushed the matts/vrr-mangoapp-powerusage branch from 1d4c7fc to 0799560 Compare April 27, 2026 22:03
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