Ever have a game ignore your display settings? On my system Trackmania 2020 has two display modes. 1080p windowed and 2160p fullscreen. Gamescope can help with that by putting games into obey me mode. It even works with NVIDIA, doesn’t it?
Speaking of drivers, you will need version 515.43.04 or above.
Before doing anything you need to add nvidia-drm.modeset=1 to grub, update grub, and restart the PC.
sudo nano /etc/default/grub
sudo apt install gamescope
sudo dnf -y install gamescope
sudo pacman -S gamescope
Building from source (Debian)
Installing Debian dependencies
sudo apt install build-essential git meson ninja-build python3-setuptools cmake hwdata libx11-xcb-dev libxxf86vm-dev libxres-dev libxmu-dev libsdl2-dev libinput-dev libseat-dev libxcb-composite0-dev libxcb-icccm4-dev libxcb-res0-dev glslang-tools libpipewire-0.3-dev libwlroots-dev libvulkan-dev libliftoff-dev libliftoff0 libstb-dev libstb0 libwlroots-dev libwlroots10 libxcb-dri3-dev libxcb-image0-dev libxcb-present-dev libxcb-render-util0-dev libxcb-sync-dev libbenchmark-dev libxtst-dev xwayland libavif-dev
Clone the git repository
git clone https://github.com/ValveSoftware/gamescope.git
Change into the gamescope directory and update the submodule
cd gamescope ; git submodule update --init
Invoke meson build
ninja -C build/
sudo meson install -C build/ --skip-subprojects
Configure gamescope by right clicking on the game, selecting Properties, and editing the launch options under general settings. You can save some time by installing Steam Tinker Launcher.
Rendering a game at 1440p and upscaling it to 2160p (borderless fullscreen) using AMD FSR with mangohud enabled.
gamescope -h 1440 -H 2160 -U -b -- env MANGOHUD=1 %command%
Rendering a fullscreen game in a 1080p bordered window
gamescope -h 1080 -H 1080 -- %command%
-U, --fsr-upscaling use AMD FSR 1.0 for upscaling -Y, --nis-upscaling use NVIDIA Image Scaling for upscaling -i use integer scaling. -b, --borderless make the window borderless -f, --fullscreen make the window fullscreen -w, --nested-width game width -h, --nested-height game height -W, --output-width output width -H, --output-height output height Super + F toggle fullscreen (DANGER) Super + N toggle nearest neighbour filtering Super + U toggle FSR upscaling
In 2023 gamescope + NVIDIA is a good experience. No performance regressions (or boosts) to report and things seem stable. Well, if you ignore Super + F locking my desktop.