Closed mattmcadoo closed 5 months ago
I've verified that this problem also happens on native Linux games:
/bin/sh\0-c\0gamescope -W 1920 -H 1080 --mangoapp -b -f -- /home/mcadoo/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=236390 -- /home/mcadoo/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/mcadoo/.local/share/Steam/steamapps/common/War Thunder/linux64/aces' -skip_pkg_validation -forcestart\0
chdir "/home/mcadoo/.local/share/Steam/steamapps/common/War Thunder"
ERROR: ld.so: object '/home/mcadoo/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'AMD Radeon Pro W5500 (RADV NAVI14)': queue family 1 (general queue family 0)
vulkan: physical device supports DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name: seat0
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: RG16 (0x36314752)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
vulkan: AB48 (0x38344241)
vulkan: XB48 (0x38344258)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:17] Starting headless backend
wlserver: Successfully initialized libei for input emulation!
wlserver: [xwayland/server.c:107] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x55a3ae641c20 (res 0x55a3ae63f760)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 173
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
josh edid: Patching res 800x1280 -> 1920x1080
pipewire: renegotiating stream params (size: 960x525)
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x55a3ae3714c0 (res 0x55a3ae67ec30)
pipewire: renegotiating stream params (size: 935x500)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported maximum keycode 708, clipping.
> X11 cannot support keycodes above 255.
> Warning: Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning: Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
[2024-05-28 20:59:12.514] [MANGOHUD] [error] [overlay_params.cpp:1003] Failed to read presets file: '/home/mcadoo/.config/MangoHud/presets.conf'
pipewire: renegotiating stream params (size: 1920x1080)
[S_API] SteamAPI_Init(): Loaded '/home/mcadoo/.local/share/Steam/linux64/steamclient.so' OK.
xdg_backend: Compositor released us but we were not acquired. Oh no.
xdg_backend: Compositor released us but we were not acquired. Oh no.
xdg_backend: Compositor released us but we were not acquired. Oh no.
xdg_backend: Compositor released us but we were not acquired. Oh no.
xdg_backend: Compositor released us but we were not acquired. Oh no.
src/common/pipes.cpp (883) : fatal stalled cross-thread pipe.
src/common/pipes.cpp (883) : fatal stalled cross-thread pipe.
src/common/pipes.cpp (883) : Fatal assert; application exiting
src/common/pipes.cpp (883) : Fatal assert; application exiting
05/28 21:02:12 minidumps folder is set to /tmp/dumps
05/28 21:02:12 Init: Installing breakpad exception handler for appid(aces)/version(1.0)/tid(537523)
assert_20240528210212_3.dmp[537799]: Uploading dump (out-of-process)
/tmp/dumps/assert_20240528210212_3.dmp
_ExitOnFatalAssert
assert_20240528210212_3.dmp[537799]: Finished uploading minidump (out-of-process): success = yes
assert_20240528210212_3.dmp[537799]: response: Discarded=1
assert_20240528210212_3.dmp[537799]: file ''/tmp/dumps/assert_20240528210212_3.dmp'', upload yes: ''Discarded=1''
gamescope: children shut down!
gamescope: ../gamescope-3.14.18/src/backend.cpp:60: virtual gamescope::CBaseBackendFb::~CBaseBackendFb(): Assertion `!HasLiveReferences()' failed.
@mattmcadoo try building gamescope but with the wlroots subproject version that upstream github repo uses
Then, if you still have the same issue, try testing running gamescope on the terminal outside of steam: gamescope -- vkcube
and also gamescope -- glxgears
I get two build failures, one being a missing header file, when trying to build from the master branch:
FAILED: src/gamescope.p/wlserver.cpp.o
x86_64-pc-linux-gnu-g++ -Isrc/gamescope.p -Isrc -I../gamescope-9999/src -I../gamescope-9999/src/reshade/source -I../gamescope-9999/src/reshade/include -I../gamescope-9999/thirdparty/SPIRV-Headers/include/spirv/unified1 -Iprotocol -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/SDL2 -I/usr/include/wlroots-0.18 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/stb -I/usr/include/libdecor-0 -I/usr/include/libei-1.0 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++20 -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-invalid-offsetof -Wno-unused-const-variable -Wno-volatile -Wno-ignored-qualifiers -Wno-missing-braces -ffast-math -DHAVE_PIPEWIRE=1 -DHAVE_OPENVR=0 '-DHWDATA_PNP_IDS="//usr/share/hwdata/pnp.ids"' -march=native -O2 -pipe -DAVIF_DLL -D_REENTRANT -pthread -DHAVE_DRM=1 -DHAVE_SDL2=1 -DHAVE_AVIF=1 -DHAVE_LIBCAP=1 -DHAVE_LIBEIS=1 -MD -MQ src/gamescope.p/wlserver.cpp.o -MF src/gamescope.p/wlserver.cpp.o.d -o src/gamescope.p/wlserver.cpp.o -c ../gamescope-9999/src/wlserver.cpp
../gamescope-9999/src/wlserver.cpp:28:10: fatal error: wlr/render/timeline.h: No such file or directory
28 | #include <wlr/render/timeline.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
Fails to compile src/rendervulkan.cpp
FAILED: src/gamescope.p/rendervulkan.cpp.o
x86_64-pc-linux-gnu-g++ -Isrc/gamescope.p -Isrc -I../gamescope-9999/src -I../gamescope-9999/src/reshade/source -I../gamescope-9999/src/reshade/include -I../gamescope-9999/thirdparty/SPIRV-Headers/include/spirv/unified1 -Iprotocol -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/SDL2 -I/usr/include/wlroots-0.18 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/stb -I/usr/include/libdecor-0 -I/usr/include/libei-1.0 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++20 -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-invalid-offsetof -Wno-unused-const-variable -Wno-volatile -Wno-ignored-qualifiers -Wno-missing-braces -ffast-math -DHAVE_PIPEWIRE=1 -DHAVE_OPENVR=0 '-DHWDATA_PNP_IDS="//usr/share/hwdata/pnp.ids"' -march=native -O2 -pipe -DAVIF_DLL -D_REENTRANT -pthread -DHAVE_DRM=1 -DHAVE_SDL2=1 -DHAVE_AVIF=1 -DHAVE_LIBCAP=1 -DHAVE_LIBEIS=1 -MD -MQ src/gamescope.p/rendervulkan.cpp.o -MF src/gamescope.p/rendervulkan.cpp.o.d -o src/gamescope.p/rendervulkan.cpp.o -c ../gamescope-9999/src/rendervulkan.cpp
../gamescope-9999/src/rendervulkan.cpp:4007:1: error: ‘const wlr_renderer_impl’ has no non-static data member named ‘get_shm_texture_formats’
4007 | };
| ^
../gamescope-9999/src/rendervulkan.cpp: In function ‘wlr_renderer* vulkan_renderer_create()’:
../gamescope-9999/src/rendervulkan.cpp:4012:26: error: too few arguments to function ‘void wlr_renderer_init(wlr_renderer*, const wlr_renderer_impl*, uint32_t)’
4012 | wlr_renderer_init(&renderer->base, &renderer_impl);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../gamescope-9999/src/rendervulkan.hpp:70,
from ../gamescope-9999/src/rendervulkan.cpp:34:
/usr/include/wlroots-0.18/wlr/render/interface.h:36:6: note: declared here
36 | void wlr_renderer_init(struct wlr_renderer *renderer,
| ^~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp: At global scope:
../gamescope-9999/src/rendervulkan.cpp:3995:32: warning: ‘wlr_render_pass* renderer_begin_buffer_pass(wlr_renderer*, wlr_buffer*, const wlr_buffer_pass_options*)’ defined but not used [-Wunused-function]
3995 | static struct wlr_render_pass *renderer_begin_buffer_pass( struct wlr_renderer *renderer, struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp:3985:28: warning: ‘wlr_texture* renderer_texture_from_buffer(wlr_renderer*, wlr_buffer*)’ defined but not used [-Wunused-function]
3985 | static struct wlr_texture *renderer_texture_from_buffer( struct wlr_renderer *wlr_renderer, struct wlr_buffer *buf )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp:3980:12: warning: ‘int renderer_get_drm_fd(wlr_renderer*)’ defined but not used [-Wunused-function]
3980 | static int renderer_get_drm_fd( struct wlr_renderer *wlr_renderer )
| ^~~~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp:3975:41: warning: ‘const wlr_drm_format_set* renderer_get_dmabuf_texture_formats(wlr_renderer*)’ defined but not used [-Wunused-function]
3975 | static const struct wlr_drm_format_set *renderer_get_dmabuf_texture_formats( struct wlr_renderer *wlr_renderer )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp:3968:24: warning: ‘const uint32_t* renderer_get_shm_texture_formats(wlr_renderer*, size_t*)’ defined but not used [-Wunused-function]
3968 | static const uint32_t *renderer_get_shm_texture_formats( struct wlr_renderer *wlr_renderer, size_t *len
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../gamescope-9999/src/rendervulkan.cpp:3963:17: warning: ‘uint32_t renderer_get_render_buffer_caps(wlr_renderer*)’ defined but not used [-Wunused-function]
3963 | static uint32_t renderer_get_render_buffer_caps( struct wlr_renderer *renderer )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full build log attached.
I guess I can't attach a gzip file of the full build log...
Same compile errors on 3.14.18 with the included wlroots:
FAILED: src/gamescope.p/rendervulkan.cpp.o
x86_64-pc-linux-gnu-g++ -Isrc/gamescope.p -Isrc -I../gamescope-3.14.18/src -I../gamescope-3.14.18/src/reshade/source -I../gamescope-3.14.18/src/reshade/include -I../gamescope-3.14.18/thirdparty/SPIRV-Headers/include/spirv/unified1 -Iprotocol -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/SDL2 -I/usr/include/wlroots-0.18 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/stb -I/usr/include/libdecor-0 -I/usr/include/libei-1.0 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++20 -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-invalid-offsetof -Wno-unused-const-variable -Wno-volatile -Wno-ignored-qualifiers -Wno-missing-braces -ffast-math -DHAVE_PIPEWIRE=1 -DHAVE_OPENVR=0 '-DHWDATA_PNP_IDS="//usr/share/hwdata/pnp.ids"' -march=native -O2 -pipe -DAVIF_DLL -D_REENTRANT -pthread -DHAVE_DRM=1 -DHAVE_SDL2=1 -DHAVE_AVIF=1 -DHAVE_LIBCAP=1 -DHAVE_LIBEIS=1 -MD -MQ src/gamescope.p/rendervulkan.cpp.o -MF src/gamescope.p/rendervulkan.cpp.o.d -o src/gamescope.p/rendervulkan.cpp.o -c ../gamescope-3.14.18/src/rendervulkan.cpp
../gamescope-3.14.18/src/rendervulkan.cpp:4007:1: error: ‘const wlr_renderer_impl’ has no non-static data member named ‘get_shm_texture_formats’
4007 | };
| ^
../gamescope-3.14.18/src/rendervulkan.cpp: In function ‘wlr_renderer* vulkan_renderer_create()’:
../gamescope-3.14.18/src/rendervulkan.cpp:4012:26: error: too few arguments to function ‘void wlr_renderer_init(wlr_renderer*, const wlr_renderer_impl*, uint32_t)’
4012 | wlr_renderer_init(&renderer->base, &renderer_impl);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../gamescope-3.14.18/src/rendervulkan.hpp:70,
from ../gamescope-3.14.18/src/rendervulkan.cpp:34:
/usr/include/wlroots-0.18/wlr/render/interface.h:36:6: note: declared here
36 | void wlr_renderer_init(struct wlr_renderer *renderer,
| ^~~~~~~~~~~~~~~~~
@mattmcadoo two things:
-Dforce_fallback_for
to meson, make sure to include wlroots
in itgit submodule update --init
and meson subprojects download
are run before compiling gamescope I'm using Gentoo, so I have ebuilds that will build from the release tarball by the version numbering and a "live" ebuild that pulls directly from Github. I set the live ebuild to build the 420eb91387a484fd7b1ea71449091f0480d9e538 commit, or 3.14.18 tag since it does the submodule checkout. I got it compile but had to include this patch https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4697/diffs for libliftoff
Without that patch, the build fails as I noted in the bug report to wlroots at
FAILED: subprojects/wlroots/libwlroots.a.p/backend_drm_libliftoff.c.o
x86_64-pc-linux-gnu-gcc -Isubprojects/wlroots/libwlroots.a.p -Isubprojects/wlroots -I../gamescope-9999/subprojects/wlroots -Isubprojects/wlroots/include -I../gamescope-9999/subprojects/wlroots/include -Isubprojects/wlroots/protocol -Isubprojects/wlroots/render/gles2/shaders -Isubprojects/wlroots/render/vulkan/shaders -Isubprojects/wlroots/backend/drm -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -D_POSIX_C_SOURCE=200809L -DWLR_USE_UNSTABLE -DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../gamescope-9999/subprojects/wlroots/= -march=native -O2 -pipe -fPIC -MD -MQ subprojects/wlroots/libwlroots.a.p/backend_drm_libliftoff.c.o -MF subprojects/wlroots/libwlroots.a.p/backend_drm_libliftoff.c.o.d -o subprojects/wlroots/libwlroots.a.p/backend_drm_libliftoff.c.o -c ../gamescope-9999/subprojects/wlroots/backend/drm/libliftoff.c
../gamescope-9999/subprojects/wlroots/backend/drm/libliftoff.c: In function ‘commit’:
../gamescope-9999/subprojects/wlroots/backend/drm/libliftoff.c:410:27: error: too few arguments to function ‘liftoff_output_apply’
410 | int ret = liftoff_output_apply(crtc->liftoff, req, flags);
| ^~~~~~~~~~~~~~~~~~~~
In file included from ../gamescope-9999/subprojects/wlroots/backend/drm/libliftoff.c:2:
/usr/include/libliftoff.h:85:1: note: declared here
85 | liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req,
| ^~~~~~~~~~~~~~~~~~~~
I did have to add the --force-fallback-for=wlroots
as you noted to the ebuild.
Now to actually test it.
Cool deal, working on both Linux and Proton/Windows games.
Thanks.
Output from terminal running Steam:
System info:
Gamescope is built using wlroots-0.17.3, not the version included in the tarball. libliftoff-0.5.0 using patch for libliftoff.c from here: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4697/diffs to allow it to compile against wlroot-0.17.3