Gamescope

From Linux Gaming
Revision as of 05:45, 12 May 2025 by AngeUshiromiya (talk | contribs) (Add references and change formatting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Gamescope is a compositor. It creates a virtual desktop and can upscale a game window. This can be beneficial if it doesn't play nicely with your desktop, if the window doesn't grab your mouse or if it breaks when loosing focus.

Setup

You can usually install Gamescope from your distribution official repository. To check if it's installed, run gamescope --help in a terminal emulator. To get a smooth gaming experience, run sudo setcap 'CAP_SYS_NICE=eip' $(which gamescope)[1].

Usage

To run Gamescope with your game, you just have to append your binary path. So, if you use Wine from the command-line and want to limit a game to 30 FPS use gamescope -r 30 -- wine game.exe[2]. While you can use the command prefix field on launchers like Lutris or Bottles, Gamescope should have its own sections with multiple options available.

Keyboard shortcuts[3]

  • Super + F: Toggle fullscreen
  • Super + N: Toggle nearest neighbour filtering
  • Super + U: Toggle FSR upscaling
  • Super + Y: Toggle NIS upscaling
  • Super + I: Increase FSR sharpness by 1
  • Super + O: Decrease FSR sharpness by 1
  • Super + S: Take screenshot (goes to /tmp/gamescope_$DATE.png)
  • Super + G: Toggle keyboard grab

Upscaling

Gamescope can be used for upscaling with AMD FidelityFX™ Super Resolution or NVIDIA Image Scaling: set gamescope -F fsr --sharpness 4 -- %command% or gamescope -F nis --sharpness 4 -- %command% as a command prefix. "4" is an example value, replace it by something between "0" and "20". This also works for native games and can also be used with another resolution: gamescope -w 1920 -h 1080 -W 3840 -H 2160 -F nis --sharpness 4 -- game[4].

Downsampling

You can use Gamescope for downsampling too. For example, use gamescope -f -w 3840 -h 2160 -- %command% as a command prefix, to downscale from 4K. The same can be achieved in Lutris by enabling Gamescope and setting "3840x2160" as resolution.

Troubleshooting

  • If you experience stuttering and lag, try running gamescope --rt -r <desired_framerate> --immediate-flips -- %command% where <desired_framerate> is a number.
  • Some games have issues like video playblack or black/white screens when the environment variable ENABLE_GAMESCOPE_WSI is set to "1": use ENABLE_GAMESCOPE_WSI=0 to fix them[5].
  • Shortcuts might not work on GNOME[6] but they can be fixed by unchecking the "Gamescope" option in the Lutris settings and using the command prefix field.
  • If you run a game from Steam with Gamescope, you could experience stuttering after 30 minutes[7].
  • If you need to use MangoHud with Gamescope, don't chain both commands but use the --mangoapp argument with Gamescope[8].