How to install Gamescope on Rocky Linux 9

Hello,
I’m trying to install gamescope, but I only found online versions in either COPR or pkgs.org, which use too new of a glibc I think.

djkato@djkato-vfx ~/Downloads [1]> sudo dnf install ./gamescope-3.11.49-2.x86_64.rpm --nobest
Last metadata expiration check: 1:34:18 ago on Tue 03 Sep 2024 19:59:11 CEST.
Error: 
 Problem: conflicting requests
  - nothing provides libliftoff.so.0()(64bit) needed by gamescope-3.11.49-2.x86_64 from @commandline
  - nothing provides libstdc++.so.6(GLIBCXX_3.4.30)(64bit) needed by gamescope-3.11.49-2.x86_64 from @commandline
  - nothing provides libwlroots.so.10()(64bit) needed by gamescope-3.11.49-2.x86_64 from @commandline
(try to add '--skip-broken' to skip uninstallable packages)

I downloaded the repo thinking I could maybe compile it for my self, but I get issues too. I’m not knowledgeable about how C++ apps are built, so I don’t know if this is fixable:

djkato@djkato-vfx ~/C/gamescope (master)> meson build/
The Meson build system
Version: 0.63.3
Source dir: /home/djkato/Code/gamescope
Build dir: /home/djkato/Code/gamescope/build
Build type: native build
Project name: gamescope
Project version: undefined
C compiler for the host machine: cc (gcc 11.4.1 "cc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)")
C linker for the host machine: cc ld.bfd 2.35.2-43
C++ compiler for the host machine: c++ (gcc 11.4.1 "c++ (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)")
C++ linker for the host machine: c++ ld.bfd 2.35.2-43
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -Wno-unused-parameter: YES 
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES 
Compiler for C++ supports arguments -Wno-c99-designator: NO 
Compiler for C++ supports arguments -Wno-invalid-offsetof: YES 
Compiler for C++ supports arguments -Wno-unused-const-variable: YES 
Compiler for C++ supports arguments -Wno-volatile: YES 
Compiler for C++ supports arguments -Wno-deprecated-volatile: NO 
Compiler for C++ supports arguments -Wno-ignored-qualifiers: YES 
Compiler for C++ supports arguments -Wno-missing-braces: YES 
Compiler for C++ supports arguments -ffast-math: YES 
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Run-time dependency libpipewire-0.3 found: YES 1.0.1
Library rt found: YES
Found CMake: /usr/bin/cmake (3.26.5)
Run-time dependency hwdata found: NO (tried pkgconfig and cmake)
Run-time dependency x11 found: YES 1.7.0
Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)

meson.build:49:0: ERROR: Dependency "wayland-client" not found, tried pkgconfig and cmake

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

I found missing packages installed already:

djkato@djkato-vfx ~/C/gamescope (master) [1]> sudo dnf install libwayland-client hwdata
Last metadata expiration check: 1:56:04 ago on Tue 03 Sep 2024 19:59:11 CEST.
Package libwayland-client-1.21.0-1.el9.i686 is already installed.
Package libwayland-client-1.21.0-1.el9.x86_64 is already installed.
Package hwdata-0.348-9.13.el9.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

And I’m not sure what I can do about that.

Is it possible for me to even compile this for older version? Or where could I find an old enough version that supports my glibc version? From what I understand, updating glibc is basically impossible on Linux without breaking ton of stuff.

Thanks for any tips, dj~

I assume you mean ValveSoftware?

In the one where you try to compile it.

example ‘hwdata’.

I think it’s looking for the -devel version.

dnf list hwdata-devel

Once installed, start the build again, and see if it can now find ‘hwdata’.

Do the same for each missing dependency.

Ok I investigated further, and got it to work finally.

First, check out the tag 3.11.51 (maybe newer would work, I just randomly chose one 2y old
git checkout tags/3.11.51 -b master
then git pull, git submodules update --init
then:

sudo dnf install libX11-devel hwdata-devel wayland-devel vulkan-devel wayland-protocols-devel libXdamage-devel libXcomposite-devel libXrender-devel libXext-devel libXxf86vm-devel libXtst-devel libXres-devel libdrm-devel libxkbcommon-devel libcap-devel SDL2-devel libudev-devel pixman-devel libinput-devel xcb-util-wm-devel glslang-devel

# libseat isn't in any rhel repo I found, so I cloned it from repo
cd subprojects/
git clone https://github.com/kennylevinsen/seatd
cd ..

meson build/
ninja -C build/
meson install -C build/

# It wouldn't find when running gamescope and crash. 
# fixed by copying it from where meson installed it
sudo cp /usr/local/lib64/libseat.so.1 /usr/lib64/

And now it works!

That’s great, so what does it actually do?

Gamescope creates a virtual something with a virtual inner and outer resolution, and then offers controls on how to upscale it. For example:

gamescope -h 1440 -H 2160 -r 144 --fsr-upscaling --fsr-sharpness 12 --adaptive-sync --steam -b %command%

Adding this to steam launch options starts the game with an inner (h)eight of 1440p, and upscales it to a (H)eight of 2160p (4k) at a max refreshrate of 144, use FSR upscaling (AMD AI thing) with adaptive sync and steam support, and have the outer window be (b)orderless.

This allows me to set custom in game resolution for any game, and add FRS upscaling to any game that doesn’t have it.

That’s interesting.

I was trying to find out how FSR upscaling works in general (not directly related to gaming), and this code might give the answers.