gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

gamescope hangs on startup with new wayland backend

Open diniamo opened this issue 3 months ago • 16 comments

I am currently trying to make the new wayland backend work, in hopes of it fixing my nvidia issues. But whatever flags I run gamescope with, it just hangs after printing a few lines:

xdg_backend: Seat name: seat0
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
vulkan: selecting physical device 'NVIDIA GeForce GTX 1660 Ti': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x38344258 (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan:   AR24 (0x34325241)
vulkan:   XR24 (0x34325258)
vulkan:   AB24 (0x34324241)
vulkan:   XB24 (0x34324258)
vulkan:   RG16 (0x36314752)
vulkan:   AB4H (0x48344241)
vulkan:   XB4H (0x48344258)
vulkan:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)

I am on NixOS, and this is the override I wrote:

pkgs.gamescope.overrideAttrs (_: oldAttrs: {
  src = pkgs.fetchFromGitHub {
    owner = "ValveSoftware";
    repo = "gamescope";
    rev = "ee0143a8792b03cd64e3f29b074b299c498d14af";
    fetchSubmodules = true;
    hash = "sha256-ZTlJeFf0EZfeHGoEGQSewxdhU2x5gP6MureY24kZuJk=";
  };

  buildInputs = oldAttrs.buildInputs ++ [pkgs.libdecor];
})

diniamo avatar Mar 11 '24 21:03 diniamo

Can you get a backtrace of the hang?

Joshua-Ashton avatar Mar 12 '24 22:03 Joshua-Ashton

gamescopetrace.txt

This is running ee0143a8792b03cd64e3f29b074b299c498d14af with no arguments

diniamo avatar Mar 13 '24 08:03 diniamo

The same happens on f9386a769765958b35d996d4e25f9238b757e7d0

diniamo avatar Mar 13 '24 09:03 diniamo

I did not mean an strace, I meant attach a debugger and give the output of "t a a bt".

Sorry for not being clear.

Joshua-Ashton avatar Mar 13 '24 11:03 Joshua-Ashton

I have never had to do a backtrace, so I don't really know what I'm doing either. Hopefully I got it right this time.

This is on f9386a769765958b35d996d4e25f9238b757e7d0: gamescopetrace.txt

diniamo avatar Mar 13 '24 12:03 diniamo

Looks like it hangs creating a flat debug texture. :/

Joshua-Ashton avatar Mar 13 '24 13:03 Joshua-Ashton

What does that mean?

diniamo avatar Mar 13 '24 14:03 diniamo

Probably an NV driver bug, unless we are doing something egregiously wrong that I am not seeing.

Joshua-Ashton avatar Mar 14 '24 05:03 Joshua-Ashton

Ahh yes, nvidia strikes again

diniamo avatar Mar 14 '24 09:03 diniamo

I was able to "workaround" the freeze by using ENABLE_GAMESCOPE_WSI=0 gamescope -w 2560 -h 1440 -f --adaptive-sync -- launch command

kodatarule avatar Mar 15 '24 10:03 kodatarule

But the freeze is in Gamescope, generating a blank texture, not a client using the WSI layer...

I think your freeze is different to what is being described by this user?

Joshua-Ashton avatar Mar 15 '24 10:03 Joshua-Ashton

Yeah, that variable doesn't change anything for me, but my goal is to use the wayland backend anyway. (Hopefully I'm not mistaken, and that's what it disables?)

Just to make sure, were there any new dependencies introduced since 3.14.2 besides libdecor?

diniamo avatar Mar 15 '24 11:03 diniamo

I don't think so

Joshua-Ashton avatar Mar 15 '24 12:03 Joshua-Ashton

Newer Wayland Protocols is the only other thing

Joshua-Ashton avatar Mar 15 '24 12:03 Joshua-Ashton

I suspect I have a similar problem with and AMD card. When I start a game from Steam that is supposed to use gamescope, the game quits during the startup process. The start from the terminal:

WINEDLLOVERRIDES="ddraw=n,b" gamescope -w 800 -h 600 -W 2560 -H 1440 --expose-wayland -- flatpak run com.valvesoftware.Steam steam://rungameid/2229880

gives the following (error) messages

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.
vulkan: selecting physical device 'AMD Radeon RX 7900 XTX (RADV NAVI31)': queue family 1 (general queue family 0)
vulkan: physical device supports DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
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)
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:17] Starting headless backend
wlserver: [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
wlserver: [xwayland/server.c:108] Starting Xwayland on :2
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x5efa0ce66880 (res 0x5efa0ce69fb0)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 75
vblank: Using timerfd.
INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/sven/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to Europe/Berlin
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[75]: Steam runtime environment up-to-date!
steam.sh[2]: Steam client's requirements are satisfied
tid(109) burning pthread_key_t == 0 so we never use it
gamescope: children shut down!
(EE) failed to read Wayland events: Broken pipe

Operating System: EndeavourOS KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.8.1-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 7950X3D 16-Core Processor Memory: 62,0 GiB of RAM Graphics Processor: AMD Radeon RX 7900 XTX Manufacturer: Gigabyte Technology Co., Ltd. Product Name: X670E AORUS MASTER System Version: -CF

Nobody-86 avatar Mar 20 '24 16:03 Nobody-86

Looks like this issue has magically fixed itself for me, or if not magically, then with the new nvidia driver (550.67).

Can close if no one else has this.

diniamo avatar Mar 23 '24 10:03 diniamo

I am using Manjaro Testing branch. Gamescope here also crashes when used. I am useing AMD GPU and here is my logs:

Performance will be affected.
Tracing is enabled
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'AMD Radeon Graphics (RADV RENOIR)': 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: 
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: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
wlserver: [xwayland/server.c:107] Starting Xwayland on :2
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x55a16627b5f0 (res 0x55a166096c40)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 102
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
xdg_backend: Failed to map keymap fd.
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: 100 nits, Min Luminance: 0 nits, Max Full Frame Luminance: 100 nits
josh edid: Patching res 800x1280 -> 1280x720
[34mProtonFixes[31279] INFO: Running protonfixes[0m
[34mProtonFixes[31279] INFO: Running checks[0m
[34mProtonFixes[31279] INFO: All checks successful[0m
[34mProtonFixes[31279] INFO: Non-steam game UNKNOWN (umu-default)[0m
[34mProtonFixes[31279] INFO: Using global defaults for UNKNOWN (umu-default)[0m
[34mProtonFixes[31279] INFO: Non-steam game UNKNOWN (umu-default)[0m
[34mProtonFixes[31279] INFO: Using protonfix for UNKNOWN (umu-default)[0m
Proton: [REDACTED]
Proton: Executable a unix path, launching with /unix option.
fsync: up and running.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
wine: setpriority 2 for pid -1 failed: 3
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x55a1663a37e0 (res 0x55a166097970)
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
xwm: Unhandled NET_WM_STATE property change: _KDE_NET_WM_STATE_SKIP_SWITCHER
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
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 Gamescope surface: xid: 0xe00059
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x55a1663a4010 (res 0x55a16609c0d0)
[Gamescope WSI] Made gamescope surface for xid: 0xe00059
[Gamescope WSI] Surface state:
  steam app id:                  0
  window xid:                    0xe00059
  wayland surface res id:        5
  layer client flags:            0x4
  server hdr output enabled:     false
  hdr formats exposed to client: false
[Gamescope WSI] Creating swapchain for xid: 0xe00059 - minImageCount: 4 - format: VK_FORMAT_A2B10G10R10_UNORM_PACK32 - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
[Gamescope WSI] Created swapchain for xid: 0xe00059 - imageCount: 4
[Gamescope WSI] Creating swapchain for xid: 0xe00059 - minImageCount: 4 - format: VK_FORMAT_A2B10G10R10_UNORM_PACK32 - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
[Gamescope WSI] Created swapchain for xid: 0xe00059 - imageCount: 4
xdg_backend: Changed refresh to: 59.963hz
wine: setpriority -10 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
wine: setpriority 3 for pid -1 failed: 3
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
gamescope: ../gamescope/src/wayland_backend.cpp:688: void gamescope::CWaylandFb::OnCompositorRelease(): Assertion `m_bCompositorAcquired' failed.
(EE) failed to read Wayland events: Broken pipe
[Gamescope WSI] getWindowRect: xcb_get_geometry failed for window 0xe00059.
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":2"
      after 265 requests (264 known processed) with 0 events remaining.
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
X connection to :2 broken (explicit kill or server shutdown).
Initial process has exited (return code: 134)

SergSel2006 avatar Apr 19 '24 04:04 SergSel2006

I'm seeing the same crash on AMD, running on Arch / hyprland. Same assertion fail:

gamescope: ../gamescope/src/wayland_backend.cpp:688: void gamescope::CWaylandFb::OnCompositorRelease(): Assertion `m_bCompositorAcquired' failed.

1player avatar Apr 19 '24 15:04 1player

Can confirm the same issue on Arch / sway-git (087226d99; wlroots cc10a5259). Gamescope is #f8c873e Full log of running gamescope -- vkcube

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.
vulkan: selecting physical device 'AMD Radeon RX 6800 XT (RADV NAVI21)': 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: [xwayland/server.c:107] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x625dadf0a320 (res 0x625dadd48510)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 255
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
josh edid: Patching res 800x1280 -> 1280x720
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: AMD Radeon RX 6800 XT (RADV NAVI21), type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x625dadf77680 (res 0x625dadd4c570)
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x625dadf76310 (res 0x625dadd4c690)
[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.
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 WSI] Created swapchain for xid: 0x400000 - imageCount: 3
pipewire: renegotiating stream params (size: 951x344)
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
gamescope: ../gamescope/src/wayland_backend.cpp:692: void gamescope::CWaylandFb::OnCompositorRelease(): Assertion `m_bCompositorAcquired' failed.
(EE) failed to read Wayland events: Broken pipe

witchymary avatar Apr 20 '24 02:04 witchymary

Tracked down my crash to https://github.com/ValveSoftware/gamescope/commit/aec2fd279be1edeb6249c7c31306861740cdc098. Reverting to https://github.com/ValveSoftware/gamescope/commit/26db73933aca7bec9fdc0342b3420c7fb0ed7b04 works fine.

https://github.com/ValveSoftware/gamescope/commit/26db73933aca7bec9fdc0342b3420c7fb0ed7b04

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.
vulkan: selecting physical device 'AMD Radeon RX 6800 XT (RADV NAVI21)': 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: [xwayland/server.c:107] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x61466c454610 (res 0x61466c453eb0)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 170
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
josh edid: Patching res 800x1280 -> 1280x720
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: AMD Radeon RX 6800 XT (RADV NAVI21), type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x61466c53e3b0 (res 0x61466c457e90)
wlserver: [Gamescope WSI] Made gamescope surface for xid: 0x400000
[types/wlr_compositor.c:771] New wlr_surface 0x61466c53d110 (res 0x61466c3baf50)[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.
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 WSI] Created swapchain for xid: 0x400000 - imageCount: 3
pipewire: renegotiating stream params (size: 951x344)
xdg_backend: Changed refresh to: 60.001hz
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
(EE) failed to read Wayland events: Broken pipe

https://github.com/ValveSoftware/gamescope/commit/aec2fd279be1edeb6249c7c31306861740cdc098 (slightly different log from the previous crash above, though)

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.
vulkan: selecting physical device 'AMD Radeon RX 6800 XT (RADV NAVI21)': 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: [xwayland/server.c:107] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x578c657527c0 (res 0x578c6574ca90)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 170
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
josh edid: Patching res 800x1280 -> 1280x720
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: AMD Radeon RX 6800 XT (RADV NAVI21), type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x578c655066d0 (res 0x578c6574ee90)
wlserver: [Gamescope WSI] Made gamescope surface for xid: 0x400000
[types/wlr_compositor.c:771] New wlr_surface 0x578c65507190 (res 0x578c6574eb90)[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.
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 WSI] Created swapchain for xid: 0x400000 - imageCount: 3
pipewire: renegotiating stream params (size: 951x344)
xdg_backend: Changed refresh to: 60.001hz
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
gamescope: ../gamescope/src/wayland_backend.cpp:687: void gamescope::CWaylandFb::OnCompositorRelease(): Assertion `m_bCompositorAcquired' failed.
(EE) failed to read Wayland events: Broken pipe
[Gamescope WSI] getWindowRect: xcb_get_geometry failed for window 0x400000.
[Gamescope WSI] getWindowRect: xcb_get_geometry failed for window 0x400000.
[Gamescope WSI] getLargestObscuringWindowSize: xcb_query_tree failed for window 0x400000.
[Gamescope WSI] getToplevelWindow: xcb_query_tree failed for window 0x400000.
[Gamescope WSI] canBypassXWayland: failed to get window info for window 0x400000.
[Gamescope WSI] Creating swapchain for xid: 0x400000 - minImageCount: 4 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: false
[Gamescope WSI] Refusing to make swapchain (unsupported VkFormat) for xid: 0x400000 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: false

witchymary avatar Apr 20 '24 03:04 witchymary

While not the as the original error, gamescope is now completely crashing with:

xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_HORZ
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.
Errors from xkbcomp are not fatal to the X server
gamescope: ../src/wayland_backend.cpp:688: void gamescope::CWaylandFb::OnCompositorRelease(): Assertion `m_bCompositorAcquired' failed.
[1]    383637 abort (core dumped)  gamescope --mangoapp --adaptive-sync -W 1920 -H 1080 -r 165 -f -e -- steam 
(EE) failed to read Wayland events: Connection reset by peer                                                         
X connection to :1 broken (explicit kill or server shutdown).
X connection to :1 broken (explicit kill or server shutdown).

This was introduced after 44c16c20c332f441ffd903adbc5380ee85d693e5, which still worked.

diniamo avatar Apr 20 '24 14:04 diniamo

@diniamo @witchymary Joshua Ashton seems to be aware of why this error is happening: https://github.com/ValveSoftware/gamescope/issues/1237#issuecomment-2052728041

Hopefully he'll be able to figure out a fix for it soon...

sharkautarch avatar Apr 20 '24 14:04 sharkautarch

@diniamo @witchymary Joshua Ashton seems to be aware of why this error is happening: #1237 (comment)

Hopefully he'll be able to figure out a fix for it soon...

Removing FSR is fixing the issue. Hoping for fix.

SergSel2006 avatar Apr 21 '24 15:04 SergSel2006

@diniamo @witchymary Joshua Ashton seems to be aware of why this error is happening: #1237 (comment) Hopefully he'll be able to figure out a fix for it soon...

Removing FSR is fixing the issue. Hoping for fix.

In the meantime, you could also try using -F pixel for scaling instead of fsr, since I believe that the pixel filter works in a single pass as opposed to fsr's two passes. So hopefully the pixel filter still works...

sharkautarch avatar Apr 21 '24 15:04 sharkautarch

I don't set fsr, and setting pixel explicitly still doesn't work.

diniamo avatar Apr 21 '24 19:04 diniamo

can confirm downgrading to 3.14.2 works at least, if you want to go that route for now

mary-ext avatar May 04 '24 16:05 mary-ext