ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.16k stars 213 forks source link

Bug: Wayland surface seemingly destroyed when resizing on sway and cosmic-comp #1132

Open Quackdoc opened 9 months ago

Quackdoc commented 9 months ago

When Resizing/moving gamescope, or moving workspaces. It will sometimes report wp_viewport@32: error 2: source rectangle extends outside of the content area and crash.

Not sure if this is a bug with gamescope, or a bug with sway/cosmic-comp but since both exhibit the issue I decided to also report here

Steps

  1. Run gamescope and test app, I used VK_ICD_FILENAMES to make sure it's running on the intel gpu because thankyou vulkan loader for being so sophisticated. VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json gamescope -- vkcube 2> logs/gamescope-cosmic.txt
  2. Resize gamescope until it crashes.

Logs

Full logs from sway WAYLAND_DEBUG=1 VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json gamescope -- vkcube 2> logs/gamescope-sway.txt

the bug occurred here at line 4052

gamescope-sway.txt Snippet of relevant section from log

[1922378.094] wl_display@1.delete_id(120)
[1922378.122] wl_display@1.delete_id(118)
[1922378.135] wp_presentation_feedback@118.sync_output(wl_output@27)
[1922378.151] wp_presentation_feedback@118.presented(0, 36697, 581556000, 16667500, 0, 2201417, 7)
[1922378.213] wl_display@1.error(wp_viewport@33, 2, "source rectangle out of buffer bounds")
wp_viewport@33: error 2: source rectangle out of buffer bounds
[1922379.364] wl_surface@5.attach(wl_buffer@19, 0, 0)
[1922379.394] wl_surface@5.damage(0, 0, 2147483647, 2147483647)
[1922379.410] wl_surface@5.frame(new id wl_callback@23)
[1922379.426] wl_surface@5.commit()
vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0
vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0
Truncated Log from cosmic-comp with command from steps ``` 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 'Intel(R) Arc(tm) A380 Graphics (DG2)': queue family 0 (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 58 and colorspace 0 wlserver: Running compositor on wayland display 'gamescope-0' wlserver: [backend/headless/backend.c:17] Starting headless backend wlserver: [xwayland/server.c:108] Starting Xwayland on :1 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 0x59cf0752eb10 (res 0x59cf07534eb0) wlserver: [xwayland/server.c:273] Xserver is ready pipewire: stream state changed: connecting pipewire: stream state changed: paused pipewire: stream available on node ID: 86 vblank: Using timerfd. vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1792x1008) ATTENTION: default value of option vk_khr_present_wait overridden by environment. Selected GPU 0: Intel(R) Arc(tm) A380 Graphics (DG2), 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:692] New wlr_surface 0x59cf0750a040 (res 0x59cf0753a5f0) wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x59cf0750a870 (res 0x59cf0753a710) [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 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 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 [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 vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1912x980) [Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 3833x2034) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1912x980) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 3833x2034) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1912x980) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 3833x2034) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1912x980) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 3833x2034) vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 pipewire: renegotiating stream params (size: 1912x980) wp_viewport@32: error 2: source rectangle extends outside of the content area < CRASH HERE vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0 < THESE JUST REPEAT ... ```
Quackdoc commented 9 months ago

I noticed that on sway and cosmic, resizing the window is kind of slow and laggy, this is not the case on KDE. I also tried to run gamescope within a nested weston instance, and it immediately starts the gamescope process, but creates no window and has the same issue of repeating vulkan: Creating Gamescope nested swapchain with format 58 and colorspace 0

pdf commented 8 months ago

Same thing happens on Hyprland.