As described in the title; with NV prime render offload (
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json) those two games has abysmal performance and sharpness issues with my NV dgpu ( GTX 1050 4 GB ) while my igpu ( Intel HD 630 ) runs them flawlessly. Both games are relying on web based solutions as can be seen on SteamDB.
Launch Steam with
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json, test the games mentioned here on NV dgpu.
After that go to Library on Steam, right click to game, Properties, Launch options:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=mesa VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json %command% to test games with Intel igpu.
Game specific notes:
Vampire Survivors needs user to opt-in to Public Beta. Right click to game on Library, Properties, Betas. Opt-in to Public Beta there.
On the case of CrossCode even loading screen at the beginning of the game is painfully slow compared to when game runs on igpu.
Relevant issues for both games when they are on NV dgpu:
- Incredibly bad performance
- All around much blurrier experience compared to igpu
NV bug report sh output:
nvidia-bug-report.log.gz (1.1 MB)
You’re using the intel driver instead of modesetting for the igpu. I don’t think that’s really recommendable.
That has no effect on this issue in fact. As other apps ( demanding 3D games ) just works at full speed.
Does the game process appear as a graphics client in the list produced by ‘
nvidia-smi pmon’ when you click to launch and play the game in Steam? In the list there will be some Steam clients there, initially connected, but you should expect to see the game’s own executable appear in the client list as well.
Nope, they don’t appear. Specifially those two games does it, other games are successfully running on dgpu and gets their processes listed in
Euro Truck Simulator 2 ( one of the other hundreds of games that works on dgpu normally) :
I have filed a bug 3799151 internally for tracking purpose, shall keep you updated on progress.
Thanks for the screenshots. These games fall back to software rendering which explains the subpar performance. This is why you didn’t see the game process listed as an NVIDIA graphics client in your screenshots.
I’ve been looking at CrossCode which at least seems to be using a Chromium based web engine for rendering and the reason for falling back to software rendering is likely related to that. For example, in 2021, Chromium had known problems finding accelerated NVIDIA drivers under PRIME Render Offload due to strict sandboxing preventing access to some shared libraries. This was fixed, with the final patch going into Chromium source tree in late June 2021.
I have no visibility into CrossCode but maybe the game internally uses (or ends up using externally?) an older Chromium engine that does not have this fix. It’s also possible there are other restrictions (from the execution environment, Chromium, Steam, or something else) limiting what libraries and files the game engine can access. Nevertheless, the end result is that the game does not seem to find NVIDIA userspace drivers for PRIME Render Offload and then fails to initialize OpenGL/Vulkan accelerated graphics.
Based on the data I have so far I can’t tell where the root cause to this lies but it might be a good start to inform the game developer about this so as to at least let them make sure they’ve got this use case covered in their testing.
Fwiw i’ve tried to reach both devs explaining the problem and linking this thread but they don’t respond in any way whatsoever. So i think there is nothing left to do, those apps won’t work on Prime setups.
i have had somewhat similiar issue its on wayland however. ive made a issue at proton for it. proton doesnt run on nvidia dgpu with prime · Issue #558 · ValveSoftware/steam-runtime · GitHub because essentially i could make it work again by doing this Steam/Troubleshooting - ArchWiki
at the top of the file
now im not sure what kind of regression this makes or not but atleast it made my games run again on the nvidia dgpu.
i guess also assumes its not a native linux game. you are trying to run.
- Vampire Survivors needs user to opt-in to Public Beta. Right click to game on Library, Properties, Betas. Opt-in to Public Beta there.
I’ve actually mentioned that in the post. Linux native build is in Public Beta branch. That is what i use.
So your issue and mine are not the same.
yeah true, however i own vampire survivors opted in beta and i manage to get it to list in nvidia-smi. and run on the dgpu. i do however also as mentioned in that bugreport export a bunch more envvars through a prime-run script to forcefully only let things see my nvidia dpgu.
see if any of those makes it run on the nvidia gpu. and make sure the .json files actually exist in those dirs.