Can't get gamescope to work

AMD Ryzen AI 300 with 5070

Using fedora 43
kernel 6.18.12-200.fc43.x86_64
BIOS 03.04

I followed the Framework guides for installing Nvidia propreitary drivers and steam (flatpak method). I have also installed gamescope through flatpak and am using version 3.16.20

Mesa version: 25.3.3
Steam version: 1.0.0.84
and I have: nvidia-580-119-02

I have tried every permutation of arguments to gamescope, environment variables, –expose-wayland etc and I always get the same error as seen bellow:

[2026-02-22 19:24:21] fsync: up and running.
[2026-02-22 19:24:22] chdir "/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Splitgate 2"
[2026-02-22 19:24:22] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:22] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:22] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  console: gamescope-brokey version 3.16.20 (gcc 15.2.0)
[2026-02-22 19:24:22] No CAP_SYS_NICE, falling back to regular-priority compute and threads.
[2026-02-22 19:24:22] Performance will be affected.
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts'
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope'
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common'
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays'
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/gpd.win4.lcd.lua' (id: 5)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua' (id: 6)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua' (id: 7)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/onexplayer.f1.oled.lua' (id: 8)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 9)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 10)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Running script file '/usr/lib/extensions/vulkan/gamescope/share/gamescope/scripts/00-gamescope/displays/zotac.zone.oled.lua' (id: 11)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[2026-02-22 19:24:22] [gamescope-brokey] [Warn]  scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  scriptmgr: Loading scripts from: '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.config/gamescope/scripts'
[2026-02-22 19:24:22] [gamescope-brokey] [Warn]  scriptmgr: Directory '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.config/gamescope/scripts' does not exist
[2026-02-22 19:24:22] Game Recording - would start recording game 2918300, but recording for this game is disabled
[2026-02-22 19:24:22] Adding process 2404 for gameID 2918300
[2026-02-22 19:24:22] WARNING: discarding _NET_WM_PID 9846 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
[2026-02-22 19:24:22] WARNING: discarding _NET_WM_PID 7 as invalid for X11 window - use specialized XCB_X11_TO_PID function!
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  vulkan: selecting physical device 'NVIDIA GeForce RTX 5070 Laptop GPU': queue family 2 (general queue family 0)
[2026-02-22 19:24:22] [gamescope-brokey] [Info]  vulkan: physical device supports DRM format modifiers
[2026-02-22 19:24:23] Fossilize INFO: Overriding serialization path: "/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/shadercache/2918300/fozpipelinesv6/steamapprun_pipeline_cache".
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: [backend/headless/backend.c:67] Creating headless backend
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  xdg_backend: Seat name: seat0
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  xdg_backend: Initted Wayland backend
[2026-02-22 19:24:23] [gamescope-brokey] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[2026-02-22 19:24:23] [gamescope-brokey] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan: supported DRM formats for sampling usage:
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   AR24 (0x34325241)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   XR24 (0x34325258)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   AB24 (0x34324241)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   XB24 (0x34324258)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   RG16 (0x36314752)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   NV12 (0x3231564E)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   AB4H (0x48344241)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   XB4H (0x48344258)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   AB30 (0x30334241)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   XB30 (0x30334258)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   AR30 (0x30335241)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  vulkan:   XR30 (0x30335258)
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: Using explicit sync when available
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: Running compositor on wayland display 'gamescope-0'
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: [backend/headless/backend.c:17] Starting headless backend
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: Successfully initialized libei for input emulation!
[2026-02-22 19:24:23] [gamescope-brokey] [Error] wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
[2026-02-22 19:24:23] [gamescope-brokey] [Error] wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X1: Address already in use
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :2
[2026-02-22 19:24:23] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:23] Adding process 2424 for gameID 2918300
[2026-02-22 19:24:23] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:23] ERROR: ld.so: object '/home/foamtoaster/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  pipewire: stream state changed: connecting
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  pipewire: stream state changed: paused
[2026-02-22 19:24:23] [gamescope-brokey] [Info]  pipewire: stream available on node ID: 155
[2026-02-22 19:24:23] Adding process 2425 for gameID 2918300
[2026-02-22 19:24:23] (EE) failed to read Wayland events: Broken pipe
[2026-02-22 19:24:23] Game Recording - game stopped [gameid=2918300]
[2026-02-22 19:24:23] Removing process 2425 for gameID 2918300
[2026-02-22 19:24:23] Removing process 2424 for gameID 2918300
[2026-02-22 19:24:23] Removing process 2404 for gameID 2918300

I also did the drm kernel argument as per fedora docs:

sudo grubby --update-kernel=ALL --args=‘nvidia-drm.modeset=1’

Although they seem to recommend a dnf installation.

Any help on this would be greatly appreciated

I’m not sure how you’re trying to use gamescope, but I just add something like this to my steam launch parameters and it works fine.

LD_PRELOAD=“” gamescope --force-grab-cursor --mangoapp -w 1280 -h 800 -f -F fsr --fsr-sharpness 10 --adaptive-sync – %command%

Have you tried something similar?

it doesn’t matter what the params are, it can literally just be gamescope – %command%
Ive also just tried yours and it also does not work with the same error in the logs

I think you’ve got a problem with the link-up between Steam-in-flatpak and GameScope-in-flatpak – which is totally intentional because flatpaks are a container technology for application isolation and this is working to keep Steam and GameScope apart.

You could try reinstalling Steam and GameScope via dnf.

Gamescope errors happen due to X11 socket conflicts and 32-bit Steam libraries on Fedora

1 ensure no other X server or Wayland session is running that blocks /tmp/.X11-unix/X*
2 run Gamescope outside Steam to test

gamescope -w 1920 -h 1080 -- your_game_executable

3 confirm nvidia-drm.modeset=1 is applied and reboot

4 install Steam 32-bit libraries to fix ELFCLASS32 errors

sudo dnf install mesa-dri-drivers.i686 libglvnd.i686

5 use Fedora dnf NVIDIA packages instead of Flatpak for drivers to avoid library conflicts

This should fix socket and library errors

Ok im back after many hours of trying fixes.

I ended up installing steam and gamescope through dnf as that is what most guides and people offering help seem to do.
It worked a lot better right away, I didnt get any of the socket errors from the flatpak.

I still had to give it higher priority as per section 4.3 in this arch documentation:

But I still had the “returned zero modifiers for DRM format”.

In the end what fixed it was forcing gamescope to run on the AMD igpu by adding the flag
--prefer-vk-device 1002:1114
As per this reddit thread Reddit - The heart of the internet

You can get the random ID by running:
MESA_VK_DEVICE_SELECT=list vulkaninfo
And then choosing the AMD igpu ID

All working now, I hope this is useful for someone in future :slight_smile:

To fix Gamescope on Fedora with a Framework 16, avoid using Flatpak for Steam and Gamescope. Install both via dnf to prevent X11 socket and 32-bit library issues. Ensure nvidia-drm.modeset=1 is set, install 32-bit libraries, and run Gamescope outside Steam to test. If using an AMD iGPU, force it with --prefer-vk-device <AMD_ID> from vulkaninfo. This resolves most errors.

That’s how I did it. Guess that’s why I’m not having problems.