This should be what gets us going with this title.
One of the things I am doing today is testing with this title, so I will grab a copy and do a quick launch test and verify the parameters works. If successfully, I will update the docs to reflect that same games may need the parameters above.
The documentation states the following: In the case of Vulkan it is possible to connect !, in this case only the selected GPU will be made available to the application (e.g.: DRI_PRIME=1!).
DXVK_FILTER_DEVICE_NAME only works on games run via proton. So it doesn’t work for native Linux versions of games. DRI_PRIME=1! should theoretically work for any Vulkan game.
I think this is in line with my experience. The bang ! operator definitely seems to be doing something, as I just tried both Shadow of the Tomb Raider and Remnant II with and without it. Without the operator, it only leverages the iGPU. With it, it correctly leverages the dGPU in both games.
Additionally, this explains why the DXVK_FILTER_DEVICE_NAME works for a game that runs using Proton (Remnant II), but didn’t work for a native game (Shadow of the Tomb Raider).
Fair, fair. Wild, I cannot figure out what bang would be doing. But, if something is working, it’s working. I cannot disagree with that.
Truth - with the prevalence of Windows games pushing proton, I forget about native games - and I do have a few! Yeah, DRI_PRIME=1 %command% would be what I would use.
The docs say that for Vulkan applications, DRI_PRIME=n simply moves device n up to be the first device in the list, while DRI_PRIME=n! hides all other devices and thus forces to use device n.
A Vulkan application usually selects a device by certain capabilities, how exactly the selection process works is up to the programmer. There might e.g. be something about the advertised memory types or color formats or … that the applications prefers about the iGPU (or maybe even llvmpipe). For dxvk, someone might actually look up the responsible code in their github repo. I did try, but the code was far too complex for me …
Matt, if you do a simple text search on the docs available at the link that John Obscurant posted above for an “!” exclamation point (no quotes) you’ll find what you’re looking for. It’s easy to miss.
Apparently, specifying the PRIME=1 just puts that card first in a list that is supplied to the .exe. The exe is still free to pick LLVM_PIPE and run at 1 FPS if it feels like it. Or there’s another bug at play.
By the way, if you’re running a game at, like, 1 FPS, you’re probably on the LLVM_PIPE software emulation. The iGPU is no slouch; it can run a modern game at ~medium settings and medium frame rates.
ETA: The “!” forces the list supplied to the exe to contain only the card you specify. So, no list.
EETA: Just realized I repeated half of what John said in the last post. Imma gonna go take the dog for a walk and get some air.
Yeah, this was my thought as well, but when I force the usage of the iGPU only with DRI_PRIME=0! (after verifying GPU0 is the iGPU), Remnant II still runs with 1FPS. I think this is something specific to this game, as it seems poorly optimized in general. I’m not too worried about it, but would be curious if anyone has further explanation on this.
Hey gang, I’m still having trouble here. I just got my FW 16 from batch 4, and it looks like NVTOP reports the iGPU is working at 100% while the dGPU reports minimal usage when I play games with DRI_PRIME=1 or DRI_PRIME=1!.
My screen shot is taken after I closed a Steam game called Crab Champions, which showed the iGPU at 100% while the dGPU was low. The process names both Graphic and Compute on the GPU in position 0, but it should be 1. This is the command line I’m running from Steam for this game: DRI_PRIME=1! DXVK_FILTER_DEVICE_NAME="AMD Radeon RX 7700S (RADV NAVI33)" mangohud %command%
First of all @Bryson , love the terminal background.
Could you paste the output of the following command? vulkaninfo | grep "GPU[0123]" -A 10
Remember, these lists are 0 based, so if it lists the DGPU 7700S first in the list with index 0, you may want to try DRI_PRIME=0! instead.
I think you may have already tried this, but wanted to double check.
I myself do not have a Framework 16 on order yet, as I’m saving the funds for it. That noted, has anyone here tried GloriousEggroll’s Nobara distro on their Framework 16 with dGPU yet? He’s made a bunch of changes in there for GPU switching so I’m wondering if the DRI_PRIME issue was also resolved: https://nobaraproject.org/
For reference, the framework dgpu utility only looks for the environment variable, not if it has had any effect (based on the sourcecode last time I checked). Also I seem to remember reading that DRI_PRIME was only for OpenGL applications (with vulkan allowing applications to select the gpu themselves)
You know, I think I misread this information from nvtop. After a little more digging it seems like this is expected behavior. I’m seeing that the dGPU is in fact ‘in use’ because there’s activity, number one, and that there is another version of the same process running directly on the dGPU (at dev 1) farther down in the list. Still, here’s the output you requested:
the mesa documentation (linked by matt_hartley above) indicates this applies for both opengl and vulkan applications. sure, without the ! it’s just putting the preferred device at the top of the list of devices, and a vulkan app CAN select a different device if it insists, but with !only the preferred device should be presented to the vulkan app. any other behavior indicates a severe bug in either the documentation or the implementation.
Following the instructions in the Linux Guide by FW and the tips in this thread, I would have to use DRI_PRIME=0 DXVK_FILTER_DEVICE_NAME="AMD Radeon RX 7700S (RADV NAVI33)" %command% for Steam Games and, in case of other applications, omit the %.
But in fact, it seems that the dGPU is addressed by DRI_PRIME=1. When starting Heaven benchmark from the terminal, I would get 25ish FPS using DRI_PRIME=0. If I use DRI_PRIME=1 instead, I get 120 to 130 FPS.
While most games on steam (native or not) don’t care about this and no matter if I specify DRI_PRIME=1, DRI_PRIME=0, with or without exclamation mark or string, or if I completely omit launch options. At least steam’s FPS counter and radeontop’s output indicate that.
Some games that seem to not care are:
Doom (2016) and Doom Eternal (both through Proton)
Shadow of the Tomb Raider (native)
Hollow Knight (native)
Euro Truck Simulator 2 (native)
CS2 (native)
One game that does care about if I specify the dGPU is Deponia (through Proton).
I am confused about this inconsistency. Am I doing something wrong?
Some questions now:
Why could it be that my dGPU is GPU0 while for everyone else it is GPU1?
Why do some games ignore the launch options, while others do not and use the dGPU anyway? Is it because it is the first in the list when querying vulkaninfo? Isn’t that in conflict with 1.?