Gamescope is a microcompositor from Valve that is used on the Steam Deck. Its goal is to provide an isolated compositor that is tailored towards gaming and supports many gaming-centric features such as:
- Spoofing resolutions.
- Upscaling using AMD FidelityFX™ Super Resolution or NVIDIA Image Scaling.
- Limiting framerates.
As a microcompositor it is designed to run as a nested session on top of your existing desktop environment though it is also possible to use it as an embedded compositor as well.
Gamescope can be installed with the package (or the AUR package). Additionally there is also AUR which includes extra patches not present in the mainline build.
- AMD: Mesa 20.3 or above
- Intel: Mesa 21.2 or above
- NVIDIA: proprietary drivers 515.43.04 or above, and the
Gamescope offers many options, far too many to cover here. For a full list use the
gamescope --help command from a terminal.
From a desktop session
The following command will run supertuxkart using Gamescope and force a 1920x1080 resolution at 60 FPS
$ gamescope -W 1920 -H 1080 -r 60 -- supertuxkart
You can force Steam to run using Gamescope by using the following command:
$ gamescope -e -- steam
-eflag tells Gamescope to enable Steam Integration.
You can also run games from Steam using Gamescope by adding the following to the games launch options
gamescope -- %command%
gamescope -W 1920 -H 1080 -r 60 -- %command%
To run programs using Gamescope through Wine, simply append wine followed by the executable.
$ gamescope -W 1920 -H 1080 -r 60 -- wine supertuxkart
Almost all the popular Wine managers such as Lutris, Bottles, and PlayOnLinux have support for Gamescope. Using them is as simple as installing the desired Gamescope package and checking the Use Gamescope (or similar) option.
You can also use Gamescope from Flatpak versions of Wine managers and Steam in the same way as you would from a package install. It does however require that you first install Gamescope from Flathub with the following command:
$ flatpak install gamescope
-F fsr and
-F nis flags can be used to upscale games using AMD FidelityFX™ Super Resolution 1.0 (FSR) or NVIDIA Image Scaling v1.0.3 (NIS) respectively. You can also use
-S integer for integer upscaling or
-S stretch for stretch scaling.
To upscale a 720p game to 1440p using FSR:
$ gamescope -h 720 -H 1440 -F fsr -- supertuxkart
To run a game at 1080p internal resolution but display it at 4K using NIS:
$ gamescope -w 1920 -h 1080 -W 3840 -H 2160 -F nis -- supertuxkart
Gamescope is a requirement for HDR10 support when playing games, to make use of this feature you must launch your Gamescope session using the
Gamescope does not support Wayland clients by default. To enable support for Wayland clients, add the
--expose-wayland flag to Gamescope's parameters.
Switching to fullscreen causes low performance
This is a known bug when using Gamescopes fullscreen hotkey
Meta+f, if you encounter this issue it can be worked around by using the fullscreen flag
-f when launching the game.
Setting Gamescopes priority
Another known cause of low performance and/or stuttering is not having Gamescope's priority set correctly. You can tell this is the case if you see an error like this in the terminal while Gamescope is running:
No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected.
The following command will fix this:
# setcap 'CAP_SYS_NICE=eip' $(which gamescope)
Window does not appear in Flatpak on NVIDIA
This is because Flatpak Gamescope fails to access the NVIDIA DRM's GBM backend. It can be solved by simply setting an environment variable with the following command:
$ flatpak override --env=GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-XXX-YY-ZZ/extra/gbm packageid
packageid is the Flatpak package identifier of Gamescope or the app you want to use Gamescope with, such as Bottles.
nvidia-XXX-YY-ZZ with the currently installed NVIDIA driver version; inside Flatpak, it can be queried with this command:
$ flatpak run --command=ls packageid /usr/lib/x86_64-linux-gnu/GL
packageid is any Flatpak package identifier; do note that the directory only exists inside Flatpak.
The command must be reran, and modified accordingly, on every driver update.