ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.88k stars 192 forks source link

vk cude not spinning while in gamescope #1415

Open Dialgatrainer02 opened 2 weeks ago

Dialgatrainer02 commented 2 weeks ago

i was trying to run a gamer in steam and it wasnt showing so i ran steam through gamescope and it looked like this image then i tried vk cube (which workes fine running standalone and with gamemode) and it seems to render the first fame then stop image gamescope -- vkcube

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 780M (RADV GFX1103_R1)': 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: Hyprland
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:   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/server.c:107] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x625a9f1aad10 (res 0x625a9f1e83c0)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 81
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
josh edid: Patching res 800x1280 -> 1280x720
pipewire: renegotiating stream params (size: 1280x780)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_xwayland_wait_ready overridden by environment.
Selected GPU 0: AMD Radeon 780M (RADV GFX1103_R1), type: IntegratedGpu
[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 0x625a9f145250 (res 0x625a9f1a3860)
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x625a9f1446c0 (res 0x625a9f1a9c10)
[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.
pipewire: renegotiating stream params (size: 1269x769)
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
xdg_backend: Changed refresh to: 165.000hz
^Cgamescope: Received Interrupt signal, forwarding to child!
gamescope: Received Interrupt signal, attempting shutdown!
xwm: X11 I/O error

im on arch linux hyprland vulkan tools version: 1.3.269-1 gamescope version 3.14.22-1 kernel version: 6.9.0-273linux-tkg mesa version 1:24.1.2-1

i have an amd 780m igpu using the vulkan radeon driver?? and amdgpu kernel module

Joshua-Ashton commented 2 weeks ago

Can you try on not hyprland with latest master?

Dialgatrainer02 commented 2 weeks ago

i built gamescope from git and rna it in a tty and it seemed to work once i killed hyprland as gamescope was complaining about file descriptors when i try to run steam in hyprland it still freezes

gamescope -e -- steam
[gamescope] [Info]  console: gamescope version 3.14.23-8-gdc87117
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.
[gamescope] [Info]  vulkan: selecting physical device 'AMD Radeon 780M (RADV GFX1103_R1)': queue family 1 (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] [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:   AB48 (0x38344241)
[gamescope] [Info]  vulkan:   XB48 (0x38344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[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] [Debug] wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x5784b2623e40 (res 0x5784b2745bf0)
[gamescope] [Debug] wlserver: [xwayland/server.c:272] Xserver is ready
[gamescope] [Info]  pipewire: stream state changed: connecting
[gamescope] [Info]  pipewire: stream state changed: paused
[gamescope] [Info]  pipewire: stream available on node ID: 60
[gamescope] [Info]  xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info]  vblank: Using timerfd.
[gamescope] [Info]  josh edid: Patching res 800x1280 -> 1280x720
[gamescope] [Debug] pipewire: renegotiating stream params (size: 1280x1560)
steam.sh[164630]: Running Steam on arch rolling 64-bit
steam.sh[164630]: STEAM_RUNTIME is enabled automatically
setup.sh[164703]: Steam runtime environment up-to-date!
steam.sh[164630]: Steam client's requirements are satisfied
[2024-07-10 07:19:25] Startup - updater built Jun 20 2024 17:13:49
[2024-07-10 07:19:25] Startup - Steam Client launched with: '/home/olivia/.local/data/Steam/ubuntu12_32/steam' '-srt-logger-opened'
07/10 07:19:25 minidumps folder is set to /tmp/dumps
07/10 07:19:25 Init: Installing breakpad exception handler for appid(steam)/version(1718904662)/tid(164758)
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2024-07-10 07:19:25] Loading cached metrics from disk (/home/olivia/.local/data/Steam/package/steam_client_metrics.bin)
[2024-07-10 07:19:25] Using the following download hosts for Public, Realm steamglobal
[2024-07-10 07:19:25] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2024-07-10 07:19:25] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2024-07-10 07:19:25] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-07-10 07:19:25] Checking for update on startup
[2024-07-10 07:19:25] Checking for available updates...
[2024-07-10 07:19:25] Downloading manifest: https://client-update.akamai.steamstatic.com/steam_client_ubuntu12
[2024-07-10 07:19:25] Manifest download: send request
[2024-07-10 07:19:25] Manifest download: waiting for download to finish
[2024-07-10 07:19:25] Manifest download: finished
[2024-07-10 07:19:25] Download skipped: /steam_client_ubuntu12 version 1718904662, installed version 1718904662, existing pending version 0
[2024-07-10 07:19:25] Nothing to do
[2024-07-10 07:19:25] Verifying installation...
[2024-07-10 07:19:25] Performing checksum verification of executable files
[gamescope] [Debug] wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x5784b26dd080 (res 0x5784b2746eb0)
[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: 165.000hz
[gamescope] [Debug] pipewire: renegotiating stream params (size: 1269x1548)
[2024-07-10 07:19:26] Verification complete
UpdateUI: showing logo[gamescopereaper] [Info]  reaper: Parent of gamescopereaper was killed. Killing children.
(EE) failed to read Wayland events: Broken pipe
[gamescope] [Info]  launch: Primary child shut down!

vkcube also freezes when running inside of hyprland and fine when running in a tty

Joshua-Ashton commented 2 weeks ago

This sounds like some weird hyprland bug then. Not sure the issue should be here.

GabeFrahm commented 1 week ago

For now, my workaround on hyprland has been using --backend sdl

hope it works for you too @Dialgatrainer02