Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamescope crash on startup. #1732

Open
3 of 6 tasks
JunaidQrysh opened this issue Jan 29, 2025 · 8 comments
Open
3 of 6 tasks

Gamescope crash on startup. #1732

JunaidQrysh opened this issue Jan 29, 2025 · 8 comments

Comments

@JunaidQrysh
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

[gamescope] [Info] console: gamescope version 3.16.1-38-gef1e8dbe (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info] scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 5)
[gamescope] [Info] scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 6)
[gamescope] [Info] scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info] scriptmgr: Loading scripts from: '/home/qrysh/.config/gamescope/scripts'
[gamescope] [Warn] scriptmgr: Directory '/home/qrysh/.config/gamescope/scripts' does not exist
[gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 3050 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: Hyprland
[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: AB4H (0x48344241)
[gamescope] [Info] vulkan: XB4H (0x48344258)
[gamescope] [Info] vulkan: AB30 (0x30334241)
[gamescope] [Info] vulkan: AR30 (0x30335241)
[gamescope] [Info] vulkan: XR30 (0x30335258)
gamescope: ../src/rendervulkan.cpp:2139: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRcgamescope::IBackendFb): Assertion `modifiers.size() > 0' failed.
fish: Job 1, 'gamescope -- glxgears' terminated by signal SIGABRT (Abort)

I think #1548 should have fixed this? i am on the latest aur build.

Steps To Reproduce

No response

Hardware information

- Distro: Arch Linux
- CPU: 11th Gen Intel(R) Core(TM) i9-11900H @ 4.90 GHz
- GPU: Intel UHD Graphics
- GPU: NVIDIA GeForce RTX 3050 Mobile
- Driver Version: nvidia (open source) 565.77

Software information

- Desktop environment: Hyprland
- Session type: 
- Gamescope version: 3.16.1-38-gef1e8dbe (gcc 14.2.1)
- Gamescope launch command(s): gamescope -- glxgears

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

No response

@matte-schwartz
Copy link

does vulkaninfo --summary show 2 GPUs (your iGPU and dGPU)? I have a feeling it might be the same crash as #1590

@JunaidQrysh
Copy link
Author

JunaidQrysh commented Jan 29, 2025

@matte-schwartz here is vulkaninfo --summary
vulkaninfo --summary
==========
VULKANINFO
==========

Vulkan Instance Version: 1.4.303


Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 4
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1
VK_NV_display_stereo                   : extension revision 1

Instance Layers: count = 2
--------------------------
VK_LAYER_FROG_gamescope_wsi_x86_64 Gamescope WSI (XWayland Bypass) Layer (x86_64) 1.3.221  version 1
VK_LAYER_NV_optimus                NVIDIA Optimus layer                           1.3.289  version 1

Devices:
========
GPU0:
	apiVersion         = 1.3.289
	driverVersion      = 565.77.0.0
	vendorID           = 0x10de
	deviceID           = 0x25a2
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = NVIDIA GeForce RTX 3050 Laptop GPU
	driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
	driverName         = NVIDIA
	driverInfo         = 565.77
	conformanceVersion = 1.3.8.2
	deviceUUID         = bbb7ed09-b9fe-17a0-2ed6-ee6de8173163
	driverUUID         = 5d948742-de2b-5e32-9692-c2a5621aed9a

@JunaidQrysh
Copy link
Author

Update: I turned the mux switch and now with nvidia only gpu same errors BUT gamescope is working(Now it is launching window of glxgears or any other program)

Logs:

gamescope -- glxgears
[gamescope] [Info]  console: gamescope version 3.16.1-38-gef1e8dbe (gcc 14.2.1)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts'
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope'
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/common'
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/inspect.lua' (id: 0)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/modegen.lua' (id: 1)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/common/util.lua' (id: 2)
[gamescope] [Info]  scriptmgr: Loading scripts from: '/usr/share/gamescope/scripts/00-gamescope/displays'
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/asus.rogally.lcd.lua' (id: 3)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/deckhd.steamdeck.deckhd-lcd.lua' (id: 4)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.lcd.lua' (id: 5)
[gamescope] [Info]  scriptmgr: Running script file '/usr/share/gamescope/scripts/00-gamescope/displays/valve.steamdeck.oled.lua' (id: 6)
[gamescope] [Info]  scriptmgr: Loading scripts from: '/etc/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/etc/gamescope/scripts' does not exist
[gamescope] [Info]  scriptmgr: Loading scripts from: '/home/qrysh/.config/gamescope/scripts'
[gamescope] [Warn]  scriptmgr: Directory '/home/qrysh/.config/gamescope/scripts' does not exist
[gamescope] [Info]  vulkan: selecting physical device 'NVIDIA GeForce RTX 3050 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: Hyprland
[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:   AB4H (0x48344241)
[gamescope] [Info]  vulkan:   XB4H (0x48344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[gamescope] [Info]  wlserver: Using explicit sync when available
[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] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :1
[gamescope] [Info]  pipewire: stream state changed: connecting
[gamescope] [Info]  pipewire: stream state changed: paused
[gamescope] [Info]  pipewire: stream available on node ID: 44
[gamescope] [Info]  vblank: Using timerfd.
[gamescope] [Info]  edid: Patching res 800x1280 -> 1280x720
[gamescope] [Warn]  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] [Info]  xdg_backend: Changed refresh to: 120.002hz
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

@matte-schwartz
Copy link

if you check lspci -k | grep -EA3 "VGA|3D|Display" with the MUX switch enabled, do you only see your NVIDIA dGPU. And if you check lspci -k | grep -EA3 "VGA|3D|Display" without the MUX switch, do you see both GPUs there?

@JunaidQrysh
Copy link
Author

@matte-schwartz yes with mux switch enabled i only see nvidia gpu and without it i see both

@matte-schwartz
Copy link

Okay, it's very likely the same crash as #1590 then. Multiple Vulkan devices present cause the crash, and a proper MUX switch that hides the Vulkan device for the iGPU avoids it.

Not too sure where the exact problem is yet but I can reproduce the issue and will keep working on narrowing down the source of the problem since right now it's unclear

@JunaidQrysh
Copy link
Author

Another finding, When i run gamescope in tty with mux switch enabled(nvidia only) it works but with mux switch disabled(nvidia+igpu) it crashes and it says:
drm: eDP-2 disconnected
drm: cannot find any connectors

But my monitor is eDP-1, when i put MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) inside /etc/mkinitcpio.conf
my monitor become eDP-2 but running gamescope in tty then show:
drm: eDP-1 disconnected
drm: cannot find any connectors

@matte-schwartz
Copy link

the issue in the DRM backend (from TTY) is being tracked here: #1469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants