ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.12k stars 211 forks source link

gamescope doesn't run on NVIDIA #497

Open severinkaderli opened 2 years ago

severinkaderli commented 2 years ago

I'm trying to run glxgears inside gamescope: gamescope -W 1920 -H 1080 -- glxgears

and I get the following output:

No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
vulkan: selecting physical device 'NVIDIA GeForce 940MX'
vulkan: physical device supports DRM format modifiers
vulkan: physical device has no render node
Failed to initialize Vulkan

The kernel parameter: nvidia-drm.modeset=1 is set.

Graphics card: NVIDIA GeForce 940MX NVIDIA version: 515.43.04 Gamescope version: 3.11.31.beta4.r6.g97288b8-1 Distribution: Archlinux

pchome commented 1 year ago

I just did fresh gamescope install (3.12.3) on my X11 only (KDE) NV (535.98). Then running it and re-enabling everything I forgot to enable. So I have something to say about most of this issues:

  1. "Failed to initialize Vulkan"™ - yup, nvidia-drm.modeset=1 required
  2. "Freezing, black or corrupted image, etc"™ - egl-gbm package is required for this thing to run on NVIDIA, not egl-wayland (pulled by dependencies). People likely need both on Wayland. I even force-uninstalled egl-wayland to make sure everything is ok: gamescope, eglinfo, firefox (previously segfaulted in it during some startup tests) are ok.
  3. "Vulkan queue problems. ENABLE_VKBASALT=1 helps"™ - I did a quick glance into source code and it looks like this variable disables "compute-only" queues and enables "always-composite" mode. So people either have problems with selected "compute-only" queue or with queues in general (e.g. old hardware, supporting only "general-queue" with limited priority settings, etc.). Or VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME which (if not supported) results in disabled modifiers support, even if modifiers support was previously reported like vulkan: physical device supports DRM format modifiers. I personally patching this part of code for my hardware, but people should create separate github issues for this kind of problems.

@severinkaderli Consider to close this issue. It mostly contains setup-related problems.

LethalManBoob commented 1 year ago

Replying to https://github.com/ValveSoftware/gamescope/issues/497#issuecomment-1688355042

Can you explain how to install egl-gbm?

pchome commented 1 year ago

@LethalManBoob

Can you explain how to install egl-gbm?

As usual. Available in most distro repos. I checked ubuntu and fedora online package lists. or gentoo

$  eix egl-
[I] gui-libs/egl-gbm
     Available versions:  1.1.0 1.1.0_p20230420
     Installed versions:  1.1.0_p20230420(18:06:20 21.08.23)
     Homepage:            https://github.com/NVIDIA/egl-gbm/
     Description:         GBM EGL external platform library

* gui-libs/egl-wayland
     Available versions:  1.1.7-r1 1.1.11_p20230202-r1 1.1.12 1.1.12_p20230718
     Homepage:            https://github.com/NVIDIA/egl-wayland/
     Description:         EGLStream-based Wayland external platform

Found 2 matches
sl1pkn07 commented 1 year ago

thats package not available in archlinux

kisak-valve commented 1 year ago

https://archlinux.org/packages/extra/x86_64/nvidia-utils/ package contents: [...] usr/lib/libnvidia-egl-gbm.so usr/lib/libnvidia-egl-gbm.so.1 usr/lib/libnvidia-egl-gbm.so.1.1.0 [...]

sl1pkn07 commented 1 year ago

yep. just found it

and nvidia-utils depends of egl-wayland https://archlinux.org/packages/extra/x86_64/nvidia-utils/

edit: force remove:

└───╼  gamescope vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce GTX 1070 Ti': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x5628582130e0 (res 0x56285820da80)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: pw_context_connect failed
Warning: failed to setup PipeWire, screen capture won't be available
Selected GPU 0: NVIDIA GeForce GTX 1070 Ti, type: DiscreteGpu
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x5628581ec100 (res 0x562858216160)
xwm: got the same buffer commited twice, ignoring.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server

the window show vkcube freeze (inmovil)

so new issue appears(?)

edit2: sudo setcap 'cap_sys_nice=eip' /usr/bin/gamescope not helps

greetings

pchome commented 1 year ago

To clarify my English and my setup issue with egl-gbm on Gentoo: I had to manually install egl-gbm (see reasons below), gamescope worked for me with both egl-gbm and gui-libs/egl-wayland installed. I force-removed gui-libs/egl-wayland for testing purposes, and I know what I'm doing here (it will be auto-installed on next update).

The reasons / my (or Gentoo) setup issues Because `egl-gbm` only installing for `x11-drivers/nvidia-drivers[wayland]` and `wayland` USE flag is disabled. All `wayland` use-flags (aka `-wayland`), X11 only system, as I said. I even overlayed `kde-plasma/kwin` to have `wayland` use flag ... aaand disabled it :laughing: So it has to not require `>=media-libs/mesa-21.3[wayland]` and `x11-base/xwayland`. `media-libs/mesa` is minimal, only to have it's vulkan layer and zink. Also, this is likely the reason I have "broken" `gui-libs/egl-wayland`, maybe also the reason I need `egl-gbm`. **Uninstalling `gui-libs/egl-wayland` just solves the whole puzzle, finally.** I have no idea how other (_"normal"_) systems functioning (_prime, multi-GPU, etc._). People should consult [mesa documentation](https://docs.mesa3d.org/envvars.html) if they need mesa. Maybe `EGL_PLATFORM=x11` or something else (other environment variables) should do the same trick.
sith-on-mars commented 1 year ago

I'm using Steam Flatpak on Fedora Silverblue and gamescop always refused to work on my Nvidia 1050ti. It kept spamming vblankmanager: write failed: Resource temporarily unavailable and the game just wouldn't launch.

Installing egl-gbm didn't seem to change anything.

gulafaran commented 1 year ago

yeah i highly doubt its an "It mostly contains setup-related problems." situation. i got pretty much all things running on wayland on this laptop. native applications, gtk/qt/sdl running on a dual gpu laptop with dual monitors. be it wine or proton in xwayland or native linux games. vulkan/opengl you name it. running vkcube in gamescope on the internal gpu works just fine, doing it on the nvidia gpu freezes the process. this is with gamescope built from -git today and nvidia 535.98, egl-gbm is already provided by the nvidia-utils package in arch. now whos to blame i can almost guarantee its nvidia and its piss poor driver. and its only gamescope introducing this behaviour. running vkcube without it works on both gpus.

ghost commented 1 year ago

I'm also having an issue, gamescope doesn't work for me either I have a 2080 ti, latest proprietary drivers, and I'm using arch linux (gnome X11) I have nvidia-drm.modeset=1, nvidia-utils package which was stated before contains egl-gbm for arch

running gamescope vkcube i get:

No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 2080 Ti': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :0
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x5583199e0f20 (res 0x5583199e8460)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 36
xwm: execvp failed: No such file or directory

I have tried the gamescope package, and the gamescope-git and gamescope-plus packages from the AUR

After leaving it on for a while I also get the same vblankmanager: write failed: Resource temporarily unavailable issue that sith-on-mars gets, but I assume that's due to an error before it

pchome commented 1 year ago

@PikaDevs

xwm: execvp failed: No such file or directory

$  gamescope -- garbage
...
wlserver: [xwayland/server.c:273] Xserver is ready
xwm: execvp failed: No such file or directory
gulafaran commented 1 year ago

this is what it currently prints here.

 ┌┤acer->tom ~
 └➤ prime-run gamescope vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: physical device 10de:2520 compute queue doesn't support presenting on our surface, using graphics queue
vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Laptop GPU': queue family 0
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x56472b0c0b70 (res 0x56472b442a40)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 121
warning: queue 0x56472b384510 destroyed while proxies still attached:
  zwp_linux_dmabuf_feedback_v1@38 still attached
  zwp_linux_dmabuf_v1@39 still attached
pipewire: renegotiating stream params (size: 1280x720)
Selected GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU, type: DiscreteGpu
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x56472b4134a0 (res 0x56472b442f30)
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.
Errors from xkbcomp are not fatal to the X server
[destroyed object]: error 7: importing the supplied dmabufs failed

and if i leave it "running" long enough it begins spamming vblankmanager: write failed: Resource temporarily unavailable

pchome commented 1 year ago

Some people should check their commands. To make sure use gamescope -- actual_command format.

Also $ VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay gamescope -S integer -- vkcube

Result ![Screenshot_20230823_151411](https://github.com/ValveSoftware/gamescope/assets/10661854/b1ab744b-060a-4777-91f0-816c074aa47b)

$ gamescope -S integer -- env VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay vkcube

Result ![Screenshot_20230823_151505](https://github.com/ValveSoftware/gamescope/assets/10661854/e90ff67a-d1ec-4202-b470-467baef76750)

EDIT: debug helper example (while running gamescope)

$  lsof | grep egl- | awk '{print $1" "$2" "$NF}' | sort -u
firefox-b 16547 /usr/lib64/libnvidia-egl-gbm.so.1.1.0
Xwayland 18483 /usr/lib64/libnvidia-egl-gbm.so.1.1.0

EDIT2: @gulafaran

and if i leave it "running" long enough it begins spamming vblankmanager: write failed: Resource temporarily unavailable

I noticed gamescope will not completely exit if command has failed. e.g. $ gamescope -- vkcube --garbage-var

ghost commented 1 year ago

I see, thanks, it does load now (gamescope -- vkcube) but I'm unable to interact with the window (eg. resizing it) as it causes the system to hang for a bit and I have to force the program to quit if I add any other command (eg. gamescope --fullscreen -- vkcube) the program immediately crashes and causes the system to hang it outputs:

The XKEYBOARD keymap compiler (xkbcomp) reports:
 Warning:          Unsupported maximum keycode 708, clipping.
                   X11 cannot support keycodes above 255.
gamescope: ../src/rendervulkan.cpp:1514: void CVulkanDevice::wait(uint64_t, bool): Assertion `0' failed.
(EE) failed to read Wayland events: Broken pipe

It also spammed the logs with vblankmanager: write failed: Resource temporarily unavailable

When running the command one time, it displayed the first image of the vkcube fullscreen, froze and hung the entire system for ~5 minutes until I was put back at the login menu

pchome commented 1 year ago

@PikaDevs

When running the command one time, it displayed the first image of the vkcube fullscreen, froze and hung the entire system for ~5 minutes until I was put back at the login menu

Same for me with gamescope --fullscreen -- vkcube

651 (?)

_But I was able to switch to next plasma virtual desktop and kill it via xterm. Usually using them instead of Alt+TAB. Had no Alt+TAB problems ever in games. I'm used to do Ctrl+F1, Ctrl+F2, ..._

ghost commented 1 year ago

I see, thanks, it just seems that gamescope isn't really useable for me in it's current state with NVIDIA

gamescope --nested-height 1440 --nested-width 2560 --output-height 2160 --output-width 3840 --filter fsr --fsr-sharpness 15 --

I assume since there's no fullscreen that's why the current output is 1440 by 2560, which makes no difference as to just running it at that resolution

raresgmihalcea commented 1 year ago

Also having this issue with an NVIDIA GeForce RTX 2060 Mobile on Arch Linux running master

Edit: not the same, I actually get

vulkan: vkCreateDevice failed (VkResult: -7)

I've managed to fix VkResult: -7 by using Vulkan Validation Layers

pchome commented 1 year ago

@raresgmihalcea

I've managed to fix VkResult: -7 by using Vulkan Validation Layers

lol

$ grep '\-7' /usr/include/vulkan/vulkan_core.h
    VK_ERROR_EXTENSION_NOT_PRESENT = -7,

Which is either VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME (if not in modeset=1) or VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME (on some nv gpus), AFAIK.

EDIT: well, the VK_KHR_MAINTENANCE_5_EXTENSION_NAME too in current git (which, according to gpuinfo, currently supported only by nv vulkan beta drivers)

LethalManBoob commented 1 year ago

Anyone else having it crash every other boot? I can make gamescope work fullscreen on kde but ever other boot it just fails even if i close all running gamescope tasks

kekkoudesu commented 1 year ago

Here's a weird one:

I'm on Fedora 38, KDE. I just built the Gamescope binary, and i tried it out with vkcube. I get a black window and then it crashes, but I have to kill it with pkill gamescope -9:

build/src/gamescope -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 2060 SUPER': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x2744c20 (res 0x2c3ddd0)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 42
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: NVIDIA GeForce RTX 2060 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:681] New wlr_surface 0x2c17e90 (res 0x2c40390)
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x2c16da0 (res 0x2c451b0)[Gamescope WSI] Made gamescope surface for xid: 0x400000

[Gamescope WSI] Surface state:
  window xid:                    0x400000
  wayland surface res id:        5
wlserver:   layer client flags:            0x0
[wayland] error in client communication (pid 55569)  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.
Errors from xkbcomp are not fatal to the X server
[Gamescope WSI] Creating swapchain for xid: 0x400000 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
wl_display@1: error 1: invalid method 2, object gamescope_xwayland@4
[Gamescope WSI] Failed to create swapchain - vr: VK_ERROR_INITIALIZATION_FAILED xid: 0x400000
gamescope: children shut down!

Trying it with a native Ren'Py game, I get a black window and it crashes:

build/src/gamescope -- ./aheroandagarden.sh
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 2060 SUPER': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x1464bd0 (res 0x195de60)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 42
pipewire: renegotiating stream params (size: 1280x720)
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x1937f20 (res 0x195fb90)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
vblankmanager: write failed: Resource temporarily unavailable

So I tried it over Wine, and I don't get a window at all. It just dies immediately:

build/src/gamescope -- WINEPREIFX=~/.local/share/wineprefixes/vn32 LANG=ja_JP.UTF-8 wine DistantMemorajxo.exe
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 2060 SUPER': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
wlserver: [types/wlr_compositor.c:681] New wlr_surface 0x2f76b20 (res 0x346f8a0)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 42
xwm: execvp failed: No such file or directory
gamescope: children shut down!
(EE) failed to read Wayland events: Broken pipe

And here's the really weird part. I added the Ren'Py game and Windows game to Lutris with DXVK and Gamescope enabled, and they...work fine?

lutris-wrapper: A HERO AND A GARDEN
Started initial process 56961 from gamescope -w 1920 -h 1080 -- gamemoderun ./aheroandagarden.sh
Start monitoring process.
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: physical device 10de:1f06 compute queue doesn't support presenting on our surface, using graphics queue
vulkan: selecting physical device 'NVIDIA GeForce RTX 2060 SUPER': queue family 0
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344241 (VkResult: 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x48344258 (VkResult: 0)
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:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:16] Starting headless backend
wlserver: [xwayland/server.c:108] Starting Xwayland on :1
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x559d4489c460 (res 0x559d448a0e20)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 61
pipewire: renegotiating stream params (size: 1280x720)
gamemodeauto: 
gamemodeauto: 
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x559d4487ac00 (res 0x559d448a42d0)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server

I tried passing gamemoderun to gamescope after seeing this, but nothing changed. So, it would seem to me...that the Lutris Runtime has some library I need that I don't know about. I guess I need to poke around ~/.local/share/lutris/runtime to see what libraries I need to install. There are 130 pinned Ubuntu 18.04 x64 libraries.

LethalManBoob commented 11 months ago

Gamescope hasent worked for me in months. Boots to empty screen.

╰─>$ gamescope -- glxgears
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: selecting physical device 'NVIDIA GeForce RTX 3070': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
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:   AB4H (0x48344241)
vulkan:   XB4H (0x48344258)
vulkan:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
vulkan: Creating Gamescope nested swapchain with format 44 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 :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 0x560b78828fc0 (res 0x560b78eab040)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 113
vulkan: Creating Gamescope nested swapchain with format 44 and colorspace 0
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
pipewire: renegotiating stream params (size: 1280x720)
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x560b78647780 (res 0x560b78eae670)
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
sharkautarch commented 11 months ago

Gamescope hasent worked for me in months. Boots to empty screen.


...
Errors from xkbcomp are not fatal to the X server

@LethalManBoob I've just updated my nvidia-fix branch, which has a workaround for the current nvidia driver bug w/ gamescope, to the latest git revision of gamescope. I've tested my building and running gamescope from my branch w/ nvidia, and it seems to work as long as you set ENABLE_GAMESCOPE_WSI=0 (e.i. ENABLE_GAMESCOPE_WSI=0 gamescope <params> -- <game>) if you're using hybrid graphics, you'll have to run gamescope like so: ENABLE_GAMESCOPE_WSI=0 gamescope --prefer-vk-device $(env MESA_VK_DEVICE_SELECT=list vulkaninfo) <params> -- <game>

to build from my branch:

git clone https://github.com/sharkautarch/gamescope.git
cd gamescope
git checkout nvidia-fix
meson setup -Dc_args="-Wno-uninitialized -Wno-maybe-uninitialized" -Dcpp_args="-Wno-uninitialized -Wno-maybe-uninitialized" --reconfigure build
ninja -C build
meson install -C build
Rdeisenroth commented 11 months ago

@sharkautarch i tried your fix branch, but:

sharkautarch commented 11 months ago

@sharkautarch i tried your fix branch, but:

* following your steps i had to run `git submodule update --init --recursive` after the `git pull` in order to fetch the submodules or it wouldn't build

* i also get the freezing described by others after a short while in every game i tested so far, with the log spamming:
  `vblankmanager: write failed: Resource temporarily unavailable`
  i run with something like `ENABLE_GAMESCOPE_WSI=0 gamemoderun gamescope -r 144 -- glxgears`

@Rdeisenroth Huh... what nvidia driver are you using? there may or may not be an issue with the nvidia 545 driver... One person said that my branch was able to run after switching to 535 dkms driver Another person said it actually worked fine w/ the 545 driver...

Nvidia is one heck of a weird gpu on linux, amirite!

See: https://github.com/ValveSoftware/gamescope/issues/948#issuecomment-1826993404

and see: https://github.com/ValveSoftware/gamescope/issues/948#issuecomment-1832749254

LethalManBoob commented 11 months ago

image

╰─>$ ENABLE_GAMESCOPE_WSI=0 gamescope -- raze
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 3070': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
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:   AB4H (0x48344241)
vulkan:   XB4H (0x48344258)
vulkan:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
vulkan: Creating Gamescope nested swapchain with format 44 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: [util/env.c:9] Loading WLR_NO_HARDWARE_CURSORS option: 1
wlserver: [types/output/output.c:435] WLR_NO_HARDWARE_CURSORS set, forcing software cursors
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 0x560aa7ff2cc0 (res 0x560aa8543090)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 72
vulkan: Creating Gamescope nested swapchain with format 44 and colorspace 0
pipewire: renegotiating stream params (size: 1280x720)
Raze 1.8.1 - 2023-11-12 14:35:34 +0100 - SDL version
Compiled on Nov 15 2023

Log started: 2023-11-29 22:56:32
OS: CachyOS, Linux 6.6.2-3-cachyos-sched-ext on x86_64
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_STAYS_ON_TOP
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_BELOW
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x560aa851ad40 (res 0x560aa8546190)
xwm: Unhandled initial NET_WM_STATE property: _NET_WM_STATE_MODAL
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
sharkautarch commented 11 months ago

@LethalManBoob I just updated the nvidia-fix branch (pulling in newer upstream gamescope commits) Maybe rebuilding gamescope now might help? idk

Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id. Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.

I assume you're running on wayland?

wlserver: [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use

hmmm that probably isn't supposed to happen normally????

wlserver: [xwayland/server.c:108] Starting Xwayland on :2

hmmm maybe this line, plus the quoted line above it could just be due to a previous gamescope session that didn't exit properly????

Can you confirm that you still get said lines in your terminal after following these steps and then re-running gamescope:

What version is your nvidia driver? is it 545 or 535?

Rdeisenroth commented 11 months ago

@Rdeisenroth Huh... what nvidia driver are you using?

@sharkautarch
I am using 545.29.06.

Nvidia is one heck of a weird gpu on linux, amirite!

Absolutely. I regret my RTX 4080. Should've bought AMD. But i do need some of the proprietary features of team green 😢

See: #948 (comment)

and see: #948 (comment)

Hmm idk i can't get it to work with 545, it always freezes after a while. I will test 535 and other WMs tomorrow. I am using Hyprland with xorg-xwayland-explicit-sync-git package.

LethalManBoob commented 11 months ago

updated

╰─>$ ENABLE_GAMESCOPE_WSI=0 gamescope -- raze
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 3070': queue family 2 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
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:   AB4H (0x48344241)
vulkan:   XB4H (0x48344258)
vulkan:   AB30 (0x30334241)
vulkan:   XB30 (0x30334258)
vulkan:   AR30 (0x30335241)
vulkan:   XR30 (0x30335258)
vulkan: Creating Gamescope nested swapchain with format 44 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: [util/env.c:9] Loading WLR_NO_HARDWARE_CURSORS option: 1
wlserver: [types/output/output.c:435] WLR_NO_HARDWARE_CURSORS set, forcing software cursors
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 0x5567fc99cd80 (res 0x5567fceed170)
wlserver: [xwayland/server.c:273] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 62
vulkan: Creating Gamescope nested swapchain with format 44 and colorspace 0
Raze 1.8.1 - 2023-11-12 14:35:34 +0100 - SDL version
Compiled on Nov 15 2023

pipewire: renegotiating stream params (size: 1280x720)
Log started: 2023-11-30 00:02:40
OS: CachyOS, Linux 6.6.2-3-cachyos-sched-ext on x86_64
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_STAYS_ON_TOP
xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_BELOW
wlserver: [types/wlr_compositor.c:692] New wlr_surface 0x5567fcec4ec0 (res 0x5567fcef0270)
xwm: Unhandled initial NET_WM_STATE property: _NET_WM_STATE_MODAL
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: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
(EE) failed to read Wayland events: Broken pipe
sharkautarch commented 11 months ago

@Rdeisenroth: Hmm idk i can't get it to work with 545, it always freezes after a while. I will test 535 and other WMs tomorrow. I am using Hyprland with xorg-xwayland-explicit-sync-git package.

LethalManBoob: updated ╰─>$ ENABLE_GAMESCOPE_WSI=0 gamescope -- raze No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected.

@LethalManBoob Are you using nvidia driver version 545?

I wonder if the issue w/ nvidia-fix not working is an issue of nvidia+gamescope being used w/ a wayland DE? idk...

@akay you said that nvidia-fix + switching to nvidia 535 dkms driver worked for you... Do you use a wayland or X11 DE?

I'm using nvidia dkms 535 on xfce (x11) and the nvidia-fix branch of gamescope is working for me

akay commented 11 months ago

@akay you said that nvidia-fix + switching to nvidia 535 dkms driver worked for you... Do you use a wayland or X11 DE?

I use Sway, so Wayland on wlroots:

$ env | rg -i "wlr|gl|gbm|vk|sdl"
WLR_NO_HARDWARE_CURSORS=1
WLR_DRM_DEVICES=/dev/dri/card0
WLR_RENDERER=gles2
WLR_BACKENDS=libinput,drm
WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128
__GLX_VENDOR_LIBRARY_NAME=nvidia
__GL_GSYNC_ALLOWED=0
__GL_VRR_ALLOWED=0
GBM_BACKEND=nvidia-drm
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
SDL_VIDEODRIVER=wayland

$ pacman -Q xorg-xwayland sway wlroots*
xorg-xwayland 23.2.2-1
sway 1:1.8.1-4
wlroots-nvidia 0.17.0-2
wlroots0.16 0.16.2-2
LethalManBoob commented 11 months ago

Replying to https://github.com/ValveSoftware/gamescope/issues/497#issuecomment-1832913867

545.29.06 wayland kde plasma

sharkautarch commented 11 months ago

Replying to #497 (comment)

545.29.06 wayland kde plasma

Yeah, so it seems like nvidia 545 might not work well w/ gamescope nvidia-fix branch

LethalManBoob commented 11 months ago

Replying to #497 (comment)

545.29.06 wayland kde plasma

Yeah, so it seems like nvidia 545 might not work well w/ gamescope nvidia-fix branch

nvidia-fix needs a fix for nvidia B)

sharkautarch commented 11 months ago

nvidia-fix needs a fix for nvidia B)

well, since the bug that necessitated the nvidia-fix branch is actually a bug in the nvidia driver itself, it would be more appropriate to say:

nvidia needs a fix for nvidia-fix (and they also need a fix for gamescope)

sergiotca commented 8 months ago

Has anyone had a chance to test if the newly nvidia driver 550.54.14 has solved this issue?

https://www.nvidia.com/Download/driverResults.aspx/218826/en-us/

gulafaran commented 8 months ago

i just tested to run it on 550.40.07 with gamescope-git rebuilt, havent tried it in a while and vkcube shows now. this is on a prime/optimus setup

kulothunganug commented 1 month ago
gamescope vkcube ``` [gamescope] [Info] console: gamescope version 3.15.5 ATTENTION: default value of option vk_khr_present_wait overridden by environment. [gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 2050': 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: ../gamescope/src/rendervulkan.cpp:2118: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc): Assertion `!modifiers.empty()' failed. fish: Job 1, 'gamescope vkcube' terminated by signal SIGABRT (Abort) ```
nvidia-smi ``` Thu Sep 12 15:33:13 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 2050 Off | 00000000:01:00.0 Off | N/A | | N/A 46C P0 8W / 70W | 8MiB / 4096MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 894 G Hyprland 1MiB | +-----------------------------------------------------------------------------------------+ ```
kulothunganug commented 1 month ago

Same issue, i have set nvidia modeset and setcap

using gamescope from aur

gamescope vkcube ``` [gamescope] [Info] console: gamescope version 3.15.5 ATTENTION: default value of option vk_khr_present_wait overridden by environment. [gamescope] [Info] vulkan: selecting physical device 'NVIDIA GeForce RTX 2050': 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: ../gamescope/src/rendervulkan.cpp:2118: bool CVulkanTexture::BInit(uint32_t, uint32_t, uint32_t, uint32_t, createFlags, wlr_dmabuf_attributes*, uint32_t, uint32_t, CVulkanTexture*, gamescope::OwningRc): Assertion `!modifiers.empty()' failed. fish: Job 1, 'gamescope vkcube' terminated by signal SIGABRT (Abort) ```
nvidia-smi ``` Thu Sep 12 15:33:13 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 2050 Off | 00000000:01:00.0 Off | N/A | | N/A 46C P0 8W / 70W | 8MiB / 4096MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 894 G Hyprland 1MiB | +-----------------------------------------------------------------------------------------+ ```