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

@LukeZGD
Copy link

LukeZGD commented Aug 1, 2024

3.14.26 breaks building in Ubuntu 24.04 with the wayland-server error, so a revert to 3.14.24 or the last commit before the wlroots update (5e8fddf) is needed to be done first before starting the build.

Here's what I used: git reset 5e8fddf --hard; git clean -fxd; git submodule update --init --force --recursive

Here's a link to the last commit before the wlroots update: ValveSoftware/gamescope@5e8fddf

And here's the breaking commit: ValveSoftware/gamescope@3542c4d

@zachboatwright
Copy link

3.14.26 breaks building in Ubuntu 24.04 with the wayland-server error, so a revert to 3.14.24 or the last commit before the wlroots update (5e8fddf) is needed to be done first before starting the build.

Here's what I used: git reset 5e8fddf --hard; git clean -fxd; git submodule update --init --force --recursive

Here's a link to the last commit before the wlroots update: ValveSoftware/gamescope@5e8fddf

And here's the breaking commit: ValveSoftware/gamescope@3542c4d

Thank you so much! I've been trying to install this for days now and that finally worked.

@cootshk
Copy link

cootshk commented Sep 29, 2024

On Ubuntu Server 24.04, you also need these dependencies:
sudo apt install -y xwayland hwdata

@felikcat
Copy link

felikcat commented Nov 4, 2024

git clone https://github.com/ValveSoftware/gamescope.git should be git clone https://github.com/ValveSoftware/gamescope.git --recursive

@Mushufaza
Copy link

Hello, I have installed Kde Neon User Edition (24.04), try everything, it just worked out to install this pack from terminal "Sudo dpkg -i *.deb" has some glitch but it works!

https://github.com/akdor1154/gamescope-pkg/releases/download/v3.12.5-2/gamescope_3.12.5-2_amd64.deb

https://github.com/akdor1154/gamescope-pkg/releases

It is a previous version, but it is what there is U.U Ubuntu 24.04 Derivatives

@Mr-Blake-II
Copy link

Mr-Blake-II commented Nov 28, 2024

I'm very new to linux, but wanted to put this here just in case someone else needs it.

After

$ meson build/

I got the following error:

Neither source directory 'build/' nor build directory None contain a build file meson.build.

I had to use this command to get it to work:

cd gamescope

@kuch3n
Copy link

kuch3n commented Jan 12, 2025

Run-time dependency luajit found: NO (tried pkgconfig and cmake)

src/meson.build:124:13: ERROR: Dependency "luajit" not found, tried pkgconfig and cmake

but package luajit is installed

@JM1705
Copy link

JM1705 commented Jan 20, 2025

Run-time dependency luajit found: NO (tried pkgconfig and cmake)

src/meson.build:124:13: ERROR: Dependency "luajit" not found, tried pkgconfig and cmake

but package luajit is installed

This was happening to me too, I think the gamescope repo mistakenly references luajit when it actually refers to lua itself (luajit doesn't even have a pkgconfig file on ubuntu, only on rpm-based distros) so what I did:

  1. Install a dev package of lua (sudo apt install liblua5.4-dev)
  2. Swap "lua" for "luajit" in the gamescope/src/meson.build file
  3. meson setup --wipe build
  4. ninja -C build

@0x-ur
Copy link

0x-ur commented Mar 4, 2025

For resolving the luajit issue I cloned, built and installed the luajit project directly.
https://luajit.org/index.html

  1. git clone https://luajit.org/git/luajit.git
  2. cd luajit
  3. make && make install (make install might need sudo)

Afterwards, meson setup worked fine.

@Antonio-Kr
Copy link

3.14.26 breaks building in Ubuntu 24.04 with the wayland-server error, so a revert to 3.14.24 or the last commit before the wlroots update (5e8fddf) is needed to be done first before starting the build.

Here's what I used: git reset 5e8fddf --hard; git clean -fxd; git submodule update --init --force --recursive

Here's a link to the last commit before the wlroots update: ValveSoftware/gamescope@5e8fddf

And here's the breaking commit: ValveSoftware/gamescope@3542c4d

This solution does not seem to work anymore.

@adamdmoss
Copy link

FWIW I have a fork of gamescope which builds under ubuntu24 while still having most of the recent upstream gamescope work. I maintain it sporadically but it's still far ahead of 3.14.26 or 3542c4d . It's at https://github.com/adamdmoss/gamescope-ubuntu24

@abrookewood
Copy link

I spent soo long getting this to build (endless dependencies, manual build of luajit, tweaks of the meson build dependencies) ... and then I realised on 25.04 you can just install the pre-built package: sudo apt install -y gamescope

@CodeByHardik
Copy link

I had to run git submodule update --init after cloning the repo, as the gamescope build instructions say. Before running it, I got an error that the reshade directory did not exist.

bro i get the same but i have a theory:
i see-
wlroots| Dependency wayland-server found: NO found 1.22.0 but need: '>=1.23' (cached)

subprojects/wlroots/meson.build:107:17: ERROR: Dependency 'wayland-server' is required but not found.

A full log can be found at /home/hardik/gamescope/build/meson-logs/meson-log.txt

at last of meson build/
i also ran meson setup build/ but same issue

i see i have wayland 1.22 but meson wants >=1.23. so basiclly an upgrade of wayland fixes this. can someone tell the command to run to update wayland

@CodeByHardik
Copy link

k so i tried much debugging and i surrender. wait till gamescope makes ubuntu deb package.

i tried so many times, fixed even every meson warnings and dependencies, fixed ninja errors and even gamescope installed successfully but;
whenever i open any app with gamescope, a blank window opens with no gui inside. and i sus the information while building:

the gcc c++ compiler warnings, but they are ignorable

openvr dependency issue, fine, ignorable until not using VR

epoll-shim, ignorable until building from a non-linux system

WARNING: Running the setup command as meson [options] instead of meson setup [options] is ambiguous and deprecated. ==> so just run meson setup build\ instead of meson build\ , sorry guys i may make a type in commands.

but the main:
wlroots 0.18.0

drm-backend     : NO
x11-backend     : NO
libinput-backend: YES
xwayland        : YES
gles2-renderer  : NO
vulkan-renderer : NO
gbm-allocator   : NO
session         : YES
color-management: NO
xcb-errors      : NO
egl             : NO
libliftoff      : NO

gamescope undefined

Subprojects
glm : YES
libliftoff: YES
openvr : YES
stb : YES
vkroots : YES
wlroots : YES

the element saying NO are basically the core root to render and build gamescope and launch perfectly. i tried installing missing dependencies, but all were there. i build the latest wayland and wayland protocols from source to meet the error of "wayland-server".

but dont know how to fix these NO. 
The entire rendering stack(the elements saying no) are just basically not compiled.
plz help someone. i just wanna use gamescope to upscale my games using fsr and some sharpening for minecraft to get a lil performance boost on my potato rig.

@CodeByHardik
Copy link

k so i tried much debugging and i surrender. wait till gamescope makes ubuntu deb package.
i use ubuntu 24.04.2 lts
i tried so many times, fixed even every meson warnings and dependencies, fixed ninja errors and even gamescope installed successfully but; whenever i open any app with gamescope, a blank window opens with no gui inside. and i sus the information while building:

the gcc c++ compiler warnings, but they are ignorable

openvr dependency issue, fine, ignorable until not using VR

epoll-shim, ignorable until building from a non-linux system

WARNING: Running the setup command as meson [options] instead of meson setup [options] is ambiguous and deprecated. ==> so just run meson setup build\ instead of meson build\ , sorry guys i may make a type in commands.

but the main: wlroots 0.18.0

drm-backend     : NO
x11-backend     : NO
libinput-backend: YES
xwayland        : YES
gles2-renderer  : NO
vulkan-renderer : NO
gbm-allocator   : NO
session         : YES
color-management: NO
xcb-errors      : NO
egl             : NO
libliftoff      : NO

gamescope undefined

Subprojects glm : YES libliftoff: YES openvr : YES stb : YES vkroots : YES wlroots : YES

the element saying NO are basically the core root to render and build gamescope and launch perfectly. i tried installing missing dependencies, but all were there. i build the latest wayland and wayland protocols from source to meet the error of "wayland-server".

but dont know how to fix these NO. 
The entire rendering stack(the elements saying no) are just basically not compiled.
plz help someone. i just wanna use gamescope to upscale my games using fsr and some sharpening for minecraft to get a lil performance boost on my potato rig.

ig our only fast effiecient option is to upgrade to ubuntu 25.04 from ubuntu 24 because gamescope is available as a pre-buuilt package there

@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