gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Gamescope doesn't work with my dGPU in NVIDIA PRIME setup

Open dCo3lh0 opened this issue 1 year ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • [X] The issue occurs on upstream gamescope without any modifications

Current Behavior

I'm trying to use my dGPU with NVIDIA Prime setup to play games in wayland on wine and gamescope and i can only use the integrated graphics setup from my Ryzen the iGPU, i cant use my dGPU to play at all. Its "On Demand" Mode, i don't know if it can help.

Steps To Reproduce

  1. Start Game
  2. Doesn't start at all
  3. See logs.

Hardware information

- Distro: Tuxedo OS 4 (Based on Ubuntu 24.04)
- CPU: AMD Ryzen 7 5700G with Radeon Graphics
- GPU: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A]
- Driver Version: Mesa 24.2.7-1~24.04-tux1 and NVIDIA 560.35.03

Software information

- Desktop environment: KDE 6.2.3
- Session type: wayland
- Gamescope version: 3.15.9-23-gd317492
- Gamescope launch command(s): gamescope --prefer-vk-device 10de:1f08 -w 1920 -h 1080 -W 1920 -H 1080 -r 60 -b --mangoapp -F fsr --fsr-sharpness 10 -- /home/dco3lh0/.local/share/lutris/runners/wine/wine-ge-8-26-x86_64/bin/wine /mnt/Arquivos/Games/Lutris/gog/star-wars-episode-i-racer/drive_c/GOG Games/STAR WARS Racer/SWEP1RCR.EXE

Which gamescope backends have the issue you are reporting?

  • [X] Wayland (default for nested gamescope)
  • [ ] DRM (default for embedded gamescope, i.e. gamescope-session)
  • [ ] SDL
  • [ ] OpenVR

Logging, screenshots, or anything else

Lutris.log Heroic.log

dCo3lh0 avatar Nov 29 '24 14:11 dCo3lh0

Based on your logs: Duplicate of #1590?

tskaar avatar Dec 05 '24 09:12 tskaar

GBM_BACKEND=nvidia-drm

try to use this env before gamescope

GBM_BACKEND=nvidia-drm gamescope -- vkcube should work

Syntist avatar Jan 06 '25 20:01 Syntist

GBM_BACKEND=nvidia-drm

try to use this env before gamescope

GBM_BACKEND=nvidia-drm gamescope -- vkcube should work

You're using vkcube as example, for vkcube and some other applications it works, mostly everything works, except for wine and proton.

dCo3lh0 avatar Jan 08 '25 06:01 dCo3lh0

@dCo3lh0 weird, cause for me that was the issue, after that everything works for me except HDR On dx12 titles, where the display goes black and audio still there.

Did you try games on steam with, like this

GBM_BACKEND=nvidia-drm gamescope -w 2560 -h 1440 -f -r 165 --force-grab-cursor --adaptive-sync -- game-performance %command% cause if your vkcube is working now, this should also work, also try to get the logs when you run the game using that command on steam. (using Proton-cachyos here)

Edit: On Lutris? you might need to add this in your envirnment variable and also GBM_BACKEND=nvidia-drm

try to put GPU to default image

please try, let me know i had the same issue.

Syntist avatar Jan 08 '25 06:01 Syntist

tried to put gpu on default, didnt work, used the GBM_BACKEND=nvidia-drm variable, together, didn't work either, but i've looked on the issue #1669 and did what KennyDevT suggested of using this fork using the latest branch and used separately the variable SDL_VIDEODRIVER=x11 with gamescope --backend sdl and none of this with GBM_BACKEND, and it didn't work either but at least the response message changed, the log changed so I'm anexing here the log.

lutris2.log

dCo3lh0 avatar Jan 08 '25 07:01 dCo3lh0

anyways, i think the issue may be solved in the release 3.16.2, so i will wait, will do other stuff, here beginning the year and i will come back later.

dCo3lh0 avatar Jan 08 '25 07:01 dCo3lh0

in fact, now that i've reinstalled the 3.16.1 again, and used GBM_BACKEND, this same result on the log happened, so i think the variable really worked, it changed the issue, but it worked, it wasn't the fork gamescope.

dCo3lh0 avatar Jan 08 '25 07:01 dCo3lh0

Glad, also i found it some new finding, cause I was having issue with HDR with dx12 titles you can look into it for more details there. Issue: https://github.com/ValveSoftware/gamescope/issues/1699

Syntist avatar Jan 08 '25 08:01 Syntist

looking at the other posts i found it here, talking about the same issue on the last log i shared above, i think the issue will really be solved on 3.16.2. as showed in this issue here #1218

dCo3lh0 avatar Jan 08 '25 22:01 dCo3lh0

tried to put gpu on default, didnt work, used the GBM_BACKEND=nvidia-drm variable, together, didn't work either, but i've looked on the issue #1669 and did what KennyDevT suggested of using this fork using the latest branch and used separately the variable SDL_VIDEODRIVER=x11 with gamescope --backend sdl and none of this with GBM_BACKEND, and it didn't work either but at least the response message changed, the log changed so I'm anexing here the log.

Sorry about that, i recommended that fork but it didn't have all the necessary fixes, but yeah just wait for 3.16.2 since it does contain the fixes

KennyDevT avatar Jan 10 '25 23:01 KennyDevT

gamescope-git seems to work with variable SDL_VIDEODRIVER=x11 and --backend sdl on an RTX 3060 laptop.

EDIT: Trying it out on Horizon Zero Dawn causes stuttering and -r 60 option seems to be ignored. And causes quite bad stutters.

checkinindza avatar Jan 19 '25 14:01 checkinindza

gamescope-git seems to work with variable SDL_VIDEODRIVER=x11 and --backend sdl on an RTX 3060 laptop.

EDIT: Trying it out on Horizon Zero Dawn causes stuttering and -r 60 option seems to be ignored. And causes quite bad stutters.

Using these parameters gives me this error here that as i mentioned before

gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.

Without these parameters it gives me

Exit with return code 6

as mentioned in the first post i did at the top. Good to know at least its working for you but not ready yet. Which nvidia drivers are you using? 560? 565?

dCo3lh0 avatar Jan 21 '25 20:01 dCo3lh0