gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Gamescope not running on Wayland [NVIDIA GPU]

Open Cherryda opened this issue 2 years ago • 5 comments

On X11, Gamescope works as expected.

On Wayland, games do not launch at all. Executing gamescope through a terminal presents the following log:

wlserver: [../backend/headless/backend.c:82] Creating headless backend vulkan: selecting physical device 'NVIDIA GeForce GTX 1060 with Max-Q Design': queue family 2 vulkan: physical device supports DRM format modifiers vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0) vulkan: supported DRM formats for sampling usage: vulkan: 0x34325241 vulkan: 0x34325258 vulkan: physical device queue doesn't support presenting on our surface vulkan_make_output failed

This happens on Fedora 38 KDE, and the NVIDIA propietary driver installed is on version 530.41.03. I can confirm it is possible for NVIDIA to run gamescope on Wayland since it used to work in the beginning, but suddenlly it stopped working and there doesn't seem to be a clue as to why.

Cherryda avatar Jun 07 '23 13:06 Cherryda

just checking, is GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1" enabled in your /etc/default/grub, and after that did you update-grub?

WMan22 avatar Jun 08 '23 18:06 WMan22

just checking, is GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1" enabled in your /etc/default/grub, and after that did you update-grub?

It is setted and enabled correctly. (https://i.imgur.com/8l6ygsc.png)

Cherryda avatar Jun 08 '23 19:06 Cherryda

Same thing here. Fedora 38. Wayland on Hyprland. Also tried with Wayland on Plasma, but with no success at all. At the X11, works as intended. Works also without a display manager (from tty)

$ dnf repoquery --userinstalled | grep nvidia
akmod-nvidia-3:535.54.03-1.fc38.x86_64
hyprland-nvidia-0:0.26.0-2.fc38.x86_64
kmod-nvidia-6.3.11-200.fc38.x86_64-3:535.54.03-1.fc38.x86_64
kmod-nvidia-6.3.7-200.fc38.x86_64-3:530.41.03-1.fc38.x86_64
kmod-nvidia-6.3.8-200.fc38.x86_64-3:535.54.03-1.fc38.x86_64
nvidia-xconfig-3:535.54.03-1.fc38.x86_64
xorg-x11-drv-nvidia-cuda-3:535.54.03-2.fc38.x86_64
$ dnf repoquery --userinstalled | grep gamescope
gamescope-0:3.11.49-1.fc38.x86_64
$ gamescope -- glxgears
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [../backend/headless/backend.c:82] Creating headless backend
vulkan: selecting physical device 'NVIDIA GeForce RTX 3070': queue family 2
vulkan: physical device supports DRM format modifiers
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan:   0x34325241
vulkan:   0x34325258
vulkan: physical device queue doesn't support presenting on our surface
vulkan_make_output failed
Segmentation fault (core dumped)

cjuniorfox avatar Jul 10 '23 20:07 cjuniorfox

I managed to get the Gamescope working with Wayland. (Hyprland). You need to set some environment variables at your /etc/environment and then, things got start working as intended. My /etc/environment follows:

GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
ENABLE_VKBASALT=1
LIBVA_DRIVER_NAME=nvidia
QT_QPA_PLATFORMTHEME="wayland;xcb"
WLR_NO_HARDWARE_CURSORS=1

I got the information from: https://www.maketecheasier.com/wayland-work-with-nvidia-graphics-cards/ Because the problem, it's related exclusively to the NVIDIA driver and not to Gamescope, this issue could be closed.

cjuniorfox avatar Jul 11 '23 15:07 cjuniorfox

[gamescope] [Info]  vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 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: seat0
[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:   NV12 (0x3231564E)
[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 :2
[gamescope] [Info]  pipewire: stream state changed: connecting
[gamescope] [Info]  pipewire: stream state changed: paused
[gamescope] [Info]  pipewire: stream available on node ID: 116
[gamescope] [Info]  xwm: Embedded, no cursor set. Using left_ptr by default.
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
(EE)
(EE) Backtrace:
(EE) 0: Xwayland (0x57f72b7b6000+0x166183) [0x57f72b91c183]
(EE) 1: /usr/lib/libnvidia-eglcore.so.550.144.03 (0x78da85000000+0x72d2b5) [0x78da8572d2b5]
(EE) 2: /usr/lib/libnvidia-eglcore.so.550.144.03 (0x78da85000000+0x236c7d) [0x78da85236c7d]
(EE) 3: /usr/lib/libnvidia-eglcore.so.550.144.03 (0x78da85000000+0x24980a) [0x78da8524980a]
(EE) 4: Xwayland (0x57f72b7b6000+0x39335) [0x57f72b7ef335]
(EE) 5: Xwayland (0x57f72b7b6000+0x39b6d) [0x57f72b7efb6d]
(EE) 6: Xwayland (0x57f72b7b6000+0x39e88) [0x57f72b7efe88]
(EE) 7: Xwayland (0x57f72b7b6000+0x92d3e) [0x57f72b848d3e]
(EE) 8: Xwayland (0x57f72b7b6000+0x9b968) [0x57f72b851968]
(EE) 9: Xwayland (0x57f72b7b6000+0x1972b) [0x57f72b7cf72b]
(EE) 10: /usr/lib/libc.so.6 (0x78da87dad000+0x25e08) [0x78da87dd2e08]
(EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0x8c) [0x78da87dd2ecc]
(EE) 12: Xwayland (0x57f72b7b6000+0x1b2f5) [0x57f72b7d12f5]
(EE)
XXX fail to create fbo.
[gamescope] [Info]  vblank: Using timerfd.
(EE) failed to read Wayland events: Broken pipe
[1]    125372 IOT instruction (core dumped)  gamescope --expose-wayland -- glxgears

PixsaOJ avatar Feb 06 '25 14:02 PixsaOJ