flathub / com.valvesoftware.Steam.Utility.gamescope

https://flathub.org/apps/details/com.valvesoftware.Steam.Utility.gamescope
20 stars 5 forks source link

gamescope 3.11.32 cannot open nvidia-drm_gbm.so #28

Open runefox opened 2 years ago

runefox commented 2 years ago

Was really hoping to finally be able to use gamescope on Nvidia with Flatpak Steam now that it's up to date. Seems to be something to do with search paths but I can't figure out how to change them:

[📦 com.valvesoftware.Steam ~]$ gamescope No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce RTX 2080 SUPER': 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 wlserver: [backend/headless/backend.c:82] Creating headless backend wlserver: Running compositor on wayland display 'gamescope-0' wlserver: [backend/headless/backend.c:18] Starting headless backend wlserver: [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use wlserver: [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X1: Address already in use wlserver: [xwayland/server.c:92] Starting Xwayland on :2 MESA-LOADER: failed to open nvidia-drm: /usr/lib/x86_64-linux-gnu/GL/default/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/GL/default/lib/gbm, suffix _gbm) wlserver: [types/wlr_surface.c:741] New wlr_surface 0x5643c7269220 (res 0x5643c7269a40) wlserver: [xwayland/server.c:250] Xserver is ready pipewire: pw_context_connect failed Warning: failed to setup PipeWire, screen capture won't be available

While it appears to "work" here in the terminal with no parameters, it segfaults when attempting to run anything through it.

Could be a red herring, but it seems like the problem is that MESA-LOADER is looking for nvidia-drm_gbm.so under the default platform directory, not nvidia-515-48-07 where this file actually exists. Normally I'd have just worked around it with a symlink by now but as best I can tell that's not possible with Flatpak. It's very possible I'm missing something basic here but I haven't been able to find any documentation on this at all.

If I enable socket=fallback-x11 then this happens:

[📦 com.valvesoftware.Steam ~]$ gamescope No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce RTX 2080 SUPER': 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)

System gamescope works as expected outside of Flatpak:

gamescope No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce RTX 2080 SUPER': 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 wlserver: [backend/headless/backend.c:82] Creating headless backend wlserver: Running compositor on wayland display 'gamescope-0' wlserver: [backend/headless/backend.c:18] Starting headless backend wlserver: [xwayland/server.c:92] Starting Xwayland on :2 wlserver: [types/wlr_surface.c:741] New wlr_surface 0x55f02c28a0e0 (res 0x55f02c26ded0) wlserver: [xwayland/server.c:250] Xserver is ready

runefox commented 2 years ago

After the most recent update (still 3.11.12) it's no longer segfaulting by default, but it will fail to launch games that use hardware acceleration. Older games / launchers that don't will launch and make noises, but no window is visible. Very likely due to the nvidia-drm_gbm.so error, which still occurs.

marcinfalkiewicz commented 2 years ago

I did some testing by supplying GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-515-57/extra/gbm:/usr/lib/i386-linux-gnu/GL/nvidia-515-57/extra/gbm override and it seems to fix the problem (i.e. launching gamescope'd games).

However adding environment override is temporary solution, because it has to be updated manually with every driver release.

Sturmlocke86 commented 2 years ago

+1, is there a long term fix in the works for this issue?