Gamescope doesn't work on hybrid NVIDIA after Mesa/Vulkan updates
Is there an existing issue for this?
- [X] I have searched the existing issues
Are you using any gamescope patches or a forked version of gamescope?
- [X] The issue occurs on upstream gamescope without any modifications
Current Behavior
After updating to the latest Mesa and Vulkan packages, gamescope fails to run on the NVIDIA dGPU, with and without the WSI layer enabled. Works fine on the integrated Intel GPU though.
This happens on the gamescope version from the Arch repositories and on a git build.
The errors are identical to those from an issue I reported previously: https://github.com/ValveSoftware/gamescope/issues/1519
These are the updated packages:
- mesa (1:24.2.4-1 -> 1:24.2.5-1)
- lib32-mesa (1:24.2.4-1 -> 1:24.2.5-1)
- mesa-vdpau (1:24.2.4-1 -> 1:24.2.5-1)
- vulkan-intel (1:24.2.4-1 -> 1:24.2.5-1)
- vulkan-mesa-layers (1:24.2.4-1 -> 1:24.2.5-1)
Steps To Reproduce
Run gamescope on the NVIDIA GPU:
prime-run gamescope -- vkcube
Hardware information
- Distro: Arch Linux
- CPU: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
- GPU: Intel Corporation TigerLake-H GT1 [UHD Graphics]
- GPU: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q]
- Driver Version: Mesa 24.2.5-arch1.1
- Driver Version: 560.35.03
Software information
- Desktop environment: KDE 6.2.1
- Session type: Wayland
- Gamescope version: 3.15.13
- Gamescope launch command(s): prime-run gamescope -- vkcube
Which gamescope backends have the issue you are reporting?
- [X] Wayland (default for nested gamescope)
- [ ] DRM (default for embedded gamescope, i.e. gamescope-session)
- [ ] SDL
- [ ] OpenVR
Logging, screenshots, or anything else
Post Update Log:
[gamescope] [Info] console: gamescope version 3.15.13 (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Laptop GPU': queue family 2 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] xdg_backend: Seat name: seat0
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: AR24 (0x34325241)
[gamescope] [Info] vulkan: XR24 (0x34325258)
[gamescope] [Info] vulkan: AB24 (0x34324241)
[gamescope] [Info] vulkan: XB24 (0x34324258)
[gamescope] [Info] vulkan: RG16 (0x36314752)
[gamescope] [Info] vulkan: NV12 (0x3231564E)
[gamescope] [Info] vulkan: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
gamescope: ../gamescope/src/rendervulkan.cpp:2144: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
Pre Update Log:
[gamescope] [Info] console: gamescope version 3.15.13 (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[gamescope] [Info] vulkan: selecting physical device 'Intel(R) UHD Graphics (TGL GT1)': queue family 0 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] xdg_backend: Seat name: seat0
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: AR24 (0x34325241)
[gamescope] [Info] vulkan: XR24 (0x34325258)
[gamescope] [Info] vulkan: AB24 (0x34324241)
[gamescope] [Info] vulkan: XB24 (0x34324258)
[gamescope] [Info] vulkan: RG16 (0x36314752)
[gamescope] [Info] vulkan: NV12 (0x3231564E)
[gamescope] [Info] vulkan: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB48 (0x38344241)
[gamescope] [Info] vulkan: XB48 (0x38344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
[gamescope] [Info] wlserver: Using explicit sync when available
[gamescope] [Info] wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info] wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info] wlserver: Successfully initialized libei for input emulation!
[gamescope] [Error] wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
[gamescope] [Info] wlserver: [xwayland/server.c:107] Starting Xwayland on :2
[gamescope] [Info] pipewire: stream state changed: connecting
[gamescope] [Info] pipewire: stream state changed: paused
[gamescope] [Info] pipewire: stream available on node ID: 139
[gamescope] [Info] xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info] vblank: Using timerfd.
[gamescope] [Info] xdg_backend: PreferredMetadata: Red: 0.64 0.33, Green: 0.3 0.6, Blue: 0.15 0.06, White: 0.3127 0.329, Max Luminance: 200 nits, Min Luminance: 0.05 nits, Max Full Frame Luminance: 200 nits
[gamescope] [Info] edid: Patching res 800x1280 -> 1280x720
ATTENTION: default value of option vk_xwayland_wait_ready overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_xwayland_wait_ready overridden by environment.
[Gamescope WSI] Application info:
pApplicationName: vkcube
applicationVersion: 0
pEngineName: vkcube
engineVersion: 0
apiVersion: 4194304
[Gamescope WSI] Executable name: vkcube
Selected GPU 1: NVIDIA GeForce RTX 3060 Laptop GPU, type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
[Gamescope WSI] Made gamescope surface for xid: 0x400000
[Gamescope WSI] Surface state:
steam app id: 0
window xid: 0x400000
wayland surface res id: 5
layer client flags: 0x0
server hdr output enabled: false
hdr formats exposed to client: false
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
[gamescope] [Warn] xwm: got the same buffer committed twice, ignoring.
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
[Gamescope WSI] Creating swapchain for xid: 0x400000 - minImageCount: 3 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
[gamescope] [Info] xdg_backend: Changed refresh to: 143.912hz
[Gamescope WSI] Created swapchain for xid: 0x400000 - imageCount: 3
[Gamescope WSI] Swapchain recieved new refresh cycle: 6.95ms
(EE) [gamescopereaper] [Info] reaper: Parent of gamescopereaper was killed. Killing children.
failed to read Wayland events: Broken pipe
[gamescope] [Info] launch: Primary child shut down!
What happens if instead of prime-run you use the VK ICD file name method like VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json gamescope -- vkcube, any difference?
Edit: just to add, I wasn't able to repro this issue on a nvidia dGPU only rig with the same package versions on Arch. I'll have to see if I still have an intel iGPU plus Nvidia dGPU laptop I can put Linux on
It doesn't work on AMD either.
By the way, gamescope -- vkcube works just fine.
What happens if instead of prime-run you use the VK ICD file name method like
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json gamescope -- vkcube, any difference?Edit: just to add, I wasn't able to repro this issue on a nvidia dGPU only rig with the same package versions on Arch. I'll have to see if I still have an intel iGPU plus Nvidia dGPU laptop I can put Linux on
@matte-schwartz My issue is fixed after I updated to the new 565.57.01 NVIDIA drivers.
@laichiaheng im not really sure what you mean here, 3.15.13 works fine on AMD here both in-game and with vkcube. Probably better to file a separate report with more info than "it doesn't work", or look for a matching report since OP figured out their specific issue.
I closed this GitHub issue too soon. I think I messed up last time checking if the new 565.57.01 NVIDIA drivers worked with the latest Mesa/Vulkan packages. I had to restore to an earlier snapshot, did the whole upgrade process again and now gamescope doesn't work even on the new NVIDIA drivers.
What happens if instead of prime-run you use the VK ICD file name method like
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json gamescope -- vkcube, any difference?Edit: just to add, I wasn't able to repro this issue on a nvidia dGPU only rig with the same package versions on Arch. I'll have to see if I still have an intel iGPU plus Nvidia dGPU laptop I can put Linux on
@matte-schwartz I tried that command, no luck.
I don't really understand why it's happening yet, but I do also see the issue on a 3070ti dGPU laptop with an Intel iGPU, even when vulkan-intel is removed and downgrading Mesa. Tested both NV 560 and 565 driver series and they both have the same issue. Downgrading Gamescope to ~3.14.29 or so me instead results in a hard PC lockup with gamescope -- vkcube
if I use Plasma 6 Wayland or the DRM backend from a VT, I have the same error as you. a coredump is here:
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x70e07d74eac0 (LWP 5759))]
(gdb) thread apply all bt
Thread 15 (Thread 0x70e0757fc6c0 (LWP 5767)):
#0 0x000070e07df147f6 in __GI_ppoll (fds=fds@entry=0x70e060000b90, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#1 0x000070e07cb6bf89 in ppoll (__fds=0x70e060000b90, __nfds=1, __timeout=0x0, __ss=0x0) at /usr/include/bits/poll2.h:101
#2 g_main_context_poll_unlocked (priority=<optimized out>, context=0x5f4cb5a60420, timeout_usec=<optimized out>, fds=0x70e060000b90, n_fds=1) at ../glib/glib/gmain.c:4591
#3 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5f4cb5a60420, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4268
#4 0x000070e07cafa112 in g_main_context_iteration (context=0x5f4cb5a60420, may_block=1) at ../glib/glib/gmain.c:4338
#5 0x000070e07a1d6f5e in dconf_gdbus_worker_thread () at ../dconf/gdbus/dconf-gdbus-thread.c:82
#6 0x000070e07cb383a5 in g_thread_proxy (data=0x5f4cb5a55d00) at ../glib/glib/gthread.c:892
#7 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#8 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 14 (Thread 0x70e074ffb6c0 (LWP 5768)):
#0 0x000070e07df147f6 in __GI_ppoll (fds=fds@entry=0x70e064000b90, nfds=nfds@entry=2, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#1 0x000070e07cb6bf89 in ppoll (__fds=0x70e064000b90, __nfds=2, __timeout=0x0, __ss=0x0) at /usr/include/bits/poll2.h:101
#2 g_main_context_poll_unlocked (priority=<optimized out>, context=0x70e06c005b20, timeout_usec=<optimized out>, fds=0x70e064000b90, n_fds=2) at ../glib/glib/gmain.c:4591
#3 g_main_context_iterate_unlocked.isra.0 (context=0x70e06c005b20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4268
#4 0x000070e07cb00477 in g_main_loop_run (loop=0x70e06c007f90) at ../glib/glib/gmain.c:4475
#5 0x000070e07a5d3abc in gdbus_shared_thread_func (user_data=0x70e06c005af0) at ../glib/gio/gdbusprivate.c:284
#6 0x000070e07cb383a5 in g_thread_proxy (data=0x70e06c005c40) at ../glib/glib/gthread.c:892
#7 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#8 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 13 (Thread 0x70e04bc1f6c0 (LWP 5777)):
#0 0x000070e07de9c6af in __futex_abstimed_wait_common64 (private=0, futex_word=0x70e040000f58, expected=0, op=393, abstime=0x70e04bc1e9b0, cancel=true) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=0x70e040000f58, expected=0, clockid=0, abstime=0x70e04bc1e9b0, private=0, cancel=true) at futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x70e040000f58, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x70e04bc1e9b0, private=private@entry=0) at futex-internal.c:139
#3 0x000070e07de9f672 in __pthread_cond_wait_common (cond=0x70e040000f30, mutex=0x5f4cb5ca6430, clockid=0, abstime=0x70e04bc1e9b0) at pthread_cond_wait.c:503
#4 ___pthread_cond_timedwait64 (cond=0x70e040000f30, mutex=0x5f4cb5ca6430, abstime=0x70e04bc1e9b0) at pthread_cond_wait.c:643
#5 0x000070e05e8128cc in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ed3f34c in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05ed203a6 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e05e812a84 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#9 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#10 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 12 (Thread 0x70e0589fc6c0 (LWP 5774)):
#0 0x000070e07de9c6af in __futex_abstimed_wait_common64 (private=0, futex_word=0x70e044000f58, expected=0, op=393, abstime=0x70e0589fba90, cancel=true) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=0x70e044000f58, expected=0, clockid=0, abstime=0x70e0589fba90, private=0, cancel=true) at futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x70e044000f58, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x70e0589fba90, private=private@entry=0) at futex-internal.c:139
#3 0x000070e07de9f672 in __pthread_cond_wait_common (cond=0x70e044000f30, mutex=0x5f4cb6060a00, clockid=0, abstime=0x70e0589fba90) at pthread_cond_wait.c:503
#4 ___pthread_cond_timedwait64 (cond=0x70e044000f30, mutex=0x5f4cb6060a00, abstime=0x70e0589fba90) at pthread_cond_wait.c:643
#5 0x000070e05e8128cc in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ec1bc0d in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05e812a84 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#9 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 11 (Thread 0x70e0599fe6c0 (LWP 5771)):
#0 0x000070e07de9c6af in __futex_abstimed_wait_common64 (private=0, futex_word=0x70e050000f58, expected=0, op=393, abstime=0x70e0599fdaa0, cancel=true) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=0x70e050000f58, expected=0, clockid=0, abstime=0x70e0599fdaa0, private=0, cancel=true) at futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x70e050000f58, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x70e0599fdaa0, private=private@entry=0) at futex-internal.c:139
--Type <RET> for more, q to quit, c to continue without paging--c
#3 0x000070e07de9f672 in __pthread_cond_wait_common (cond=0x70e050000f30, mutex=0x5f4cb5c08c80, clockid=0, abstime=0x70e0599fdaa0) at pthread_cond_wait.c:503
#4 ___pthread_cond_timedwait64 (cond=0x70e050000f30, mutex=0x5f4cb5c08c80, abstime=0x70e0599fdaa0) at pthread_cond_wait.c:643
#5 0x000070e05e8128cc in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ec459a2 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05e812a84 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#9 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 10 (Thread 0x70e07b1fd6c0 (LWP 5762)):
#0 0x000070e07df21d56 in epoll_wait (epfd=14, events=0x70e07b1fc990, maxevents=4, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00005f4c83f27cda in gamescope::CWaiter<4ul>::PollEvents (this=0x5f4cb5a1ab58, nTimeOut=-1) at ../src/waitable.h:270
#2 0x00005f4c83f1cf7c in gamescope::CWaylandInputThread::ThreadFunc (this=0x5f4cb5a1ab50) at ../src/Backends/WaylandBackend.cpp:2385
#3 0x00005f4c83f1c8b9 in operator() (__closure=0x5f4cb5a1ed88) at ../src/Backends/WaylandBackend.cpp:2293
#4 0x00005f4c83f205fa in std::__invoke_impl<void, gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#5 0x00005f4c83f205bd in std::__invoke<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> >(struct {...} &&) (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#6 0x00005f4c83f2056a in std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x5f4cb5a1ed88) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#7 0x00005f4c83f20530 in std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > >::operator()(void) (this=0x5f4cb5a1ed88) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#8 0x00005f4c83f204d2 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<gamescope::CWaylandInputThread::CWaylandInputThread()::<lambda()> > > >::_M_run(void) (this=0x5f4cb5a1ed80) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#9 0x000070e07e0f70a4 in std::execute_native_thread_routine (__p=0x5f4cb5a1ed80) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#10 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#11 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 9 (Thread 0x70e07b9fe6c0 (LWP 5761)):
#0 0x000070e07df21d56 in epoll_wait (epfd=11, events=0x70e07b9faa40, maxevents=1024, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00005f4c83f907f8 in gamescope::CWaiter<1024ul>::PollEvents (this=0x5f4c84443740 <g_LibEisWaiter>, nTimeOut=-1) at ../src/waitable.h:270
#2 0x00005f4c83fcfa36 in gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::WaiterThreadFunc (this=0x5f4c84443740 <g_LibEisWaiter>, pszThreadName=0x5f4c841e50ff "gamescope-eis") at ../src/waitable.h:456
#3 0x00005f4c83fcb400 in gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}::operator()() const (__closure=0x5f4cb5a118e8) at ../src/waitable.h:380
#4 0x00005f4c83fde803 in std::__invoke_impl<void, gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}>(std::__invoke_other, gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}&&) (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#5 0x00005f4c83fde78d in std::__invoke<gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}>(gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}&&) (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#6 0x00005f4c83fde6ce in std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x5f4cb5a118e8) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#7 0x00005f4c83fde5da in std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> >::operator()() (this=0x5f4cb5a118e8) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#8 0x00005f4c83fde402 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::CRawPointer<gamescope::IWaitable>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> > >::_M_run() (this=0x5f4cb5a118e0) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#9 0x000070e07e0f70a4 in std::execute_native_thread_routine (__p=0x5f4cb5a118e0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#10 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#11 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 8 (Thread 0x70e075ffd6c0 (LWP 5766)):
#0 0x000070e07df1f15d in syscall () from /usr/lib/libc.so.6
#1 0x000070e07cb352a0 in g_cond_wait_until_impl (cond=<optimized out>, mutex=0x5f4cb5a1e2b0, end_time=<optimized out>) at ../glib/glib/gthread-posix.c:1140
#2 g_cond_wait_until (cond=<optimized out>, mutex=0x5f4cb5a1e2b0, end_time=<optimized out>) at ../glib/glib/gthread.c:1761
#3 0x000070e07cabd115 in g_async_queue_pop_intern_unlocked (queue=0x5f4cb5a1e2b0, wait=1, end_time=500577008) at ../glib/glib/gasyncqueue.c:378
#4 0x000070e07cabd1b7 in g_async_queue_timeout_pop (queue=0x5f4cb5a1e2b0, timeout=<optimized out>) at ../glib/glib/gasyncqueue.c:501
#5 0x000070e07cb3ad90 in g_thread_pool_wait_for_new_pool () at ../glib/glib/gthreadpool.c:167
#6 g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/glib/gthreadpool.c:394
#7 0x000070e07cb383a5 in g_thread_proxy (data=0x70e068000b90) at ../glib/glib/gthread.c:892
#8 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#9 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 7 (Thread 0x70e0767fe6c0 (LWP 5765)):
#0 0x000070e07df147f6 in __GI_ppoll (fds=fds@entry=0x5f4cb5a4d3c0, nfds=nfds@entry=1, timeout=<optimized out>, timeout@entry=0x0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:42
#1 0x000070e07cb6bf89 in ppoll (__fds=0x5f4cb5a4d3c0, __nfds=1, __timeout=0x0, __ss=0x0) at /usr/include/bits/poll2.h:101
#2 g_main_context_poll_unlocked (priority=<optimized out>, context=0x5f4cb5a4d1a0, timeout_usec=<optimized out>, fds=0x5f4cb5a4d3c0, n_fds=1) at ../glib/glib/gmain.c:4591
#3 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5f4cb5a4d1a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4268
#4 0x000070e07cafa112 in g_main_context_iteration (context=0x5f4cb5a4d1a0, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4338
#5 0x000070e07cafa162 in glib_worker_main (data=<optimized out>) at ../glib/glib/gmain.c:6537
#6 0x000070e07cb383a5 in g_thread_proxy (data=0x5f4cb5a1d880) at ../glib/glib/gthread.c:892
#7 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#8 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 6 (Thread 0x70e07c1ff6c0 (LWP 5760)):
#0 0x000070e07df21d56 in epoll_wait (epfd=5, events=0x70e07c1fb9f0, maxevents=1024, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1 0x00005f4c83f907f8 in gamescope::CWaiter<1024ul>::PollEvents (this=0x5f4c8441da80 <g_ImageWaiter>, nTimeOut=-1) at ../src/waitable.h:270
#2 0x00005f4c83f924ab in gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::WaiterThreadFunc (this=0x5f4c8441da80 <g_ImageWaiter>, pszThreadName=0x5f4c841daea2 "gamescope_img") at ../src/waitable.h:456
#3 0x00005f4c83f8bcc4 in gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}::operator()() const (__closure=0x5f4cb5a10d08) at ../src/waitable.h:380
#4 0x00005f4c83faac65 in std::__invoke_impl<void, gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}>(std::__invoke_other, gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}&&) (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#5 0x00005f4c83faab9c in std::__invoke<gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}>(gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}&&) (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#6 0x00005f4c83faaaa4 in std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x5f4cb5a10d08) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#7 0x00005f4c83faaa0c in std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> >::operator()() (this=0x5f4cb5a10d08) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#8 0x00005f4c83faa87c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<gamescope::CAsyncWaiter<gamescope::Rc<commit_t, true>, 1024ul>::CAsyncWaiter(char const*)::{lambda()#1}> > >::_M_run() (this=0x5f4cb5a10d00) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#9 0x000070e07e0f70a4 in std::execute_native_thread_routine (__p=0x5f4cb5a10d00) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#10 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#11 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 5 (Thread 0x70e0591fd6c0 (LWP 5772)):
#0 0x000070e07de9c6af in __futex_abstimed_wait_common64 (private=0, futex_word=0x70e04c000f58, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=0x70e04c000f58, expected=0, clockid=0, abstime=0x0, private=0, cancel=true) at futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x70e04c000f58, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3 0x000070e07de9f216 in __pthread_cond_wait_common (cond=0x70e04c000f30, mutex=0x5f4cb5bb6810, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
#4 ___pthread_cond_wait (cond=0x70e04c000f30, mutex=0x5f4cb5bb6810) at pthread_cond_wait.c:618
#5 0x000070e05e81286c in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ec30135 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05e812a84 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#9 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 4 (Thread 0x70e076fff6c0 (LWP 5764)):
#0 0x000070e07df1f15d in syscall () from /usr/lib/libc.so.6
#1 0x000070e07cb34597 in g_cond_wait_impl (cond=0x5f4cb5a45af8, mutex=0x5f4cb5a45af0) at ../glib/glib/gthread-posix.c:1007
#2 g_cond_wait (cond=0x5f4cb5a45af8, mutex=0x5f4cb5a45af0) at ../glib/glib/gthread.c:1665
#3 0x000070e07cabd48c in g_async_queue_pop_intern_unlocked (queue=0x5f4cb5a45af0, wait=1, end_time=-1) at ../glib/glib/gasyncqueue.c:375
#4 g_async_queue_pop_unlocked (queue=0x5f4cb5a45af0) at ../glib/glib/gasyncqueue.c:431
#5 0x000070e07cb3abb6 in g_thread_pool_spawn_thread (data=<optimized out>) at ../glib/glib/gthreadpool.c:297
#6 0x000070e07cb383a5 in g_thread_proxy (data=0x5f4cb5a47540) at ../glib/glib/gthread.c:892
#7 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#8 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 3 (Thread 0x70e05a1ff6c0 (LWP 5770)):
#0 0x000070e07de9c6af in __futex_abstimed_wait_common64 (private=1585523786, futex_word=0x70e054000f58, expected=0, op=393, abstime=0x70e05a1fea80, cancel=true) at futex-internal.c:57
#1 __futex_abstimed_wait_common (futex_word=0x70e054000f58, expected=0, clockid=1512040768, abstime=0x70e05a1fea80, private=1585523786, cancel=true) at futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x70e054000f58, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x70e05a1fea80, private=private@entry=0) at futex-internal.c:139
#3 0x000070e07de9f672 in __pthread_cond_wait_common (cond=0x70e054000f30, mutex=0x5f4cb5b474a0, clockid=0, abstime=0x70e05a1fea80) at pthread_cond_wait.c:503
#4 ___pthread_cond_timedwait64 (cond=0x70e054000f30, mutex=0x5f4cb5b474a0, abstime=0x70e05a1fea80) at pthread_cond_wait.c:643
#5 0x000070e05e8128cc in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ec37071 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05e812a84 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#9 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 2 (Thread 0x70e04aa2e6c0 (LWP 5778)):
#0 0x000070e05edd8dc1 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#1 0x000070e05e3946af in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#2 0x000070e05e37aea8 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#3 0x000070e05ec5fbe4 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#4 0x000070e05ec42438 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#5 0x000070e05ed654e6 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#6 0x000070e05ec6374b in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#7 0x000070e05ec63e59 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#8 0x000070e05ec4b89f in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#9 0x000070e05eb2fa22 in ?? () from /usr/lib/libnvidia-glcore.so.565.57.01
#10 0x00005f4c83fe4e47 in CVulkanDevice::compilePipeline (this=0x5f4c84443bc0 <g_device>, layerCount=2, ycbcrMask=2, type=SHADER_TYPE_BLIT, blur_layer_count=1, composite_debug=0, colorspace_mask=0, output_eotf=0, itm_enable=false) at ../src/rendervulkan.cpp:1113
#11 0x00005f4c83fe51b7 in CVulkanDevice::compileAllPipelines (this=0x5f4c84443bc0 <g_device>) at ../src/rendervulkan.cpp:1147
#12 0x00005f4c83fe0fa3 in operator() (__closure=0x5f4cb6221b58) at ../src/rendervulkan.cpp:300
#13 0x00005f4c83ff2858 in std::__invoke_impl<void, CVulkanDevice::BInit(VkInstance, VkSurfaceKHR)::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/14.2.1/bits/invoke.h:61
#14 0x00005f4c83ff281b in std::__invoke<CVulkanDevice::BInit(VkInstance, VkSurfaceKHR)::<lambda()> >(struct {...} &&) (__fn=...) at /usr/include/c++/14.2.1/bits/invoke.h:96
#15 0x00005f4c83ff27c8 in std::thread::_Invoker<std::tuple<CVulkanDevice::BInit(VkInstance, VkSurfaceKHR)::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x5f4cb6221b58) at /usr/include/c++/14.2.1/bits/std_thread.h:301
#16 0x00005f4c83ff279c in std::thread::_Invoker<std::tuple<CVulkanDevice::BInit(VkInstance, VkSurfaceKHR)::<lambda()> > >::operator()(void) (this=0x5f4cb6221b58) at /usr/include/c++/14.2.1/bits/std_thread.h:308
#17 0x00005f4c83ff2780 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<CVulkanDevice::BInit(VkInstance, VkSurfaceKHR)::<lambda()> > > >::_M_run(void) (this=0x5f4cb6221b50) at /usr/include/c++/14.2.1/bits/std_thread.h:253
#18 0x000070e07e0f70a4 in std::execute_native_thread_routine (__p=0x5f4cb6221b50) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#19 0x000070e07dea0386 in start_thread (arg=<optimized out>) at pthread_create.c:447
#20 0x000070e07df21b0c in __clone3 () from /usr/lib/libc.so.6
Thread 1 (Thread 0x70e07d74eac0 (LWP 5759)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at pthread_kill.c:89
#3 0x000070e07de439d8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x000070e07de2647b in __GI_abort () at abort.c:79
#5 0x000070e07de2639f in __assert_fail_base (fmt=0x70e07dfbe620 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5f4c8427a80b "modifiers.size() > 0", file=file@entry=0x5f4c8427925c "../src/rendervulkan.cpp", line=line@entry=2144, function=function@entry=0x5f4c8427a6b8 "bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>)") at assert.c:94
#6 0x000070e07de39fb6 in __assert_fail (assertion=0x5f4c8427a80b "modifiers.size() > 0", file=0x5f4c8427925c "../src/rendervulkan.cpp", line=2144, function=0x5f4c8427a6b8 "bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>)") at assert.c:103
#7 0x00005f4c83fe9236 in CVulkanTexture::BInit (this=0x5f4cb5a2fbc0, width=1280, height=720, depth=1, drmFormat=808669784, flags=..., pDMA=0x0, contentWidth=0, contentHeight=0, pExistingImageToReuseMemory=0x0, pBackendFb=...) at ../src/rendervulkan.cpp:2144
#8 0x00005f4c83fed547 in vulkan_make_output_images (pOutput=0x5f4c84443a20 <g_output>) at ../src/rendervulkan.cpp:3227
#9 0x00005f4c83feddb9 in vulkan_make_output () at ../src/rendervulkan.cpp:3374
#10 0x00005f4c83fbb0e2 in main (argc=3, argv=0x7ffeaa85ab98) at ../src/main.cpp:891
If I switch to Plasma X11, then using gamescope -- vkcube works again on the Nvidia dGPU
Same issue here, can't use Gamescope on my Nvidia Optimus laptop.
Here's the output when trying to run gamescope -W 1920 -H 1080 vkcube:
gamescope -W 1920 -H 1080 vkcube:> [gamescope] [Info] console: gamescope version 3.15.9-23-gd3174928 (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 5)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 6)
[gamescope] [Info] scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info] scriptmgr: Loading scripts from: '/home/dani/.config/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/home/dani/.config/gamescope/scripts' does not exist
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 2070': queue family 2 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] xdg_backend: Seat name: seat0
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: AR24 (0x34325241)
[gamescope] [Info] vulkan: XR24 (0x34325258)
[gamescope] [Info] vulkan: AB24 (0x34324241)
[gamescope] [Info] vulkan: XB24 (0x34324258)
[gamescope] [Info] vulkan: RG16 (0x36314752)
[gamescope] [Info] vulkan: NV12 (0x3231564E)
[gamescope] [Info] vulkan: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
gamescope: ../src/rendervulkan.cpp:2139: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
Abortado (`core' generado)
My driver is nvidia-open-dkms-565.57.01-2
Same issue here. RTX 3060 Mobile with Intel i7 12700H. Has anyone bisected this issue in Mesa yet?
I am not aware of any bisects for this issue here or in the Mesa tracker
Facing the same issue with NVIDIA drivers 570.86.16 in an RTX 2070. Any news or fixes?
Do you have an iGPU? I detailed a bit about why it happens here: https://github.com/ValveSoftware/gamescope/issues/1469#issuecomment-2623261025 I'm not aware of any solutions other than a good MUX switch or just running Gamescope on your iGPU.
Do you have an iGPU? I detailed a bit about why it happens here: https://github.com/ValveSoftware/gamescope/issues/1469#issuecomment-2623261025 I'm not aware of any solutions other than a good MUX switch or just running Gamescope on your iGPU.
I don't use an iGPU, but the error is the same
then you probably have a different issue with a similar error, this specific bug report will only affect dual gpu setups.
same error driver: nvidia-open-dkms
+1
what does cat /proc/fb return
what does
cat /proc/fbreturn
return:
0 i915drmfb
if your iGPU owns the framebuffer (which it does in your case), then gamescope needs to use your iGPU for compositing as well. not doing so results in errors like gamescope: ../gamescope/src/rendervulkan.cpp:2144: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
I'd need @misyltoad's opinion here but I'm not sure the best way around the issue other than using --prefer-vk-device <gpu-pciid> with your iGPU's PCI ID as a gamescope launch option. You can find the PCI ID with lspci -nn | grep "VGA compatible controller" where it will be labeled with something like [1002:744c]. thats the address you put into your launch argument like gamescope --prefer-vk-device 1002:744c -- %command%
Same issue on Arch linux with nvidia-570.124.04-2 (hybrid)
nVidia GForce GTX 1650 (nvidia-drm.modeset=1 present) Intel Core i5 10300H
DE: KDE Plasma on Wayland
Tried different packages (gamescope from official repo, gamescope-plus aur and gamescope-nvidia aur) but it doesn't work
Logs (gamescope-nvidia but error same for any packages)
$ gamescope -- vkcube
[gamescope] [Info] console: gamescope version 3.16.1+ (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 5)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 6)
[gamescope] [Info] scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info] scriptmgr: Loading scripts from: '/home/beengoo/.config/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/home/beengoo/.config/gamescope/scripts' does not exist
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce GTX 1650': queue family 2
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] xdg_backend: Seat name: seat0
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: AR24 (0x34325241)
[gamescope] [Info] vulkan: XR24 (0x34325258)
[gamescope] [Info] vulkan: AB24 (0x34324241)
[gamescope] [Info] vulkan: XB24 (0x34324258)
[gamescope] [Info] vulkan: RG16 (0x36314752)
[gamescope] [Info] vulkan: NV12 (0x3231564E)
[gamescope] [Info] vulkan: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
gamescope: ../gamescope/src/rendervulkan.cpp:2099: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
[1] 43213 IOT instruction (core dumped) gamescope -- vkcube
Doesn't launch with hybrid graphics.
OS: EndeavourOS Linux x86_64
Kernel: 6.13.5-arch1-1
Resolution: 2560x1440
DE: Plasma 6.3.2
WM: kwin
CPU: AMD Ryzen 9 7950X (32)
GPU: AMD ATI 18:00.0 Raphael
GPU: NVIDIA GeForce RTX 3080 Ti
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 5)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 6)
[gamescope] [Info] scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info] scriptmgr: Loading scripts from: '/home/aemmie/.config/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/home/aemmie/.config/gamescope/scripts' does not exist
[2025-03-08 18:01:30.931] [MANGOHUD] [info] [blacklist.cpp:75] process 'gamescope' is blacklisted in MangoHud
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 3080 Ti': queue family 2 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] xdg_backend: Seat name: seat0
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[gamescope] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: AR24 (0x34325241)
[gamescope] [Info] vulkan: XR24 (0x34325258)
[gamescope] [Info] vulkan: AB24 (0x34324241)
[gamescope] [Info] vulkan: XB24 (0x34324258)
[gamescope] [Info] vulkan: RG16 (0x36314752)
[gamescope] [Info] vulkan: NV12 (0x3231564E)
[gamescope] [Info] vulkan: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: XB30 (0x30334258)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
[gamescope] [Info] wlserver: Using explicit sync when available
[gamescope] [Info] wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info] wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info] wlserver: Successfully initialized libei for input emulation!
[gamescope] [Info] wlserver: [xwayland/server.c:107] Starting Xwayland on :1
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86RefreshRateToggle
> Warning: Could not resolve keysym XF86Accessibility
> Warning: Could not resolve keysym XF86DoNotDisturb
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info] pipewire: stream state changed: connecting
[gamescope] [Info] pipewire: stream state changed: paused
[gamescope] [Info] pipewire: stream available on node ID: 91
[gamescope] [Info] xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info] vblank: Using timerfd.
(EE) failed to read Wayland events: Broken pipe
Aborted (core dumped)
what does
cat /proc/fbreturn
0 i915drmfb
1 nvidia-drmdrmfb
Update: See https://github.com/ValveSoftware/gamescope/issues/1590#issuecomment-2825722470 below
Before I distrohopped from Debian Testing to CachyOS, gamescope was working, and now, it's not. My brother running on EndeavourOS can also use gamescope (we have the same laptop model). Ever since I switched to CachyOS, it never worked.
But, I managed to run it inside distrobox. It was exhausting, but here are the steps.
- Create a distrobox container (I chose Debian Unstable, since it worked on my machine before)
distrobox create --image docker.io/library/debian:unstable --nvidia
distrobox enter debian-unstable
- Install Git and clone the repo
sudo apt install git
git clone https://github.com/ValveSoftware/gamescope.git
cd gamescope
- Install build dependencies
sudo apt install meson ninja-build build-essential cmake pkg-config hwdata hwdata libx11-dev libwayland-client0 wayland-utils wayland-protocols libwayland-dev vulkan-tools libvulkan-dev libxcb1-dev libxcb1 libx11-xcb-dev libxdamage-dev libxcomposite-dev libxcursor-dev libxxf86vm-dev libxtst-dev libxres-dev libxmu-dev libxkbcommon-dev libdrm-dev libpixman-1-dev libudev-dev libseat-dev libinput-dev xwayland libxcb-composite0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-res0-dev libpipewire-0.3-dev libglm-dev libeis-dev libsdl2-dev libstb-dev libavif-dev liblcms2-dev libxcb-errors-dev libdisplay-info-dev libdecor-0-dev libdecor-0-0 glslang-dev glslang-tools luajit libluajit-5.1-dev libliftoff-dev libbenchmark-dev libdrm-dev libxcb1-dev libx11-xcb-dev libgles2-mesa-dev libvulkan-dev libgbm-dev libegl1-mesa-dev libliftoff-dev
- Build and install (in distrobox)
git submodule update --init
meson setup build/
ninja -C build/
meson install -C build/ --skip-subprojects
- Create and mount a fake X11 directory
mkdir .X11-unix
sudo mount --bind $PWD/.X11-unix /tmp/.X11-unix
- Run gamescope
gamescope -W 1920 -H 1080 -- vkcube
Result:
Facing the same problem on my Laptop:
13th Gen Intel(R) Core(TM) i5-13420H
NVIDIA GeForce RTX 3050 6GB Laptop
Intel UHD Graphics
Drivers:
lib32-nvidia-utils 570.133.07-1
nvidia-dkms 570.133.07-1
nvidia-prime 1.0-5
nvidia-settings 570.133.07-1
nvidia-utils 570.133.07-1
Gamescope version:
gamescope 3.16.2-1
Replying to https://github.com/ValveSoftware/gamescope/issues/1590#issuecomment-2737274428
I was trying to run this and was having issues getting it to work outside of Distrobox with the same error of
gamescope: ../src/rendervulkan.cpp:2139: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
Does it only work within the Debian Unstable image or is there a way to run it outside of it without any issues?
EDIT: I was stupid and forgot to relaunch terminal.
From what I can tell from experiments on my laptop, gamescope will only run on the dedicated GPU if the desktop environment is also running exclusively on the dedicated GPU.
If you are in a hybrid environment and you want to run games on the dGPU but display them in gamescope, use gamescope -- prime-run %command% in the game's launch settings.
If you are in a hybrid environment and run Steam itself with prime-run, you will need to unset the PRIME offloading variable in your game launch options like so: env -u __NV_PRIME_RENDER_OFFLOAD -u DRI_PRIME gamescope -- prime-run %command% .
Update: It should compile for latest master now
I managed to fix this issue by making a patch that skips the dGPU when choosing a GPU. The game runs on the dGPU anyways. It's not a great solution, but it works.
- Clone the repo
git clone https://github.com/ValveSoftware/gamescope.git
cd gamescope
git submodule update --init
- Create and apply the patches
cat << EOF | tee gamescope_fix.patch > /dev/null
diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp
index 6f5141f..ca1ab9a 100644
--- a/src/rendervulkan.cpp
+++ b/src/rendervulkan.cpp
@@ -330,6 +330,7 @@ bool CVulkanDevice::selectPhysDev(VkSurfaceKHR surface)
{
VkPhysicalDeviceProperties deviceProperties;
vk.GetPhysicalDeviceProperties(cphysDev, &deviceProperties);
+ if (deviceProperties.vendorID == 0x10DE) continue;
if (deviceProperties.apiVersion < VK_API_VERSION_1_2)
continue;
EOF
git apply gamescope_fix.patch
- Build
meson setup build/
ninja -C build/
- Test it by running, and see if it crashes
build/src/gamescope -W 1920 -H 1080 --backend sdl -- vkcube
Confirm if it's running on the dGPU with nvidia-smi
- Install to system (Note: Package management should normally be done by the package manager, so this way of installing is bad practice)
sudo install -t /usr/bin --strip build/src/gamescope build/src/gamescopestream build/src/gamescopereaper build/src/gamescopectl
Result:
Can confirm the above fix worked for me in cachyos. Down to one line after recent commits, at 334 in rendervulkan.cpp
if (deviceProperties.vendorID == 0x10DE) continue;
[gamescope-brokey] [Info] vulkan: selecting physical device 'NVIDIA GeForce GTX 1060 with Max-Q Design': queue family 2 (general queue family 0)
[gamescope-brokey] [Info] vulkan: physical device supports DRM format modifiers
[gamescope-brokey] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope-brokey] [Info] xdg_backend: Seat name: seat0
[gamescope-brokey] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
[gamescope-brokey] [Error] vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
[gamescope-brokey] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope-brokey] [Info] vulkan: AR24 (0x34325241)
[gamescope-brokey] [Info] vulkan: XR24 (0x34325258)
[gamescope-brokey] [Info] vulkan: AB24 (0x34324241)
[gamescope-brokey] [Info] vulkan: XB24 (0x34324258)
[gamescope-brokey] [Info] vulkan: RG16 (0x36314752)
[gamescope-brokey] [Info] vulkan: NV12 (0x3231564E)
[gamescope-brokey] [Info] vulkan: AB4H (0x48344241)
[gamescope-brokey] [Info] vulkan: XB4H (0x48344258)
[gamescope-brokey] [Info] vulkan: AB30 (0x30334241)
[gamescope-brokey] [Info] vulkan: AR30 (0x30335241)
[gamescope-brokey] [Info] vulkan: XR30 (0x30335258)
gamescope-brokey: ../src/rendervulkan.cpp:2139: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc<gamescope::IBackendFb>): Assertion `modifiers.size() > 0' failed.
cat /proc/fb
cat: /proc/fb: No such file or directory
That's really strange — it has already selected the dGPU, yet it still fails. Nvidia Ver: 570.144
Apparently there was some fixes to this in driver version 575. Worth a try.
Apparently there was some fixes to this in driver version 575. Worth a try.
It's exactly the same error.