gamescope
gamescope copied to clipboard
gamescope doesn't run on NVIDIA
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
Try (1st line of logs complains about it):
# setcap 'cap_sys_nice=eip' /usr/bin/gamescope
With root privileges.
Keep in mind open issue: #492
Using gamescope-git on my archlinux build it does work. However the frame rate is reduced to near unplayable levels on all titles tested from dying light to half life and they all excibit horrid screen tear. Edit: gamescope -W 1920 -H 1080 -- vkquake works fine and performance is good with no tearing. I get the same issues as noted above if I use gamescope from lutris. It also locks my res to 640x480. changing res forces it to 1080p and gives me issues once again. i am using hdmi 2.1 if it matters
@LethalManBoob I guess better to put this report into #492, instead of this issue.
Seems like the same issue here.
gamescope -h 1080 -H 1800 -- vkcube
vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti'
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateFence failed (VkResult: -1)
Failed to initialize Vulkan
Segmentation fault (core dumped)
Arch, everything is up to date. gamescope 3.11.30-1 nvidia 515.43.04-1 i3wm (no compositor) nvidia-drm.modeset=1
gamescope -h 1080 -H 1800 -- vkcube vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti' vulkan: physical device supports DRM format modifiers vulkan: vkCreateFence failed (VkResult: -1) Failed to initialize Vulkan Segmentation fault (core dumped)
Yes, also facing same issue, same settings and nvidia drivers, same distro.
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)
Same issue here, also with mobile GPU.
vulkan: selecting physical device 'NVIDIA GeForce RTX 3050 Laptop GPU' vulkan: physical device supports DRM format modifiers vulkan: vkCreateFence failed (VkResult: -1) Failed to initialize Vulkan.
Up-to-date arch. Gamescope 3.11.30-1 KDE Plasma Nvidia 515.43.04 nvidia-drm.modeset=1 setcap 'cap_sys_nice=eip' /usr/bin/gamescope
That version is too old, it's missing the NVIDIA fixes.
Configuration like in my post above (Laptop GPU, using NVIDIA Prime), except: Gamescope git Version from 18.05.2022 Output of gamescope -Y -- glxgears shows no gears. Get this error message: "Error getting buffer", from this log:
gamescope -Y -- glxgears vulkan: selecting physical device 'NVIDIA GeForce RTX 3050 Laptop GPU' 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/server.c:92] Starting Xwayland on :1 wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560c31c18590 (res 0x560c31b01240) wlserver: [xwayland/server.c:250] 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) wlserver: [types/wlr_surface.c:741] New wlr_surface 0x560c31a960c0 (res 0x560c31c0fcf0) Error getting buffer Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 2075 frames in 5.0 seconds = 414.844 FPS 2107 frames in 5.0 seconds = 421.268 FPS 1943 frames in 5.0 seconds = 388.594 FPS . . . .
Update: Ran the same command with prime-run: prime-run gamescope -Y -- glxgears , with the same outcome (Is prime-run even necessary with gamescope?)
Configuration like in my post above (Laptop GPU, using NVIDIA Prime), except: Gamescope git Version from 18.05.2022 Output of gamescope -Y -- glxgears shows no gears. Get this error message: "Error getting buffer", from this log:
Seems like the same as this bug #498
I made it somewhat work in nested mode by setting nvidia prime variables, i.e:
$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only gamescope -e -f -- steam
And games launched that way will be rendered by the Nvidia card (checked with nvidia-smi).
Embedded mode doesnt work, no matter if those variables are set.
If anyone wonders. The chaotic aur version of gamescope-git is what I used. Usually chaotic aur is more up to date than the -git foundi n the normal aur
Was testing, like suggested from Samsagax, but with -Y flag because of Nvidia GPU: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only gamescope -Y -- glxgears
Still same error like in my last post: error getting buffer
And: Window with Gears is NOT showing
Setup is still the same, like in my last post: (Gamescope git Version from 18.05.2022, Nvidia 3050 Laptop GPU)
Full ouput:
vulkan: selecting physical device 'NVIDIA GeForce RTX 3050 Laptop GPU' 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/server.c:92] Starting Xwayland on :1 wlserver: [types/wlr_surface.c:741] New wlr_surface 0x562660db6de0 (res 0x562660db7600) wlserver: [xwayland/server.c:250] Xserver is ready pipewire: stream state changed: connecting pipewire: stream state changed: paused pipewire: stream available on node ID: 68 pipewire: renegotiating stream params (size: 1280x720) wlserver: [types/wlr_surface.c:741] New wlr_surface 0x562660d926a0 (res 0x562660dbd9d0) Error getting buffer Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 1963 frames in 5.0 seconds = 392.430 FPS . . .
Getting a segmentation fault when trying to test gamescope on an Nvidia GTX 1070TI.
The kernel parameter: nvidia-drm.modeset=1 is set.
And also setcap 'cap_sys_nice=eip' /usr/bin/gamescope
Graphics card: NVIDIA GTX 1070TI NVIDIA version: 515.43.04 Gamescope version: (gamescope-git) 3.11.27.r0.ga913f85-3 Distribution: Archlinux
$> gamescope -W 1920 -H 1080 -- glxgears
[2022-05-27 22:41:25.061] [MANGOHUD] [info] [config.cpp:114] skipping config: '/usr/bin/MangoHud.conf' [ not found ] [2022-05-27 22:41:25.061] [MANGOHUD] [info] [config.cpp:114] skipping config: '/home/berto/.config/MangoHud/gamescope.conf' [ not found ] [2022-05-27 22:41:25.061] [MANGOHUD] [info] [config.cpp:119] parsing config: '/home/berto/.config/MangoHud/MangoHud.conf' vulkan: selecting physical device 'NVIDIA GeForce GTX 1070 Ti': queue family 2 vulkan: physical device supports DRM format modifiers [2022-05-27 22:41:25.167] [MANGOHUD] [info] [overlay.cpp:678] Uploading is disabled (permit_upload = 0) vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0) vulkan: supported DRM formats for sampling usage: vulkan: 0x34325241 vulkan: 0x34325258 [1] 7604 segmentation fault (core dumped) gamescope -W 1920 -H 1080 -- glxgears
Try disabling mangohud?
Try disabling mangohud?
Dont think the error message has anything to do with mangohud.
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
515.48 still the same issue on X11, regardless of mangohud.
MANGOHUD=0 gamescope -h 900 -H 1800 -n vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti'
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateFence failed (VkResult: -1)
Failed to initialize Vulkan
Segmentation fault (core dumped)
515.48 still the same issue on X11, regardless of mangohud.
MANGOHUD=0 gamescope -h 900 -H 1800 -n vkcube No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti' vulkan: physical device supports DRM format modifiers vulkan: vkCreateFence failed (VkResult: -1) Failed to initialize Vulkan Segmentation fault (core dumped)
I believe to get past that error you need to use the gamescope-git package, right now. The last comment I saw you make mentioned gamescope 3.11.30-1 but the fixes for NVIDIA were in 3.11.31 Although, I think I had an address boundary error and not just core dumped for the last line. You should also run setcap 'cap_sys_nice=eip' /usr/bin/gamescope .
It's also failing for me:
$ sudo -E setcap 'cap_sys_nice=eip' /usr/bin/gamescope
$ gamescope -r 30 -- glxgears
vulkan: selecting physical device 'NVIDIA GeForce GTX 1080 Ti': 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
gamescope: ../gamescope/src/wlserver.cpp:916: void wlserver_key(uint32_t, bool, uint32_t): Assertion `wlserver.wlr.virtual_keyboard_device != nullptr' failed.
fish: Job 1, 'gamescope -r 30 -- glxgears' terminated by signal SIGABRT (Abort)
Versions:
$ pacman -Q nvidia-dkms
nvidia-dkms 515.48.07-2
$ pacman -Q gamescope-git
gamescope-git 3.11.31.beta6.r0.gb1c3859-1
515.48 still the same issue on X11, regardless of mangohud.
MANGOHUD=0 gamescope -h 900 -H 1800 -n vkcube No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti' vulkan: physical device supports DRM format modifiers vulkan: vkCreateFence failed (VkResult: -1) Failed to initialize Vulkan Segmentation fault (core dumped)
I had this issue too, switching to the gamescope-git version of the package solved the issue.
I have a GTX 1060 6gb and it seems to work.
I suspect this might be a driver issue, but here goes.
❯ pacman -Q nvidia-dkms
nvidia-dkms 515.48.07-2
❯ pacman -Q gamescope-git
gamescope-git 3.11.33.beta1.r1.g1b3ad77-1
❯ gamescope -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
vulkan: selecting physical device 'NVIDIA GeForce RTX 3080 Ti': 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
[1] 45448 segmentation fault (core dumped) gamescope -- vkcube
gamescope-git with mangohud systemwide:
gamescope -h 1080 -H 1800 -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
[2022-06-25 22:42:20.707] [MANGOHUD] [info] [config.cpp:112] skipping config: '/usr/bin/MangoHud.conf' [ not found ]
[2022-06-25 22:42:20.707] [MANGOHUD] [info] [config.cpp:112] skipping config: '/home/hello/.config/MangoHud/gamescope.conf' [ not found ]
[2022-06-25 22:42:20.707] [MANGOHUD] [info] [config.cpp:117] parsing config: '/home/hello/.config/MangoHud/MangoHud.conf'
sh: line 1: glxinfo: command not found
vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti': queue family 2
vulkan: physical device supports DRM format modifiers
[2022-06-25 22:42:20.812] [MANGOHUD] [info] [overlay.cpp:718] Uploading is disabled (permit_upload = 0)
vulkan: vkGetPhysicalDeviceFormatProperties2 returned zero modifiers for DRM format 0x3231564E (VkResult: 0)
vulkan: supported DRM formats for sampling usage:
vulkan: 0x34325241
vulkan: 0x34325258
Segmentation fault (core dumped)
And without mangohud it opens the window and freezes until manually killed:
MANGOHUD=0 gamescope -h 1080 -H 1800 -- vkcube
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
vulkan: selecting physical device 'NVIDIA GeForce RTX 3060 Ti': 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 :1
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x5621380cc860 (res 0x5621380a8420)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 150
Selected GPU 0: NVIDIA GeForce RTX 3060 Ti, type: DiscreteGpu
pipewire: renegotiating stream params (size: 3200x1800)
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x562137e4d270 (res 0x5621380cb470)
pipewire: renegotiating stream params (size: 1920x2128)
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
(EE) failed to read Wayland events: Broken pipe
Killed
It does work in wayland tho.
i got it working under steam but when i use it in terminal it doesnt work No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce GTX 1060' vulkan: physical device supports DRM format modifiers vulkan: vkCreateFence failed (VkResult: -1) Failed to initialize Vulkan
on bottles flatpak i get: No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. vulkan: selecting physical device 'NVIDIA GeForce GTX 1060': 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/server.c:92] Starting Xwayland on :1 wlserver: [types/wlr_surface.c:741] New wlr_surface 0x5617b48b5c70 (res 0x5617b4af30c0) wlserver: [xwayland/server.c:250] Xserver is ready pipewire: pw_context_connect failed Warning: failed to setup PipeWire, screen capture won't be available wineserver: using server-side synchronization. 002c:err:wineboot:process_run_key Error running cmd L"C:\windows\system32\winemenubuilder.exe -r" (2). 00bc:err:xrandr:xrandr14_get_adapters Failed to get adapters 014c:err:ole:com_get_class_object apartment not initialised wlserver: [types/wlr_surface.c:741] New wlr_surface 0x5617b47b8000 (res 0x5617b4b15a30) Error getting buffer xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_ABOVE xwm: Unhandled NET_WM_STATE property change: _NET_WM_STATE_MAXIMIZED_VERT
on lutris its greyed out
running optimus with intel
weirdly enough it runs with ENABLE_VKBASALT=1 i.e.:
ENABLE_VKBASALT=1 gamescope -h 1058 -H 1800 -U vkcube
but it locks cursor inside the window and stutters from time to time
I am seeing the same output as @severinkaderli after removing Optimus Manager from my system. I am on Garuda and just replaced their garuda-optimus-manager-config package with garuda-nvidia-prime-config, and now gamescope refuses to launch with prime-run variables. I compared the two packages and tried to find any other variables, but Optimus Manager seems to be doing something that Gamescope requires to work on my system.
I am seeing the same output as @severinkaderli after removing Optimus Manager from my system. I am on Garuda and just replaced their
garuda-optimus-manager-configpackage withgaruda-nvidia-prime-config, and now gamescope refuses to launch with prime-run variables. I compared the two packages and tried to find any other variables, but Optimus Manager seems to be doing something that Gamescope requires to work on my system.
Optimus setups are a different kind of animal (and they seem to be forgotten by NV). Try the suggested variables setting in #498 I managed to get it working on the nested case.
The referenced variables are set by the prime-run script that I mentioned. Gamescope actually runs through my intel iGPU if I don't set those variables, except for the color corruption referenced in #356, but crashes entirely if I try to run on Nvidia via prime.
Having the same issue on Fedora, but using Wayland. Works fine under X11.
As explained here, I have tried NVIDIA driver 515.57 on Wayland (GNOME 42, GBM backend) with both the latest gamescope git and a specific commit that was said to work. Neither works. I get the "DRM format 0x3231564E" error as everyone else.
https://github.com/Plagman/gamescope/issues/492#issuecomment-1178536432
This is some kind of regression. That exact format was supported by NVIDIA on an earlier gamescope build or earlier NVIDIA driver. Not sure if the regression is in NVIDIA driver or in gamescope.
I've already verified that the modeset flag is set: cat /proc/cmdline | grep nvidia-drm.modeset=1
You can see some other user's log here which shows that the exact format WAS supported in whatever NVIDIA driver and gamescope version they used back then: https://github.com/Plagman/gamescope/issues/492#issuecomment-1140080513 (Or perhaps they were running it on X11 and it's Wayland version that's broken? No idea.)
perhaps they were running it on X11 and it's Wayland version that's broken?
In my case I am trying to run in Wayland, but I have verified that it is broken in X11 (bspwm) as well
On my machine e4892543a04637aa32dfac336762c22cfff880db works but current HEAD ( 3122d1aabec4d8f7df79edb1b76e136c0dd5ffbf ) does not. Running gamescope with perf gives:
git clone https://github.com/Plagman/gamescope --depth=1
cd gamescope
meson build
ninja -C build/
perf record -g -o ~/gamescope.perf --call-graph dwarf,16384 build/gamescope -- glxgears -fullscreen
perf report -i ~/gamescope.perf | head -n 2500 > rpt.txt
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 GTX 1080': 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: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:18] Starting headless backend
wlserver: [xwayland/server.c:92] Starting Xwayland on :1
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x558bf72ea950 (res 0x558bf72e1240)
wlserver: [xwayland/server.c:250] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 266
pipewire: renegotiating stream params (size: 1280x720)
wlserver: [types/wlr_surface.c:741] New wlr_surface 0x558bf72aa4a0 (res 0x558bf72e56c0)
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
pipewire: renegotiating stream params (size: 849x1406)
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
vblankmanager: write failed: Resource temporarily unavailable
vblankmanager: write failed: Resource temporarily unavailable
...
The last line is repeated hundreds of times before I sigterm then sigkill gamescope. The output of the report: rpt.txt