gamescope/README.md

71 lines
3.4 KiB
Markdown
Raw Normal View History

## gamescope: the micro-compositor formerly known as steamcompmgr
2020-01-16 02:40:53 +00:00
In an embedded session usecase, gamescope does the same thing as steamcompmgr, but with less extra copies and latency:
2020-01-16 02:46:10 +00:00
- It's getting game frames through Wayland by way of Xwayland, so there's no copy within X itself before it gets the frame.
- It can use DRM/KMS to directly flip game frames to the screen, even when stretching or when notifications are up, removing another copy.
2020-01-16 02:47:09 +00:00
- When it does need to composite with the GPU, it does so with async Vulkan compute, meaning you get to see your frame quick even if the game already has the GPU busy with the next frame.
2020-01-16 02:40:53 +00:00
It also runs on top of a regular desktop, the 'nested' usecase steamcompmgr didn't support.
2020-01-16 02:46:10 +00:00
- Because the game is running in its own personal Xwayland sandbox desktop, it can't interfere with your desktop and your desktop can't interfere with it.
2020-01-16 02:46:10 +00:00
- You can spoof a virtual screen with a desired resolution and refresh rate as the only thing the game sees, and control/resize the output as needed. This can be useful in exotic display configurations like ultrawide or multi-monitor setups that involve rotation.
It runs on Mesa + AMD or Intel, and could be made to run on other Mesa/DRM drivers with minimal work. AMD requires Mesa 20.3+, Intel requires Mesa 21.2+. For NVIDIA's proprietary driver, version 515.43.04+ is required (make sure the `nvidia-drm.modeset=1` kernel parameter is set).
2020-01-16 02:46:10 +00:00
If running RadeonSI clients with older cards (GFX8 and below), currently have to set `R600_DEBUG=nodcc`, or corruption will be observed until the stack picks up DRM modifiers support.
2020-12-11 11:48:03 +00:00
## Building
```
git submodule update --init
2020-12-11 11:48:03 +00:00
meson build/
ninja -C build/
build/gamescope -- <game>
```
Install with:
```
meson install -C build/ --skip-subprojects
```
2020-01-20 10:10:36 +00:00
## Keyboard shortcuts
* **Super + F** : Toggle fullscreen
* **Super + N** : Toggle integer scaling
2022-02-03 09:22:30 +00:00
* **Super + U** : Toggle FSR upscaling
* **Super + Y** : Toggle NIS upscaling
2022-02-03 09:22:30 +00:00
* **Super + I** : Increase FSR sharpness by 1
* **Super + O** : Decrease FSR sharpness by 1
2021-10-12 07:30:19 +00:00
* **Super + S** : Take screenshot (currently goes to `/tmp/gamescope_$DATE.png`)
2020-09-18 00:22:07 +00:00
## Examples
On any X11 or Wayland desktop, you can set the Steam launch arguments of your game as follows:
```sh
# Upscale a 720p game to 1440p with integer scaling
2021-07-20 11:16:57 +00:00
gamescope -h 720 -H 1440 -n -- %command%
# Limit a vsynced game to 30 FPS
gamescope -r 30 -- %command%
# Run the game at 1080p, but scale output to a fullscreen 3440×1440 pillarboxed ultrawide window
gamescope -w 1920 -h 1080 -W 3440 -H 1440 -b -- %command%
```
2021-04-16 10:12:17 +00:00
## Options
2021-09-10 12:26:42 +00:00
See `gamescope --help` for a full list of options.
2021-07-20 11:16:57 +00:00
* `-W`, `-H`: set the resolution used by gamescope. Resizing the gamescope window will update these settings. Ignored in embedded mode. If `-H` is specified but `-W` isn't, a 16:9 aspect ratio is assumed. Defaults to 1280×720.
2021-07-20 11:03:37 +00:00
* `-w`, `-h`: set the resolution used by the game. If `-h` is specified but `-w` isn't, a 16:9 aspect ratio is assumed. Defaults to the values specified in `-W` and `-H`.
2021-04-16 10:12:17 +00:00
* `-r`: set a frame-rate limit for the game. Specified in frames per second. Defaults to unlimited.
* `-o`: set a frame-rate limit for the game when unfocused. Specified in frames per second. Defaults to unlimited.
* `-U`: use AMD FidelityFX™ Super Resolution 1.0 for upscaling
* `-Y`: use NVIDIA Image Scaling v1.0.2 for upscaling
2021-04-16 10:12:17 +00:00
* `-n`: use integer scaling.
* `-b`: create a border-less window.
* `-f`: create a full-screen window.