Repository navigation
Report the panel's active refresh rate to the gndrm daemon - #23
Merged
joshuatam merged 2 commits intoOct 30, 2026
Conversation
added 2 commits
October 30, 2026 21:16
… on display changes
…the limiter ceiling alike
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Under gamescope the daemon measures the panel's latch grid (
vsync.rs) against the refresh rate the app reports throughGameNativeDrm.nativeSetPanelRefreshHz. The app reported the fastest mode the panel supports, so on a panel a user holds at 60 Hz the daemon tracked a 120 Hz lattice and told the shim the latch period was 8.33 ms. Measured on the Odin 3 (panel at 60 Hz, maximum 120): the shim loggedpanel grid period=8333usbefore this change andperiod=16666usafter.The change
detectRefreshRateHz: the display's current mode (Display.refreshRate), falling back to the default only when it cannot be read. It replacesdetectMaxRefreshRateHzeverywhere, so the FPS limiter's ceiling now follows the active rate too (times the same multiplier) instead of the panel's maximum.nativeStart, and registers aDisplayManager.DisplayListenerthat reports it again ononDisplayChanged, so a mode switch mid-session reaches the daemon. The listener is unregistered at session exit, just beforenativeStop.Verification
:app:compileModernDebugKotlinpasses on this base.Stacked on utkarshdalal#2283 (base
fix/gamescope-resolution-scanout); two commits.