Hi, I’ve been banging my head against a wall for a while now, and I don’t know who to contact, so I’m trying these forums since I’m on NixOS.
I have a hybrid GPU laptop (a System76 Serval WS) with an i9 14900 HX and an RTX 4070. Steam games are not using my NVIDIA card (which I’ll call the dGPU). I have an incredibly poor internet connection so I can’t download games reliably, so I’m testing Animal Well and Quake II RTX because they are both small-ish and GPU-heavy.
Both vkcube and (using nvidia-offload) glxgears run successfully using the dGPU.
Running Animal Well via nvidia-offload wine64 Animal\ Well.exe works, and it runs on the dGPU
It’s not a hardware problem. I installed Windows and tried the same games with the latest drivers and things worked without a hitch.
I’ve had this problem on other distros too. Pop! didn’t work from a fresh install either.
All Steam games I tested with crash with a Vulkan or DX12 initialization error.
Adding nvidia-offload %command% to the launch options changes nothing.
Proton Hotfix, Experimental, and 9 all don’t work, and neither does the Steam Linux Runtime (for Quake II RTX).
My current working theory is that there is either a bug in the drivers or a bug in Steam. I know that because of that, this forum may not be the best place to put my issue, but I figure that I’m running NixOS so it’s a starting point.
I can post my entire configuration.nix if requested, but I would imagine these are the important parts:
I don’t think it’s a bug. What the nvidia-offload script does is set some environment variables. Using it inside the steam command override probably doesn’t work because steam is in a special sandbox, it likely just fails to run the script correctly.
Have you tried starting steam itself with nvidia-offload? That should propagate the variables correctly for steam games to then pick them up.
If you assert that works, we can either make it permanent by editing the steam desktop file, or set the environment variables directly in all your steam command overrides if you really want to run steam on the iGPU (very reasonable desire if you’d like to use big picture mode).
Also, props, I think you’re the first person I’ve seen with a reasonable nvidia config. Note that finegrained probably doesn’t actually work at the moment though: Nvidia never suspends - #2 by TLATER
That’s normal, steam tries to load the gameoverlay so for a bunch of architectures in sequence until it hits the correct one for your system.
I haven’t seen this, but that would be game-specific, and has nothing to do with where steam renders.
I’m intrigued, but can’t provide much further support. Personally I’d double check with nvidia-smi if anything ends up on the nvidia GPU if I start steam with the env variables set.
My best guess is that this is a regression in some of the launch scripts, maybe one of them overrides the env vars. Just gotta figure out a way to hook into all of them and see their environments.
Thanks for the help. I still think it’s an upstream bug, most likely with steam. Running Quake II RTX gives me a specific point-of-failure. Running VK_LOADER_DEBUG=all nvidia-offload steam-run ./q2rtx (using the native version, not the Proton version) gives the following error in the console:
Right, yep, I skimmed past the bit where you said the applications flat out crash. I’m not sure I would point at an upstream bug here, steam games work for most people AIUI.
The particular error message you get seems to turn up in a lot of driver-related issues in the proton repo, usually resolved by messing with installed packages on other distros. Not likely to affect you, of course, but it makes me wonder if the wrong set of shared libraries is being picked up for the GPU being rendered to. This would be a NixOS bug.
I spun up a fresh Pop!_OS install and confirmed that the issue is reproducible. I believe this is a bug with Steam, so I will contact Steam support or make an issue in Proton.