Gamescope freezes/doesnt launch
I have been observing very unusual behavior with gamescope on arch with nvidia. Using plasma 6 wayland or hyprland causes gamescope 3.13.9 to segfault instead of launching. Using 3.14 causes it to freeze/1fps intermittently. However none of these issues appear on plasma 5 Wayland. Please note i am using nvidia 550.40.07 with an rtx 3080
Can reproduce with "gamescope vkcube". The cube stops turning after some seconds and then gamescope/vkcube is freezing. This is not reproduceable with "vkcube-wayland".
System Info:
Operating System: CachyOS Linux
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.6-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 7950X3D 16-Core Processor
Memory: 61,9 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070 SUPER/PCIe/SSE2
Manufacturer: ASRock
Product Name: X670E Pro RS
NVIDIA Driver: 550.54.14
log from "gamescope vkcube":
gamescope vkcube
vblank: Using timerfd.
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: physical device 10de:2783 compute queue doesn't support presenting on our surface, using graphics queue
vulkan: selecting physical device 'NVIDIA GeForce RTX 4070 SUPER': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
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: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
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 0x62f382d5e010 (res 0x62f382d5d680)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 81
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
pipewire: renegotiating stream params (size: 1280x720)
Selected GPU 0: NVIDIA GeForce RTX 4070 SUPER, 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 0x62f382d32590 (res 0x62f382d65100)
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x62f382d34c30 (res 0x62f382d65d00)
[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
[Gamescope WSI] Swapchain recieved new refresh cycle: 4.17ms
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: children shut down!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
fgamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, attempting shutdown!
fish: Job 1, 'gamescope vkcube' terminated by signal SIGKILL (Forced quit)
The shutting down attemps were when I tried to close the freezed vkcube window
Following is visible in dmesg:
[ 9019.014846] gamescope[25603]: segfault at f0 ip 0000731d43060168 sp 00007fff1e0bf840 error 4 in libnvidia-glcore.so.550.54.14[731d42200000+1d26000] likely on CPU 9 (core 9, socket 0)
[ 9019.014852] Code: 49 c1 e0 07 4e 8d 34 00 4d 89 f5 41 8b bf 34 01 00 00 45 31 f6 85 ff 0f 84 b1 00 00 00 0f 1f 44 00 00 4b 8b 94 f5 88 01 00 00 <48> 8b 8a f0 00 00 00 8b 82 f8 00 00 00 48 8b b1 08 01 00 00 48 8d
[ 9038.750297] gamescope[25648]: segfault at f0 ip 0000744779c60168 sp 00007ffed74a4240 error 4 in libnvidia-glcore.so.550.54.14[744778e00000+1d26000] likely on CPU 9 (core 9, socket 0)
[ 9038.750304] Code: 49 c1 e0 07 4e 8d 34 00 4d 89 f5 41 8b bf 34 01 00 00 45 31 f6 85 ff 0f 84 b1 00 00 00 0f 1f 44 00 00 4b 8b 94 f5 88 01 00 00 <48> 8b 8a f0 00 00 00 8b 82 f8 00 00 00 48 8b b1 08 01 00 00 48 8d
[ 9268.605532] gamescope-shdr[31103]: segfault at 10 ip 000078ec4aea1af4 sp 000078ec313ff0c8 error 4 in libc.so.6[78ec4ae24000+18a000] likely on CPU 13 (core 13, socket 0)
[ 9268.605540] Code: 28 00 00 00 75 8c 48 8d 0d 49 12 13 00 ba 5f 02 00 00 48 8d 35 3b 99 12 00 48 8d 3d 5f 99 12 00 e8 01 61 f9 ff 90 f3 0f 1e fa <8b> 47 10 89 c2 81 e2 7f 01 00 00 90 83 e0 7c 0f 85 a7 00 00 00 53
same here by using
MESA_VK_WSI_PRESENT_MODE=mailbox __GL_THREADED_OPTIMIZATIONS=0 AMD_VULKAN_ICD=RADV ENABLE_GAMESCOPE_WSI=0 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_v
alidation ENABLE_VKBASALT=1 gamescope --expose-wayland --prefer-vk-device '10de:2520' -f -- vkcube
https://pastebin.com/Bgb0KfBa