Gamescope control

gamescope-specific protocol

This is a private Gamescope protocol. Regular Wayland clients must not use it.


destroy()
set_app_target_refresh_cycle(fps: uint, flags: uint<gamescope_control.target_refresh_cycle_flag>)
Argument
Type
Description
fpsuint
application's target refresh cycle in frames-per-second. 0 = disabled/native
flagsuint<gamescope_control.target_refresh_cycle_flag>
combination of 'target_refresh_cycle_flag' values
Argument
Type
Description
pathstring
Path to write the screenshot. Extension of the file determines the format
typeuint<gamescope_control.screenshot_type>
Type of screenshot to save
flagsuint<gamescope_control.screenshot_flags>
combination of 'screenshot_flags' values
Attempts to make the display go to sleep/idle
Argument
Type
Description
lut3d_g22fd
file-descriptor containing the data for the look for Gamma 2.2. Expects .cube format
lut3d_pqfd
file-descriptor containing the data for the look for PQ. Expects .cube format
flagsuint<gamescope_control.look_flags>
look flags
Sets a look for the screen based on a 3D LUT.
unset_look()
Unsets the current look.
request_app_performance_stats(app_id: uint)
Argument
Type
Description
app_iduint
Appid
Asks the compositor to send the most recent performance stats
set_keyboard_layout(layout: string, variant: string)
Argument
Type
Description
layoutstring
XKB layout name, eg. fr
variantstring
XKB layout variant, eg. bepo. Empty for the default variant
Sets the XKB layout used for physical keyboards

An empty layout goes back to the layout from the XKB_DEFAULT_* environment, and a variant without a layout is ignored. A layout that fails to compile is ignored and the current keymap is kept.

feature_support(feature: uint, version: uint, flags: uint)
Argument
Type
Description
featureuint
one of the enum features
versionuint
feature version
flagsuint
feature flags
feature supported

Says whether a feature is supported and the version.

active_display_info(connector_name: string, display_make: string, display_model: string, display_flags: uint<gamescope_control.display_flag>, valid_refresh_rates: array)
Argument
Type
Description
connector_namestring
display_makestring
display_modelstring
display_flagsuint<gamescope_control.display_flag>
combination of 'display_flag' values
valid_refresh_ratesarray
valid refresh rates for the display for the purposes of combined fps limiting + refresh. empty if fixed at a mode. 32-bit unsigned integers.
screenshot_taken(path: string)
Argument
Type
Description
pathstring
Path to written screenshot
app_performance_stats(app_id: uint, frametime_ns_lo: uint, frametime_ns_hi: uint)
Argument
Type
Description
app_iduint
Appid for this request
frametime_ns_louint
Time delta between the two most recent frames
frametime_ns_hiuint
frametime_ns high bits
Argument
Value
Description
internal_display0x1
Whether we should change the target refresh cycle under external/internal display
allow_refresh_switching0x2
Whether or not to allow refresh rate switching
only_change_refresh_rate0x4
Only change refresh rate but don't apply frame limiter fps cap
Argument
Value
Description
base_plane_only1
Just the game w/ no display color mgmt
all_real_layers2
Just the game + overlays w/ no display color mgmt
full_composition3
Every layer w/ no display color mgmt and no mura
screen_buffer4
The buffer displayed on-screen - 1:1
screenshot_flags { dummy } 
Argument
Value
Description
dummy0x1
display_type_flags { internal_display, external_display } 
Argument
Value
Description
internal_display0x1
The internal display of the device
external_display0x2
The external display attached to the device
display_sleep_flags { sleep, wake } 
Argument
Value
Description
sleep0x1
Go to sleep... zzz... (Conflicts with wake)
wake0x2
Wake up! (Conflicts with sleep)
look_flags { dummy } 
Argument
Value
Description
dummy0x1

Compositor Support

gamescope_control↓
Compositors
CageCage0.3.0
x
COSMICCOSMIC1.11.0
x
flakewm3.0.5
x
GameScopeGameScope3.17.0
7
HyprlandHyprland0.57.2
x
Jay1.14.0
x
KWinKWin6.7
x
LabwcLabwc0.20.2
x
LouvreLouvre2.14.1
x
MangoMango0.16.3
x
MirMir2.26
x
MuffinMuffin6.7.4
x
MutterMutter51
x
niriniri26.04
x
phocphoc0.55
x
Pila0.5.1
x
QtileQtile0.37.1
x
riverriver0.5.0
x
SwaySway1.11
x
TreelandTreeland0.8.0
x
WayfireWayfire0.9.0
x
WestonWeston15.0.1
x

Copyright © 2023 Valve Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.