Skip to content

Instantly share code, notes, and snippets.

@russiantux
Last active June 24, 2025 14:37
Show Gist options
  • Save russiantux/592b1267591c011bf765b14590774a5f to your computer and use it in GitHub Desktop.
Save russiantux/592b1267591c011bf765b14590774a5f to your computer and use it in GitHub Desktop.
Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Due to what appears to be dependency issues, the gamescope package isn't avalible for Ubuntu 24.04. So here's a guide on how to build and install gamescope for Ubuntu 24.04

  1. Pull latest git of gamescope

$ git clone https://github.com/ValveSoftware/gamescope.git

  1. Install needed dependencies to build gamescope

$ sudo apt install libbenchmark1.8.3 libdisplay-info1 libevdev-dev libgav1-1 libgudev-1.0-dev libmtdev-dev libseat1 libstb0 libwacom-dev libxcb-ewmh2 libxcb-shape0-dev libxcb-xfixes0-dev libxmu-headers libyuv0 libx11-xcb-dev libxres-dev libxmu-dev libseat-dev libinput-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-res0-dev libcap-dev wayland-protocols libvulkan-dev libwayland-dev libx11-dev cmake pkg-config meson libxdamage-dev libxcomposite-dev libxcursor-dev libxxf86vm-dev libxtst-dev libxkbcommon-dev libdrm-dev libpixman-1-dev libdecor-0-dev glslang-tools libbenchmark-dev libsdl2-dev libglm-dev libeis-dev libavif-dev

  1. Build gamescope with meson first

$ meson build/

  1. Buid gamescope with ninja

$ ninja -C build/

  1. If the ninja build didn't produce any errors, install it to your system.

$ meson install -C build/ --skip-subprojects

@artik
Copy link

artik commented May 27, 2025

Here is my step-by-step guide, to compile Gamescope on Linux Mint 22.1 (based on Ubuntu 24.04), so it should work on Ubuntu 24.04 too.

Install dependencies (I included vulkan-tools to test the cube):

sudo apt install \
    libbenchmark1.8.3 \
    libdisplay-info1 \
    libevdev-dev \
    libgav1-1 \
    libgudev-1.0-dev \
    libmtdev-dev \
    libseat1 \
    libstb0 \
    libwacom-dev \
    libxcb-ewmh2 \
    libxcb-shape0-dev \
    libxcb-xfixes0-dev \
    libxmu-headers \
    libyuv0 \
    libx11-xcb-dev \
    libxres-dev \
    libxmu-dev \
    libseat-dev \
    libinput-dev \
    libxcb-composite0-dev \
    libxcb-ewmh-dev \
    libxcb-icccm4-dev \
    libxcb-res0-dev \
    libcap-dev \
    wayland-protocols \
    libvulkan-dev \
    libwayland-dev \
    libx11-dev \
    cmake \
    pkg-config \
    meson \
    libxdamage-dev \
    libxcomposite-dev \
    libxcursor-dev \
    libxxf86vm-dev \
    libxtst-dev \
    libxkbcommon-dev \
    libdrm-dev \
    libpixman-1-dev \
    libdecor-0-dev \
    glslang-tools \
    libbenchmark-dev \
    libsdl2-dev \
    libglm-dev \
    libeis-dev \
    libavif-dev \
    vulkan-tools

Cloning the git:
git clone https://github.com/ValveSoftware/gamescope.git

Go in the folder:
cd gamescope

Load all the submodules:
git submodule update --init

We build the sources:
meson setup --wipe build

OPTIONAL: If you try to compile and get a wayland server not found, here is the fix:
git reset 5e8fddf --hard; git clean -fxd; git submodule update --init --force --recursive

Now we can install:
sudo meson install -C build/ --skip-subprojects

Once installed, we can test gamescope with:
gamescope -- vkcube

To launch the games on Steam, here is my command line:
gamemoderun gamescope -W 3440 -H 1440 -f -- %command%

(there is no upscaler applied in this command line, only display the game in a 3440x1440 window, fullscreen.)

Now, if you lauch gamescope in a terminal, using gamescope --, you'll probably see an error saying:
No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected.

This must be fixed. First local you gamescope executable with which gamescope. When you have your gamescope path, execute:

sudo setcap 'CAP_SYS_NICE=eip' YOUR_GAMECOPE_PATH

Notice that it breaks the steam overlay. To revert:

sudo setcap 'CAP_SYS_NICE-eip' YOUR_GAMECOPE_PATH

Relaunch gamescope in a terminal, and the error should be gone. (Source: https://www.reddit.com/r/linux_gaming/comments/w4u69f/my_gamescope_was_too_nice_and_yours_is_too/)

@CodeByHardik
Copy link

bro just upgrade to ubuntu 25.xx
gamescope is prebuilt there.
i upgraded and it worked PARTIALlY
it worked with hyprland but not with gnome(wayland)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment