Skip to content

gamescope: drop the -r 1200 vblank grid - #2299

Merged
utkarshdalal merged 3 commits into
masterfrom
gamescope-drop-r
Oct 31, 2026
Merged

utkarshdalal merged 3 commits into
masterfrom
gamescope-drop-r

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Description

Removes the fixed -r 1200 vblank grid from the gamescope launch command. gamescope then takes its tick rate from the mode the daemon advertises, which is the panel's active refresh (the daemon learns it from nativeSetPanelRefreshHz and measures the real latch grid itself).

-r 1200 existed so the old wakeup-counting FPS limiter could hit arbitrary caps on a fine grid. A52 (gamescope #22, merged) moved the limiter to a time grid, so the fine grid is no longer needed, and it cost about 1500 steamcompmgr wakeups a second for the whole session.

Measured (Retroid Pocket 6, 120 Hz, Dave the Diver, cap 60, same scene)

-r 1200 (shipped A52) no -r (A52, mode 120 Hz)
gamescope wakeups/s ~1720 ~620-850 (depends on the game's own commit rate)
gamescope CPU 8.1 % 6-7 %
fps unchanged by this PR (the 47 -> 60 fix is gamenative-drm #37, merged)

Type of change

  • Performance / stability improvement

Checklist

  • Device tested (RP6: gamescope logs selecting mode 1280x720@120Hz, vblank: Using timerfd, caps 60 and 30 exact with #37)

Supersedes #2298, which bundled this with an unproven daemon change.


Summary by cubic

Removes the fixed -r 1200 vblank grid from the gamescope launch command; gamescope now ticks at the refresh rate the daemon advertises (the panel's active refresh) instead of a fixed 1200 Hz grid.

The grid was only needed for the old wakeup-counting FPS limiter; A52 moved the limiter to a time grid, so it no longer serves any purpose and cost about 1500 steamcompmgr wakeups per second. Measured on a Retroid Pocket 6 at 120 Hz, session wakeups drop from ~1720/s to ~620-850/s and gamescope CPU from 8.1% to 6-7%, with no change in frame rate.

Written for commit 09e997d. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Changes
    • Gamescope sessions no longer use a fixed refresh-rate grid. Existing scaling and display mode settings remain unchanged. This may affect how refresh rates are selected during gameplay.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 90cd275f-bf83-412f-9595-0bcad0b7e136
Commits

Reviewing files that changed from the base of the PR and between 4c04e42 and d22737d.

Files selected for processing: 2
  • app/src/main/java/app/gamenative/display/GamescopeState.kt
  • app/src/main/java/com/winlator/xenvironment/components/BionicProgramLauncherComponent.java
Files with no reviewable changes: 2
  • app/src/main/java/com/winlator/xenvironment/components/BionicProgramLauncherComponent.java
  • app/src/main/java/app/gamenative/display/GamescopeState.kt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The Gamescope settings no longer define or provide a fixed refresh-rate grid argument. The Gamescope launch command no longer appends that argument. Scaler arguments and mode geometry remain.

Changes: Gamescope refresh-rate argument

Layer / File(s) Summary
Remove fixed refresh-rate argument
app/src/main/java/app/gamenative/display/GamescopeState.kt, app/src/main/java/com/winlator/xenvironment/components/BionicProgramLauncherComponent.java
Removes SESSION_GRID_HZ and gridArg(). The Gamescope launch command no longer appends the grid argument; scaler arguments and mode geometry remain.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: joshuatam

Merge Risk: Minimal · up to d2273

Gamescope can use the panel refresh advertised by the daemon, so the change is ready to merge after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: removing the fixed -r 1200 vblank grid from gamescope.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description clearly explains the change, rationale, measured performance impact, scope, and device testing. It identifies a performance/stability improvement. The required Recording section and se…
Full details: Description check

Explanation

The description clearly explains the change, rationale, measured performance impact, scope, and device testing. It identifies a performance/stability improvement. The required Recording section and several standard checklist items are not included, but the description is otherwise sufficiently complete and on topic.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@utkarshdalal
utkarshdalal merged commit 96cf638 into master Oct 31, 2026
4 checks passed
@utkarshdalal
utkarshdalal deleted the gamescope-drop-r branch October 31, 2026 12:25
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