Closed OJ2024 closed 8 months ago
OK, I've run this down. It's setting the __NV_PRIME_RENDER_OFFLOAD env-var, which also causes games to crash (for me). This used to be gated behind the "prime" option that was off by default.
I've restored this option in a consolidated form- one switch ("Use discrete graphics") activates NVidia and not-NVidia prime modes, and chooses based on your GPU choice. ("Auto" won't work- it will warn if you try. It needs to know the GPU to know how to activate this stuff).
The option is again off by default, and it's an advanced option now.
@OJ2024, do download a new master and run the bin/lutris script (no need to install). If this option is off, do you still have the error?
On reflection, I've cut this option down to 'Enable NVIDIA Prime Render Offload'- it really just enables that crashy env-var only now. Should still work for you, I expect.
Sorry, @strycore has asked I revert these changes. We're back to where we were. We'll have to find some other way to avoid this crash.
In any case, if you have only a single GPU, Auto should work.
If the GPU is left on Auto, the battle.net launcher renders correctly
Why don't you leave it on Auto then.
The crash isn't real.
It's not every game. Amid Evil fails, Batman: Arkham City does not.
Interesting- Amid Evil fails only with the -dx12 option. Maybe an RTX thing?
So solution is leave it on Auto - close this then?
the solution is to not let people set anything other than auto if there's only 1 GPU
Can't we just do "condition": len(GPUs)>2
? Seems like this should be simple.
yes, it's that simple.
I would also consider not adding the options that fail the condition to the GUI instead of having them grayed out.
I'll go ahead and put the "condition" in.
It may be better just to do that- if the control is grayed out, then the "reset" button can be used in case a stale, bad setting is found in there. Though that should only happen to git-master users, I think.
OK, it's in. @OJ2024, you'll need to reset back to Auto, but the setting's reset button should allow you to do this.
then the "reset" button can be used in case a stale, bad setting
That should not be a possibility. Any option that has a condition should check twice, once for enabling the option in the GUI and once when applying the option when running a game. If an option doesn't do that, it's broken.
And you don't want it to even be possible to correct the config?
I find you quite inscrutable.
It shouldn't matter what the config is. If the option doesn't fulfill the condition, it should never be applied. It is not up to the user to fix anything, Lutris should do the correct thing by default.
I'll put the checks in, but I think this is a fragile approach.
how is that fragile? it's the complete opposite, it's a lot more robust that other alternatives and letting users completely mess up their installs.
Multi-gpu - auto fails when launching World of Warcraft from the launcher, but battle.net client is displayed as normal set the gpu to nvidia, and the battle.net launcher does not render gpu is greyed out on single gpu system
You are relying on me getting this right- not missing a check.
Allowing the users to fix the config provides an option for them if I do not get this right. Sure I should revert that, so they can't fix their configs?
@OJ2024, it sounds like the "NVidia" setting would not work for World of Warcraft because you could not use the launcher. Is that right?
correct - I expect if I could see the launcher and could launch WoW, it would actually run just check with 0.5.16 on this same setup with nvidia explicitly selected as the vulkan ICD loader and it runs
Ghostwire Tokyo through EGS runs multi-gpu set to auto
Right- 0.5.16 has the complicated business with four different settings; the right combination can make this work. But I also agree with @strycore that that was a mess and a simpler GPU selection was needed.
I think the work-around for WoW might just be setting the env-vars directly. Not sure what you need here- maybe DRI_PRIME=1
would be enough?
If that won't do, maybe adding VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json
as well might do it.
Allowing the users to fix the config provides an option for them if I do not get this right. Sure I should revert that, so they can't fix their configs?
Lutris is meant for gamers, not computer engineers, they shouldn't even have the concept of "fixing" their config because Lutris should never have a broken config to begin with.
On the other hand, you are a computer engineer and it's your role to not mess this up.
You think I don't write bugs? Really?
It's not up to the users to fix bugs, especially not when they are using lutris and trying to play games. I'm not asking for the moon, I'm just asking to check options with conditions twice like Santa Claus and his list.
We're not writing software with the preconception of it having bugs and having ways to workaround bugs in the UI.
If you really believe demanding perfection of me will work, then you can revert commit 6425cea. That's the one that allows resetting disabled options. Your call.
Well tried all those options - plus everything else I can think of - same X Error of failed request: BadMatch (invalid parameter attributes) with all combinations - OW2 won't launch either. I was also testing EGS - on Auto it runs on the igpu, set to nvidia it also gives the X error and black screen
If you really believe demanding perfection of me will work
I expect anyone contributing code to Lutris to push code that works. I'm not sure if it has to be perfect but it should at the very least not have known issues.
you can revert commit https://github.com/lutris/lutris/commit/6425cea19dcfaf1296345f7f757a4e03c9b12865. That's the one that allows resetting disabled options
I didn't say anything about resetting options. I said we should check options with condition twice and possibly not display the option at all.
@OJ2024 how many GPUs do you have?
What GPUs do you have?
1 AMD 6700 xt 1 nvidia 4070 ti 7700x or 7800x3D igpu 2 separate systems
I have a 7800X3D as well but the iGPU is disabled. Should I enable it and put myself in a tri-GPU type of situation?
X error
are you not running Wayland?
Oh, that's a good point. This Prime offload stuff works differently on Wayland I read; and I'm running X11 right now also so that may be why it won't repro for you.
I should see if I can repro on Wayland.
Can easily switch to wayland - brb
That's it; it works just fine on Wayland. I should have thought of that!
Yeah can confirm here it runs fine on Wayland
Hilarious. An X11 bug with an easy workaround in at least most cases. :shrug:
It's 2024 and there are less and less reasons to run Xorg. As time passes, I have more and more things breaking with Xorg which is why I've permanently switched to Wayland.
Sure, Lutris crashes a lot more, but this forces us to fix our code which was bad to begin with.
We need to support X11 still.
You can condemn your own code for not responding quickly every single time, and you can try to mitigate that - but you are the exception here. Other software will just crash on Wayland.
And that will keep many users on X11 until it gets fixed in some more serious way.
GPU field on preferences -> global options -> enable Advanced was set to match the gpu and not left on Auto. Confirm on system options tab for battle.net that the value was set correctly. Launch battle,net and the battle.net launcher is a black window.
Normal launch output with 0.5.16 (nvidia proprietary set as the vulkan ICD loader):
output running git:
This would happen in 0.5.16 if the vulkan ICD loader was not correctly selected or left on unspecified
If the GPU is left on Auto, the battle.net launcher renders correctly