ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.97k stars 198 forks source link

Using gamescope causes game camera to stop being controllable with the mouse #1428

Open Sol33t303 opened 1 month ago

Sol33t303 commented 1 month ago

I have recorded two videos to demonstrate the issue, one is the game running under proton, without gamescope, one is running the game under proton with gamescope. The game is Kerbal Space Program.

Here is a video of what happens (or rather, does not happen) with gamescope.

https://github.com/user-attachments/assets/8339a5ca-10b3-4d4a-97bf-53a02d4bf3c2

and what happens when I run without gamescope.

https://github.com/user-attachments/assets/5ae2ed64-156d-42a8-b98d-ac0697d4cd40

Here is the output of gamescope (I'm using the following options: -w 3440 -W 3440 -h 1440 -H 1440 -b)

console: gamescope version 3.14.22 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 7800 XT (RADV NAVI32)': 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: Successfully initialized libei for input emulation! 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 0x57d73daefc90 (res 0x57d73daf04d0) wlserver: [xwayland/server.c:272] Xserver is ready pipewire: stream state changed: connecting pipewire: stream state changed: paused pipewire: stream available on node ID: 166 xwm: Embedded, no cursor set. Using left_ptr by default. vblank: Using timerfd. 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 nits, Max Full Frame Luminance: 200 nits josh edid: Patching res 800x1280 -> 3440x1440 wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x57d73d90d7d0 (res 0x57d73daeb780) 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 pipewire: renegotiating stream params (size: 4300x1800) 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 wlserver: [types/wlr_pointer_constraints_v1.c:278] new locked_pointer 0x57d73d90e540 (res 0x57d73dc49a20) wlserver: [types/wlr_pointer_constraints_v1.c:378] constrained 0x57d73d90e540 wlserver: [types/wlr_pointer_constraints_v1.c:46] destroying constraint 0x57d73d90e540 xdg_backend: Changed refresh to: 144.000hz pipewire: renegotiating stream params (size: 3440x1440) 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: 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 ^Cxwm: X11 I/O error gamescope: Received Interrupt signal, attempting shutdown! wlserver: [xwayland/server.c:217] Restarting Xwayland wlserver: [xwayland/server.c:107] Starting Xwayland on :2 (EE) could not connect to wayland server

This log was taken on Arch, Wayland. I can confirm the issue persists across Sway and KDE so does not appear to be compositor-specific. The machine has an RX 7800 XT GPU, and a Ryzen 2700x. As a shot in the dark I tried it also with "--force-grab-cursor" but that appears to just crash my game entirely for some odd reason.

Kernel is 6.9.10-zen. The problem also persists whether I use the games windows build (DX11, so comes out as vulkan) or the native build (opengl). Let me know if anyone would like any more info or have ideas to try.

EDIT: Thought I should add, other input seems to work fine, controllers work fine, keyboard input works fine, and even mouse input works fine if I'm only clicking through game menus.

EDIT 2: Hmm browsers seem to be having problems with the videos, sorry they are HEVC encoded, heres the videos reencoded with H264, Video 1 then Video 2 respectively:

https://github.com/user-attachments/assets/1bacb149-25f6-4f4d-9860-03e4b6a9692d

https://github.com/user-attachments/assets/833007a0-0878-45f7-afce-4a1e1f329894

sharkautarch commented 1 month ago

@Sol33t303 First try installing gamescope-git from the AUR and see if that changes anything

As a shot in the dark I tried it also with "--force-grab-cursor" but that appears to just crash my game entirely for some odd reason.

Also check if that happens w/ gamescope-git as well Otherwise, I wonder if this could be related to https://github.com/ValveSoftware/gamescope/issues/1364

I was able to confirm that switching gamescope to using the latest wlroots fixed the above-mentioned issue: https://github.com/ValveSoftware/gamescope/pull/1394 Not sure if that also may be the case for the crashing when using --force-grab-cursor