Hold games to the frame limit in Performance mode (#1609)

A frame limit only paced what reached the screen: a game without vsync
kept drawing hundreds of frames a second that were thrown away (AIO at
a 60 fps limit drew 155 to 2,446 fps), so the limit saved no power.

With Performance mode on and a frame limit set, the session now sets
gamescope's per-game limit over gamescope_control (gamescopectl
debug_set_fps_limit). gamescope's limiter then has its WSI layer hold
Vulkan games, DXVK and VKD3D included, to the limit. gamescope's own
--framerate-limit option is reset on its first frame in 3.16.29, and
Steam resets the per-game limit while it starts, so the session watches
gamescope's limiter state file and sets the limit again whenever it is
off (a once-a-second check with shell builtins, no process started).
With Performance mode off, a limit paces the screen only, as before.

The session also gives gamescope a fixed limiter state file path, so
gamescope stops leaving a new one behind on every start, and removes
the old ones.

Device-proven on the AYANEO Pocket FIT (Turnip, AIO D3D11, 45 s runs on
battery, three runs each): at a 60 fps limit the game held exactly
60.0 fps and the device drew 7.08 W instead of 9.45 W, with 1.3 instead
of 2.6 busy cores and 5 instead of 11 % GPU load. No limit: unchanged.
This commit is contained in:
The412Banner authored and GitHub committed 2026-10-26 09:16:05 -04:00
1 parent 78f95c5a0c
commit 1b3814a587
3 files changed
+40 -1

No files matched your search

+1 -1
View File
@@ -258,7 +258,7 @@
<string name="mode_ratio_auto">Auto uses at least 16:9.</string>
<string name="mode_fps">Frame limit</string>
<string name="mode_performance">Performance mode</string>
<string name="mode_performance_hint">With no frame limit, games run as fast as they can: frames go back to the game without waiting for the screen. With a frame limit, frames stay paced to it. Either way, gamescope and Wine skip repeated window checks. Uses more power and runs warmer without a limit. Applies next session.</string>
<string name="mode_performance_hint">With no frame limit, games run as fast as they can: frames go back to the game without waiting for the screen. With a frame limit, games are held to it instead of drawing frames the screen never shows. Either way, gamescope and Wine skip repeated window checks. Uses more power and runs warmer without a limit. Applies next session.</string>
<string name="mode_fps_note">Caps the whole session. The display switches to a refresh rate the cap divides evenly.</string>
<string name="mode_hdr">HDR</string>
<string name="mode_hdr10">HDR10 output</string>