Gamescope control
This is a private Gamescope protocol. Regular Wayland clients must not use it.
gamescope_control
destroy()
set_app_target_refresh_cycle(fps: uint, flags: uint<gamescope_control.target_refresh_cycle_flag>)
Argument | Type | Description |
|---|---|---|
| fps | uint | application's target refresh cycle in frames-per-second. 0 = disabled/native |
| flags | uint<gamescope_control.target_refresh_cycle_flag> | combination of 'target_refresh_cycle_flag' values |
take_screenshot(path: string, type: uint<gamescope_control.screenshot_type>, flags: uint<gamescope_control.screenshot_flags>)
Argument | Type | Description |
|---|---|---|
| path | string | Path to write the screenshot. Extension of the file determines the format |
| type | uint<gamescope_control.screenshot_type> | Type of screenshot to save |
| flags | uint<gamescope_control.screenshot_flags> | combination of 'screenshot_flags' values |
display_sleep(display_type: uint<gamescope_control.display_type_flags>, flags: uint<gamescope_control.display_sleep_flags>)
Argument | Type | Description |
|---|---|---|
| display_type | uint<gamescope_control.display_type_flags> | display type |
| flags | uint<gamescope_control.display_sleep_flags> | sleep flags |
set_look(lut3d_g22: fd, lut3d_pq: fd, flags: uint<gamescope_control.look_flags>)
Argument | Type | Description |
|---|---|---|
| lut3d_g22 | fd | file-descriptor containing the data for the look for Gamma 2.2. Expects .cube format |
| lut3d_pq | fd | file-descriptor containing the data for the look for PQ. Expects .cube format |
| flags | uint<gamescope_control.look_flags> | look flags |
request_app_performance_stats(app_id: uint)
Argument | Type | Description |
|---|---|---|
| app_id | uint | Appid |
Argument | Type | Description |
|---|---|---|
| layout | string | XKB layout name, eg. fr |
| variant | string | XKB layout variant, eg. bepo. Empty for the default variant |
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.
Argument | Type | Description |
|---|---|---|
| feature | uint | one of the enum features |
| version | uint | feature version |
| flags | uint | feature flags |
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_name | string | |
| display_make | string | |
| display_model | string | |
| display_flags | uint<gamescope_control.display_flag> | combination of 'display_flag' values |
| valid_refresh_rates | array | valid refresh rates for the display for the purposes of combined fps limiting + refresh. empty if fixed at a mode. 32-bit unsigned integers. |
app_performance_stats(app_id: uint, frametime_ns_lo: uint, frametime_ns_hi: uint)
Argument | Type | Description |
|---|---|---|
| app_id | uint | Appid for this request |
| frametime_ns_lo | uint | Time delta between the two most recent frames |
| frametime_ns_hi | uint | frametime_ns high bits |
feature { done, reshade_shaders, display_info, pixel_filter, refresh_cycle_only_change_refresh_rate, mura_correction, look, perf_query, keyboard_layout, sgsr_filter }
Argument | Value | Description |
|---|---|---|
| done | 0 | sent at the end of the feature list |
| reshade_shaders | 1 | |
| display_info | 2 | |
| pixel_filter | 3 | |
| refresh_cycle_only_change_refresh_rate | 4 | |
| mura_correction | 5 | |
| look | 6 | |
| perf_query | 7 | |
| keyboard_layout | 8 | |
| sgsr_filter | 9 |
Enum of the features supported by Gamescope.
display_flag { internal_display, supports_hdr, supports_vrr }
Argument | Value | Description |
|---|---|---|
| internal_display | 0x1 | |
| supports_hdr | 0x2 | |
| supports_vrr | 0x4 |
target_refresh_cycle_flag { internal_display, allow_refresh_switching, only_change_refresh_rate }
Argument | Value | Description |
|---|---|---|
| internal_display | 0x1 | Whether we should change the target refresh cycle under external/internal display |
| allow_refresh_switching | 0x2 | Whether or not to allow refresh rate switching |
| only_change_refresh_rate | 0x4 | Only change refresh rate but don't apply frame limiter fps cap |
screenshot_type { base_plane_only, all_real_layers, full_composition, screen_buffer }
Argument | Value | Description |
|---|---|---|
| base_plane_only | 1 | Just the game w/ no display color mgmt |
| all_real_layers | 2 | Just the game + overlays w/ no display color mgmt |
| full_composition | 3 | Every layer w/ no display color mgmt and no mura |
| screen_buffer | 4 | The buffer displayed on-screen - 1:1 |
screenshot_flags { dummy }
Argument | Value | Description |
|---|---|---|
| dummy | 0x1 |
display_type_flags { internal_display, external_display }
Argument | Value | Description |
|---|---|---|
| internal_display | 0x1 | The internal display of the device |
| external_display | 0x2 | The external display attached to the device |
Compositor Support
| gamescope_control | ↓ | ||
| Compositors | |||
| Cage | 0.3.0 | x | |
| COSMIC | 1.11.0 | x | |
| flakewm | 3.0.5 | x | |
| GameScope | 3.17.0 | 7 | |
| Hyprland | 0.57.2 | x | |
| Jay | 1.14.0 | x | |
| KWin | 6.7 | x | |
| Labwc | 0.20.2 | x | |
| Louvre | 2.14.1 | x | |
| Mango | 0.16.3 | x | |
| Mir | 2.26 | x | |
| Muffin | 6.7.4 | x | |
| Mutter | 51 | x | |
| niri | 26.04 | x | |
| phoc | 0.55 | x | |
| Pila | 0.5.1 | x | |
| Qtile | 0.37.1 | x | |
| river | 0.5.0 | x | |
| Sway | 1.11 | x | |
| Treeland | 0.8.0 | x | |
| Wayfire | 0.9.0 | x | |
| Weston | 15.0.1 | x | |
Copyright
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.