Skip to content

mangoapp: report the refresh rate the panel actually scans out - #2509

Merged
matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
matte-schwartz:scanout-refresh-mangoapp
Oct 20, 2026
Merged

matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
matte-schwartz:scanout-refresh-mangoapp

Conversation

@matte-schwartz

@matte-schwartz matte-schwartz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

mangoapp's display refresh is the mode's rate, so with VRR it keeps reporting the display panel's maximum refresj rate rather than the current refresh rate.

Average the page flip event's vblank count over its timestamps rather than counting flip events, since the count also advances for refreshes VRR scans out without a flip. mangoapp only hears from gamescope when something presents, so a message after an idle gap averages over the whole gap.

Goes with flightlessmango/MangoHud#2181

mangoapp's display refresh is the mode's rate, so with VRR enabled it
keeps reporting the maximum refresh rate regardless of the panel's actual
scanout rate.

To report an accurate refresh rate while VRR is active, average the page
flip event's vblank count over its timestamps rather than counting flip
events, since the count also advances for refreshes VRR scans out without
a flip. mangoapp only hears from gamescope when something presents, so a
message after an idle gap averages over the whole gap.
@matte-schwartz
matte-schwartz merged commit 4d5b7f3 into ValveSoftware:master Oct 20, 2026
1 check passed
@matte-schwartz
matte-schwartz deleted the scanout-refresh-mangoapp branch October 20, 2026 02:23
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