|Original author(s)||Pierre-Loup "Plagman" A. Griffais|
Gamescope is a really handy tool that lets you up-scale and play any game or graphical application full screen or in a large window while telling the game that it is running on a monitor with a lower resolution - if you have a AMD GPU using the Mesa drivers. It will not work with other graphics cards or drivers. It is, behind the scenes, a bare-bones Wayland compositor that works fine with both the X and Wayland display servers on Linux.
Any in-game support is not required to use Gamescope. Gamescope starts a nested Wayland server at the resolution you want a game to run at and that becomes your true screen resolution as far as the games are concerned. Gamescope will up-scale that nested Wayland server so it is rendered full-screen or at any desired resolution.
Features And Usability
Gamescope up-scaling a scene demo in Wine from 720p to a 1440p window.
Gamescope is specially useful for three kinds of games and applications:
- Newer games that run too slow at the resolution you would like them to run at (you can render games at 720p and play at 4k)
- Very old games insisting on running in a tiny (like 320x200) window (ie. xrick).
- Games and applications who insit on running full-screen with no option to make them appear in a window if a window is what you want for a particular game or application (many scene demos will only run full screen at your current resolution).
gamescope is something you will have to use from the command-line or use by creating bash scripts or
.desktop files calling it. It does not have any graphical configuration interface or anything like that.
The way to run
gamescope -option value -more_options more_values -- application
Notice that you need to enter
-- between gamescope and the arguments for it and the executable file you want to run.
gamescope is only useful if give it some command-line options and a executable. The arguments that are the most important are:
||The width the games/applications will see and run at|
||The height the games/applications will see and run at|
There are, additionally,
-H arguments that should not be confused with
||The width of the gamescope output window you will see|
||The height of the gamescope output window you will see|
-H options will be "updated" (changed) if you flip the game to full-screen or re-size the window the game is running in.
Switching to full-screen is very easy thanks to one of the only three keyboard shortcuts that are available in gamescope:
|Super+f||Make the window full-screen|
|Super+n||Toggle integer scaling on/off|
|Super+s||Take a screenshot (those are saved as .bmp files in |
There are, additionally, five other command-line options you may want to use.
||Set a frame-limit in frames per second (like 30 or 60). Defaults to unlimited.|
||Set a frame-limit in frames per second (like 30 or 60) when it is unfocused. Defaults to unlimited. Setting this to something very low like 2 or 10 will prevent games from heavily loading the game if you take a pause from a game while leaving it's window open.|
||Toggle integer scaling on/off. There is a visible difference between the default scaling and integer scaling.|
||Start the game full-screen|
||Start in a border-less window|
To recap: If you want the game to run at 720p, as if you were using a 720p monitor as far as the game is concerned, you need to use
-h to specify the resolution the game sees and add
-- and the application you want to run:
gamescope -w 1280 -h 720 -- wine Asahi_by_Futuris.exe
..and if you want that game running at 720p output to a 1440p border-less window, you need to add
-b for border-less window and
-H to specify the size of the output window:
gamescope -w 1280 -h 720 -b -W 2626 -H 1440 -- wine Asahi_by_Futuris.exe
|TIP: You do not need to bother with the |
Entering long command-line commands is a bit tiresome, so you can create simple files that run it such as:
Those would let you run
gamescope-1080p coolgame or
gamescope-1080p-to-4k coolgame to run at game at 1080p.
One disadvantage of using the above scripts is that whatever arguments you give them will come after the
-- separating gamescope arguments from the game executable and it's arguments - so
gamescope-1080p -f coolgame will not work with those scripts.
Gamescope defaults to simple linear scaling. Enabling integer scaling will make many games look better. It isn't really integer scaling.
"Integer scaling is actually a bit of a simplification since it doesn't force the scale factor to be an integer, but -n is a needed piece of achieving integer scaling.
It just removes the filtering from the scale so the pixels are nice and crisp
Without -n it's linear filtering, with -n it's nearest/point filtering"
You can toggle "integer" scaling on/off in-game with super+n to see the difference. It is pretty apparent if you up-scale games running at really low resolutions (like 320x200) to 4K.
Gamescope uses Vulkan async compute to render the up-scaled image. It's not free, it doesn't necessarily come with a performance penalty.
The UNIGINE Superposition benchmark at 1080p medium scores slightly slower in Gamescope. The Final Fantasy XIV Stormblood Benchmark in Wine, on the other hand, scores slightly higher in Gamescope, up-scaled from 1080p to 1440p, than it does in a native 1080p Xorg window.
The Capcom Street Fighter V Benchmark at 1080p with "Picture Quality Max", in Wine 6.7 with DXVK 1.8.1, scores 59.9 fps (it is capped at 60) with our without Gamescope up-scaling it to 1440p.
All these benchmarks were done with "integer" scaling enabled. It does not seem to make any difference if linear or integer scaling is used performance-wise.
Verdict And Conclusion
''Xrick, an old game meant to be ran at 320x200 resolution, in gamescope. Xrick does have a
-zoom options that takes arguments up to four (=1280x1200). gamescope lets you up-scale it to 4k.
gamescope is really useful and it is definitively something worth installing - as long as you have a AMD graphics card and you use the standard Mesa graphics drivers. It simply does not work with graphics cards from other brands. That may change in the future, but as of April 2021 you're out of luck if you do not have a AMD graphics card.
gamescope is meant for games, thought here is another use-case where it is rather useful: A lot of scene demos insist on running full-screen at the displays native resolution. That is far from ideal if you have a 4K display because it is nice for desktop use and it's only powered by an older mid-range graphics card like a AMD RX 570.
gamescope is a really handy way to force everything insisting on running full-screen at native resolution into running into a lower resolution that's more ideal with output at the displays native resolution.
Support For Non-AMD Graphics Cards
It may become possible to use Gamescope on Intel graphics hardware in the future. See https://github.com/Plagman/gamescope/issues/49 to get an idea of how that is progressing. It is, for now, just for AMD graphics cards.
Some GNU/Linux distributions have packages for Gamescope in their repositories, some do not. Using the distribution-provided package is easiest if Gamescope is available in the regular repositories.
Installing all the required dependencies (like the wayland server, meson and ninja) is the biggest hurdle if you choose to compile it from source. What those are will depend on your distribution. Checking out the source code and compiling it is very strait forward:
mkdir $HOME/src;cd $HOME/src git clone https://github.com/Plagman/gamescope.git cd gamescope/ git submodule init git submodule update meson build cd build ninja sudo ninja install
- The Current State Of Gamescope, an article we wrote about it in September 2020. It has a video with Pierre-Loup A Griffais talking about Gamescope at the X.Org Developers Conference 2020.
The gamescope source code repository is at https://github.com/Plagman/gamescope/