Open CyberShadow opened 1 year ago
Hey, I am having the same issue unfortunately. Here are my specs and logs:
Dell XPS 15 (9520) CPU: 12th Gen Intel(R) Core(TM) i7-12700H iGPU: Intel Alder Lake-P Integrated Graphics Controller dGPU: Nvidia GA107M [GeForce RTX 3050 Ti Mobile]
I tried building gamescope from git and gamescope-plus from AUR, both result in the same issue. I also tried running Xorg instead of wayland, even with a dedicated X session for gamescope but no luck.
Running Arch Linux with SDDM, Wayland, KDE Plasma
Same issue, neither Lutris nor Bottles able to start RiotClient
Surface Book 2 (15") [ i7-8650u, 16GB, Nvidia GTX1060] OS: Fedora 37 Workstation (6.1.6-1.surface.fc37.x86_64) DE: KDE plasma 5.26.5 (Wayland) Nvidia Driver: 525.85.05 Lutris: lutris-0.5.12 (Fedora repo) Bottles: 50.2 (Flatpak) Runner: lutris-ge-lol-7.0.5
Bottles error log:
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (0x55b8f73f5000+0x184042) [0x55b8f7579042]
(EE) 1: /usr/lib/x86_64-linux-gnu/GL/nvidia-525-85-05/lib/libnvidia-eglcore.so.525.85.05 (0x7f05b9800000+0x1107037) [0x7f05ba907037]
(EE) 2: /usr/lib/x86_64-linux-gnu/GL/nvidia-525-85-05/lib/libnvidia-eglcore.so.525.85.05 (0x7f05b9800000+0x11071b3) [0x7f05ba9071b3]
(EE) 3: /usr/lib/x86_64-linux-gnu/GL/nvidia-525-85-05/lib/libnvidia-eglcore.so.525.85.05 (0x7f05b9800000+0x110739a) [0x7f05ba90739a]
(EE) 4: /usr/lib/x86_64-linux-gnu/GL/nvidia-525-85-05/lib/libnvidia-eglcore.so.525.85.05 (0x7f05b9800000+0x11ede0a) [0x7f05ba9ede0a]
(EE) 5: Xwayland (0x55b8f73f5000+0x46e41) [0x55b8f743be41]
(EE) 6: Xwayland (0x55b8f73f5000+0x4793d) [0x55b8f743c93d]
(EE) 7: Xwayland (0x55b8f73f5000+0xa872e) [0x55b8f749d72e]
(EE) 8: Xwayland (0x55b8f73f5000+0xad894) [0x55b8f74a2894]
(EE) 9: Xwayland (0x55b8f73f5000+0xb1ac2) [0x55b8f74a6ac2]
(EE) 10: /usr/lib/x86_64-linux-gnu/libc.so.6 (0x7f05c0000000+0x2954a) [0x7f05c002954a]
(EE) 11: /usr/lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x8b) [0x7f05c002960b]
(EE) 12: Xwayland (0x55b8f73f5000+0x373c5) [0x55b8f742c3c5]
(EE)
XXX fail to create fbo.
I ran bottles with environment variables
flatpak run --env=GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-525-85-05/extra/gbm com.usebottles.bottles
After much tinkering I'm stuck with the same error. It fails to create a frame, but I can definitely hear audio (i.e. steam startup sound).
Here's my output, the error message repeats over and over.
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce GTX 1050': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan: 0x34325241
vulkan: 0x34325258
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0xbdcde7c5930 (res 0xbdcde7bd6a0)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 32
pipewire: renegotiating stream params (size: 1280x720)
steam.sh[26283]: Running Steam on arch rolling 64-bit
steam.sh[26283]: STEAM_RUNTIME is enabled automatically
setup.sh[26359]: Steam runtime environment up-to-date!
steam.sh[26283]: Steam client's requirements are satisfied
[2023-01-27 16:40:33] Startup - updater built Dec 15 2022 21:26:49
[2023-01-27 16:40:33] Startup - Steam Client launched with: '/home/jonet/.local/share/Steam/ubuntu12_32/steam' '-gamepadui'
/tmp/dumps insufficient permissions - delete and recreate
Installing breakpad exception handler for appid(steam)/version(1671236931)
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (0x210a57b3000+0x1641e3) [0x210a59171e3]
(EE) 1: /usr/lib/libnvidia-eglcore.so.525.85.05 (0x61b7a7600000+0x1107037) [0x61b7a8707037]
(EE) 2: /usr/lib/libnvidia-eglcore.so.525.85.05 (0x61b7a7600000+0x11071b3) [0x61b7a87071b3]
(EE) 3: /usr/lib/libnvidia-eglcore.so.525.85.05 (0x61b7a7600000+0x110739a) [0x61b7a870739a]
(EE) 4: /usr/lib/libnvidia-eglcore.so.525.85.05 (0x61b7a7600000+0x11ede0a) [0x61b7a87ede0a]
(EE) 5: Xwayland (0x210a57b3000+0x464e3) [0x210a57f94e3]
(EE) 6: Xwayland (0x210a57b3000+0x472ac) [0x210a57fa2ac]
(EE) 7: Xwayland (0x210a57b3000+0x16d6f0) [0x210a59206f0]
(EE) 8: Xwayland (0x210a57b3000+0x16f3ee) [0x210a59223ee]
(EE) 9: Xwayland (0x210a57b3000+0xa39e8) [0x210a58569e8]
(EE) 10: Xwayland (0x210a57b3000+0x3020e) [0x210a57e320e]
(EE) 11: /usr/lib/libc.so.6 (0x61b7add92000+0x23290) [0x61b7addb5290]
(EE) 12: /usr/lib/libc.so.6 (__libc_start_main+0x8a) [0x61b7addb534a]
(EE) 13: Xwayland (0x210a57b3000+0x31aa5) [0x210a57e4aa5]
(EE)
XXX fail to create fbo.
Gamescope is started with DRI_PRIME=1 MESA_VK_DEVICE_SELECT=8086:1901 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_ONLY __GLX_VENDOR_LIBRARY_NAME=nvidia gamescope -f -w 1920 -h 1080 -r 60 -e --steam -gamepadui
I've also tried to disable GLAMOR by doing appending XWAYLAND_NO_GLAMOR=1
which of course removes the error, but instead my steam client doesn't even make a sound. I can see it load in the system tray, but subsequently i have terminate the process (-9) to be able to close it.
Output from XWAYLAND_NO_GLAMOR=1:
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce GTX 1050': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan: 0x34325241
vulkan: 0x34325258
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
Disabling glamor and dri3 support, XWAYLAND_NO_GLAMOR is set
Failed to initialize glamor, falling back to sw
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x5bb2f8e2ff0 (res 0x5bb2f8dad60)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 32
pipewire: renegotiating stream params (size: 1280x720)
steam.sh[226421]: Running Steam on arch rolling 64-bit
steam.sh[226421]: STEAM_RUNTIME is enabled automatically
setup.sh[226497]: Steam runtime environment up-to-date!
steam.sh[226421]: Steam client's requirements are satisfied
[2023-01-28 11:04:49] Startup - updater built Dec 15 2022 21:26:49
[2023-01-28 11:04:49] Startup - updater built Dec 15 2022 21:26:49
[2023-01-28 11:04:49] Startup - Steam Client launched with: '/home/x/.local/share/Steam/ubuntu12_32/steam' '-gamepadui'
/tmp/dumps insufficient permissions - delete and recreate
Installing breakpad exception handler for appid(steam)/version(1674790765)
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2023-01-28 11:04:49] Loading cached metrics from disk (/home/x/.local/share/Steam/package/steam_client_metrics.bin)
[2023-01-28 11:04:49] Using the following download hosts for Public, Realm steamglobal
[2023-01-28 11:04:49] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2023-01-28 11:04:49] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2023-01-28 11:04:49] 3. http://media.steampowered.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
Installing breakpad exception handler for appid(steam)/version(1674790765)
[2023-01-28 11:04:49] Checking for update on startup
[2023-01-28 11:04:49] Checking for available updates...
[2023-01-28 11:04:49] Downloading manifest: https://client-update.akamai.steamstatic.com/steam_client_ubuntu12
[2023-01-28 11:04:49] Manifest download: send request
Installing breakpad exception handler for appid(steam)/version(1674790765)
[2023-01-28 11:04:50] Manifest download: waiting for download to finish
[2023-01-28 11:04:50] Manifest download: finished
[2023-01-28 11:04:50] Download skipped: /steam_client_ubuntu12 version 1674790765, installed version 1674790765, existing pending version 0
[2023-01-28 11:04:50] Nothing to do
[2023-01-28 11:04:50] Verifying installation...
[2023-01-28 11:04:50] Performing checksum verification of executable files
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x5bb2f8b1ce0 (res 0x5bb2f8df020)
[2023-01-28 11:04:52] Verification complete
Loaded SDL version 2.27.0-p7692409
XRRGetOutputInfo Workaround: initialized with override: 1 real: 0xea0f5db0
XRRGetCrtcInfo Workaround: initialized with override: 1 real: 0xea0f4500
ComputeStartupMode: forcing gamepadui via clisteamwebhelper.sh[226919]: Runtime for steamwebhelper: defaulting to /home/x/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[226919]: kernel.unprivileged_userns_clone=0, disabling sandbox
Installing breakpad exception handler for appid(steam)/version(1674790765)
steamwebhelper.sh[226919]: CEF sandbox already disabled
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
CAppInfoCacheReadFromDiskThread took 155 milliseconds to initialize
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Xlib: sequence lost (0x10000 > 0x5a) in reply type 0xc!
(steam:226650): Gtk-WARNING **: 11:04:54.397: gtk_disable_setlocale() must be called before gtk_init()
Installing breakpad exception handler for appid(steam)/version(1674790765)
local (potentially out of sync) copy of roaming config loaded - 43985 bytes.
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
roaming config store loaded successfully - 43985 bytes.
migrating temporary roaming config store
BRefreshApplicationsInLibrary 1: 3ms
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Failed to init SteamVR because it isn't installed
CDesktopCapturePipeWire: Opening DRM render node /dev/dri/renderD128
CDesktopCapturePipeWire: setting stream node ID: 32
ExecCommandLine: "'/home/x/.local/share/Steam/ubuntu12_32/steam' '-gamepadui'"
System startup time: 17.17 seconds
Xlib: sequence lost (0x10000 > 0x6a1) in reply type 0xc!
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
Installing breakpad exception handler for appid(steam)/version(1674790765)
^Cgamescope: received kill signal, terminating!
Fatal IO error 11 (Resource temporarily unavailable) on X server :1.
^Cgamescope: received kill signal, terminating!
Here's a bit more detail to the issue, recompiled Xwayland with libunwind and added debugging to GLAMOR.
vulkan: selecting physical device 'NVIDIA GeForce GTX 1050': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
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:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
Sync Extension 3.1
VidModeAddExtension
glamor_poly_fill_rect_bail: to 0xc6c6e53a940 (m)
[dix] Could not init font path element /usr/share/fonts/misc, removing from list!
[dix] Could not init font path element /usr/share/fonts/TTF, removing from list!
[dix] Could not init font path element /usr/share/fonts/OTF, removing from list!
[dix] Could not init font path element /usr/share/fonts/Type1, removing from list!
[dix] Could not init font path element /usr/share/fonts/100dpi, removing from list!
[dix] Could not init font path element /usr/share/fonts/75dpi, removing from list!
glamor_poly_fill_rect_bail: to 0xc6c6e5db5c0 (m)
glamor_poly_fill_rect_bail: to 0xc6c6e5430b0 (m)
Popen: `"/usr/bin/xkbcomp" -w 1 "-R/usr/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/tmp/server-1.xkm"', fp = 0xc6c6e5de710
Pclose: fp = 0xc6c6e5de710
Loaded XKB keymap /tmp/server-1.xkm, defined=0x7f
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x94a5ebda890 (res 0x94a5ebdfd70)
client(0): Reserved pid(651221).
client(0): Reserved cmdname(Xwayland) and cmdargs(:1 -rootless -core -terminate -listenfd 50 -listenfd 51 -displayfd 55 -noTouchPointerEmulation).
wlserver: [xwayland/server.c:273] Xserver is ready
client(200000): Reserved pid(651212).
client(200000): Reserved cmdname(gamescope) and cmdargs(--xwayland-count 1 --disable-layers --prefer-vk-device 10de:1c8d-f -w 1920 -h 1080 -r 60 -O DP-1 --generate-drm-mode fixed -e -- vkcube).
AllocNewConnection: client index = 1, socket fd = 6
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 32
XF86VidModeLockModeSwitch
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 0: /usr/lib/libnvidia-eglcore.so.525.85.05 (?+0x0) [0x620962b07037]
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 1: /usr/lib/libnvidia-eglcore.so.525.85.05 (?+0x0) [0x620962b071b3]
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 2: /usr/lib/libnvidia-eglcore.so.525.85.05 (?+0x0) [0x620962b0739a]
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 3: /usr/lib/libnvidia-eglcore.so.525.85.05 (?+0x0) [0x620962bede0a]
(EE) 4: Xwayland (xwl_glamor_gbm_create_pixmap_for_bo+0x1d3) [0xc6c5a672613]
(EE) 5: Xwayland (xwl_glamor_gbm_create_pixmap+0x152) [0xc6c5a672a62]
(EE) 6: Xwayland (ProcCreatePixmap+0x12e) [0xc6c5a6c75ee]
(EE) 7: Xwayland (Dispatch+0xce8) [0xc6c5a6cfcc8]
(EE) 8: Xwayland (main+0x182e) [0xc6c5a65c23e]
(EE) 9: /usr/lib/libc.so.6 (__libc_init_first+0x90) [0x620968161290]
(EE) 10: /usr/lib/libc.so.6 (__libc_start_main+0x8a) [0x62096816134a]
(EE) 11: Xwayland (_start+0x25) [0xc6c5a65da85]
(EE)
glamor_pixmap_ensure_fb: glamor: Failed to create fbo, incomplete attachment
XXX fail to create fbo.
The call triggering the backtrace is glEGLImageTargetTexture2DOES
within the function xwl_glamor_gbm_create_pixmap_for_bo
in xwayland-glamor-gbm.c
That's as far as I go with my very limited (read zero) experience with dmabuf stuff.
Seems like a bug on libnvidia-eglcore.so Should report to Nvidia people.
It sounds plausible. The only other reference I find to a similar error is from a developer of nvidia-vaapi-driver posting about a similar vague issue here, which really only clarifies that there are in fact unspecified limitations in the nvidia implementation.
Are there any other flags I would be able to use in order to get some more info out of this that I could include in the bugreport?
Invalid operation is very vague and only tells me that the GL was unable to specify a texture object based of the
I won't be able to investigate more on this for a few days, but one thing I would like to test next is to downgrade to 525.53 to see if 525.60.11 introduced a regression when they "Improved the performance of PRIME render-offloaded applications".
I've run into this issue with Gnome/Mutter as well so it is not specific to gamescope. It is however much easier to test gamescope in isolation.
Here is a gdb backtrace of the error with full debug symbols on Xwayland
:
#0 xorg_backtrace () at ../os/backtrace.c:190
#1 0x0000000000427e5a in glamor_debug_output_callback (source=33350, type=33356, id=<optimized out>, severity=<optimized out>, length=75,
message=0x7fbf66242460 "GL_INVALID_OPERATION error generated. <image> and <target> are incompatible", userParam=0x21b5b80) at ../glamor/glamor.c:417
#2 0x00007fbf64b07037 in ?? () from /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05
#3 0x00007fbf64b071b3 in ?? () from /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05
#4 0x00007fbf64b0739a in ?? () from /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05
#5 0x00007fbf64bede0a in ?? () from /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05
#6 0x00000000004213ef in xwl_glamor_gbm_create_pixmap_for_bo (screen=screen@entry=0x21b5b80, bo=bo@entry=0x27defa0, depth=depth@entry=24)
at ../hw/xwayland/xwayland-glamor-gbm.c:249
#7 0x00000000004225e2 in glamor_pixmap_from_fds (screen=0x21b5b80, num_fds=1 '\001', fds=0x7ffce22f30c0, width=<optimized out>, height=<optimized out>, strides=0x7ffce22f30d0,
offsets=0x7ffce22f30e0, depth=24 '\030', bpp=32 ' ', modifier=0) at ../hw/xwayland/xwayland-glamor-gbm.c:594
#8 0x0000000000580b8b in dri3_pixmap_from_fds (ppixmap=ppixmap@entry=0x7ffce22f30b8, screen=screen@entry=0x21b5b80, num_fds=<optimized out>, fds=fds@entry=0x7ffce22f30c0,
width=<optimized out>, height=<optimized out>, strides=0x7ffce22f30d0, offsets=0x7ffce22f30e0, depth=24 '\030', bpp=32 ' ', modifier=0) at ../dri3/dri3_screen.c:63
#9 0x000000000057f485 in proc_dri3_pixmap_from_buffers (client=0x262ca90) at ../dri3/dri3_request.c:465
#10 0x0000000000580741 in proc_dri3_dispatch (client=<optimized out>) at ../dri3/dri3_request.c:577
#11 0x000000000048713b in Dispatch () at ../dix/dispatch.c:551
#12 0x000000000048ab75 in dix_main (argc=10, argv=0x7ffce22f32b8, envp=<optimized out>) at ../dix/main.c:271
#13 0x0000000000427808 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../dix/stubmain.c:34
The actual offsets in libnvidia-eglcore
are the exact same as @Ramen-LadyHKG:
(EE) 2: /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05 (0x7fbf63a00000+0x1107037) [0x7fbf64b07037]
(EE) 3: /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05 (0x7fbf63a00000+0x11071b3) [0x7fbf64b071b3]
(EE) 4: /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05 (0x7fbf63a00000+0x110739a) [0x7fbf64b0739a]
(EE) 5: /nix/store/z0sdkg18hxp4m7c4j2kp6w938nnrfjwv-nvidia-x11-525.85.05-6.1.10/lib/libnvidia-eglcore.so.525.85.05 (0x7fbf63a00000+0x11ede0a) [0x7fbf64bede0a]
I suspect this problem is being caused by a mismatch of gbm backend between Xwayland and the application itself. My particular testcase involves wine and dxvk/vkd3d, which allowed me to narrow down the issue:
i915.modeset=0
kernel parameter) results in everything working as intended. This leads me to suspect the following problem is happening:
glEGLImageTargetTexture2DOES
.I believe it might be possible to work around this issue by restricting the vulkan icd's that are available to the application running under Xwayland, but I've not yet tested this.
EDIT: can confirm that when this problem is triggered by using vulkan, using VK_ICD_FILESNAMES
to allow only the nvidia drivers fixes the issue.
@Kiskae could you elaborate a bit on which commands you ran in order to get it working? I did try with VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json prime-run gamescope -- steam which got me the exact same results as before, i.e. no change.
Actually I did just now get it running with your recommendations, I forgot to set my intel chip with prefer-vk-device. So basically this;
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json prime-run gamescope --prefer-vk-device 8086:591b -f -w 1920 -h 1080 -r 120 -e -- steam
got it up and running. But there's to much artifacts for it to be useable, mainly pink pixels all over the place.
After some more digging I believe I've found the root cause of this issue:
525
nvidia added support for the vendor-neutral DRM_FORMAT_MOD_LINEAR
format modifier^1, but it is marked as external_only
^2 meaning it can only be loaded into GL_TEXTURE_EXTERNAL_OES
^3.external_only
DRM_FORMAT_MOD_LINEAR
.Xwayland
to finish initialization of the output buffers.GL_TEXTURE_2D
^4 which is incompatible with external_only
buffer formats, leading to the error we're seeing.In my case a vulkan loader bug caused it to initialize the wrong driver,[^5] but it is reasonable to assume any case where the application running under Xwayland tries to use a different GPU (which supported DRM_FORMAT_MOD_LINEAR
) will run into this issue.
As for fixing it Xwayland needs to either filter out any modifiers marked as external_only
or add support for GL_TEXTURE_EXTERNAL_OES
which appears to be quite an extensive change
[^5]: To determine if this is the cause set VK_LOADER_DEBUG=driver
and run the application. It should first print vkDeviceCreate
using the nvidia
driver (this is gamescope
creating the window), then print vkDeviceCreate
with a different driver when the application initializes vulkan.
Using nvidia 525.89.02, Xwayland 22.1.8 and gamescope ecee87 this case is not reproducible at all for me. I just tried without the ICD loader parameter as well, so prime-run gamescope --prefer-vk-device 8086:591b -- steam
now works. There are however too much artifacts in the output for it to be useful.
Using nvidia 525.89.02, Xwayland 22.1.8 and gamescope ecee87 this case is not reproducible at all for me. I just tried without the ICD loader parameter as well, so
prime-run gamescope --prefer-vk-device 8086:591b -- steam
now works. There are however too much artifacts in the output for it to be useful.
I believe you might be rendering through the Intel driver by specifying it as the preferred device. If the Nvidia driver isn't the one being used by Xwayland then this bug does not get triggered
opened an issue for Xwayland
: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1444
For those seeking a temporary solution, the kernel parameter i915.modeset=0
will disable modesetting for the intel driver. This will make it so applications simply can't create the buffers that cause this issue.
I'm having the same issue
[gamescope] [Info] console: gamescope version 3.14.29
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 4060 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:
[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] [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: 98
[gamescope] [Info] xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info] vblank: Using timerfd.
[gamescope] [Info] xdg_backend: PreferredMetadata: Red: 0.58984 0.3496, Green: 0.33008 0.55468, Blue: 0.15332 0.11914, White: 0.31348 0.3291, Max Luminance: 200 nits, Min Luminance: 0 nits, Max Full Frame Luminance: 200 nits
[gamescope] [Info] edid: Patching res 800x1280 -> 1280x720
Error getting buffer
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (0x620ada751000+0x165943) [0x620ada8b6943]
(EE) 1: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x72edd5) [0x704133f2edd5]
(EE) 2: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x236c7a) [0x704133a36c7a]
(EE) 3: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x249806) [0x704133a49806]
(EE) 4: Xwayland (0x620ada751000+0x38c55) [0x620ada789c55]
(EE) 5: Xwayland (0x620ada751000+0x3bf27) [0x620ada78cf27]
(EE) 6: Xwayland (0x620ada751000+0x163c1e) [0x620ada8b4c1e]
(EE) 7: Xwayland (0x620ada751000+0x167b66) [0x620ada8b8b66]
(EE) 8: Xwayland (0x620ada751000+0x9b268) [0x620ada7ec268]
(EE) 9: Xwayland (0x620ada751000+0x1974b) [0x620ada76a74b]
(EE) 10: /usr/lib/libc.so.6 (0x7041368c6000+0x25e08) [0x7041368ebe08]
(EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0x8c) [0x7041368ebecc]
(EE) 12: Xwayland (0x620ada751000+0x1b315) [0x620ada76c315]
(EE)
XXX fail to create fbo.
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (0x620ada751000+0x165943) [0x620ada8b6943]
(EE) 1: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x72edd5) [0x704133f2edd5]
(EE) 2: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x236c7a) [0x704133a36c7a]
(EE) 3: /usr/lib/libnvidia-eglcore.so.555.58.02 (0x704133800000+0x249806) [0x704133a49806]
(EE) 4: Xwayland (0x620ada751000+0x38c55) [0x620ada789c55]
(EE) 5: Xwayland (0x620ada751000+0x3bf27) [0x620ada78cf27]
(EE) 6: Xwayland (0x620ada751000+0x163c1e) [0x620ada8b4c1e]
(EE) 7: Xwayland (0x620ada751000+0x167b66) [0x620ada8b8b66]
(EE) 8: Xwayland (0x620ada751000+0x9b268) [0x620ada7ec268]
(EE) 9: Xwayland (0x620ada751000+0x1974b) [0x620ada76a74b]
(EE) 10: /usr/lib/libc.so.6 (0x7041368c6000+0x25e08) [0x7041368ebe08]
(EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0x8c) [0x7041368ebecc]
(EE) 12: Xwayland (0x620ada751000+0x1b315) [0x620ada76c315]
(EE)
XXX fail to create fbo.
[gamescope] [Error] xwm: X11 I/O error
[gamescopereaper] [Info] reaper: Parent of gamescopereaper was killed. Killing children.
[gamescope] [Info] launch: Primary child shut down!
This is on a Lenovo T580 with an NVIDIA MX150 (
10de:1d10
) running Linux 6.0 / nvidia 525.60.11 / Xorg 21.1.4 / mesa 22.2.3. Trying to start anything does not create any windows and prints errors to the terminal.Output when running
```console $ gamescope -- glxgears No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. wlserver: [backend/headless/backend.c:82] Creating headless backend vulkan: selecting physical device 'NVIDIA GeForce MX150': queue family 2 vulkan: physical device supports DRM format modifiers vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0) vulkan: supported DRM formats for sampling usage: vulkan: 0x34325241 vulkan: 0x34325258 wlserver: Running compositor on wayland display 'gamescope-0' wlserver: [backend/headless/backend.c:18] Starting headless backend wlserver: [xwayland/server.c:92] Starting Xwayland on :1 wlserver: [types/wlr_surface.c:748] New wlr_surface 0x55657d345510 (res 0x55657d346f50) wlserver: [xwayland/server.c:250] Xserver is ready pipewire: stream state changed: connecting pipewire: stream state changed: paused pipewire: stream available on node ID: 79 pipewire: renegotiating stream params (size: 1280x720) (EE) glamor0: GL error: GL_INVALID_OPERATION error generated.glxgears
``` Section "Files" ModulePath "/usr/lib/nvidia" ModulePath "/usr/lib32/nvidia" ModulePath "/usr/lib32/nvidia/xorg/modules" ModulePath "/usr/lib32/xorg/modules" ModulePath "/usr/lib64/nvidia/xorg/modules" ModulePath "/usr/lib64/nvidia/xorg" ModulePath "/usr/lib64/xorg/modules" EndSection Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "intel" EndSection Section "Device" Identifier "nvidia" Driver "nvidia" BusID "PCI:2:0:0" EndSection Section "Screen" Identifier "nvidia" Device "nvidia" # Option "AllowEmptyInitialConfiguration" "Yes" # Option "UseDisplayDevice" "none" EndSection Section "Device" Identifier "intel" Driver "modesetting" Option "AccelMethod" "none" EndSection Section "Screen" Identifier "intel" Device "intel" EndSection ```xorg.conf
Kernel parameters
```console $ cat /proc/cmdline root=/dev/mapper/laptop2019-lvol0 rw rootflags=subvol=@arch log_buf_len=1M consoleblank=120 cryptdevice=UUID=a21df6f8-f44a-40f7-80ab-680f796cec9a:cryptroot:allow-discards nvidia-drm.modeset=1 initrd=/intel-ucode.img initrd=/initramfs-linux.img ```The workaround from #498 (running
DRI_PRIME=1 MESA_VK_DEVICE_SELECT=10de:1d10 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia gamescope -- glxgears
) produces the same effect.