Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

err:vkd3d_create_vk_device: Failed to create Vulkan device, vr -3 on RTX 3090 #488

Closed
RoyShapiro opened this issue Jan 28, 2021 · 14 comments

Comments

@RoyShapiro
Copy link

Hi!
"First world" problems here.
After the D3D12 Ultimate FL update (specifically vkd3d-proton built from commit b4bc927), I get error:
160:err:vkd3d_create_vk_device: Failed to create Vulkan device, vr -3.
On all D3D12 games (tried Cyberpunk, Serious Sam 4, Resident Evils), and they all fail to start. First number, 160, is different for each game and can be 244, e.t.c.
Running the following:
Software:
Debian 10 Buster, Kernel 5.10.11-xanmod1 (tried 5.9, same story)
NVidia Driver 455.50.04 (started with 455.46.02, same story)
Vulkan Loader 1.2.166 (started with 1.2.162, same story)
Proton 5.13 or current Proton Experimental (neither works).
Hardware:
AMD Ryzen Threadripper 1920X,
64Gb RAM 3000 Mhz,
Inno3D iChill X3 GeForce RTX 3090.
All games I've tried work fine if I rollback to Vkd3d-Proton v.2.1 official release package dll. The problem starts with this newest commit build.
Not posting any specific logs yet, because it affects all D3D12 games equally, and the rollback also works for all of them.
Any advice?

@doitsujin
Copy link
Collaborator

Can't reproduce on Turing (RTX 2060) or any AMD hardware.

This is the second time someone reports this on an Ampere GPU though. Apparently the Nvidia driver just refuses to work on those cards when we enable the raytracing extensions.

@RoyShapiro
Copy link
Author

RoyShapiro commented Jan 28, 2021 via email

@doitsujin
Copy link
Collaborator

Can you test if #489 fixes the problem?

@RoyShapiro
Copy link
Author

@doitsujin Alas, no dice. Same exact error.

@liam-middlebrook
Copy link
Contributor

Roy, could you run /usr/bin/nvidia-bug-report.sh and either post the log.gz file it generates here or in an email to linux-bugs [at] nvidia.com (and mention this issue in the email)?

@RoyShapiro
Copy link
Author

RoyShapiro commented Jan 28, 2021

@liam-middlebrook Sure. Here.
Link removed.

@doitsujin
Copy link
Collaborator

Can you test if the following works:

meson -Denable_tests=true build
cd build
ninja
./tests/d3d12

This builds vkd3d-proton and our test suite as a native Linux binary, thus bypassing winevulkan. Would be strange if that was the issue, but if it spews a lot of messages about failing to create a device as well, we at least know for sure it's not that.

@RoyShapiro
Copy link
Author

RoyShapiro commented Jan 29, 2021

Yep. Did it. Got segfault running said test. Full output to console attached.
output.txt
Since I usually compile the project as a Windows DLL (and hence using MinGW64 on a virtual machine), and this time around I built it on bare metal (so it built natively), I could've missed something important. For instance, I did not explicitly install or built glslang compiler. However, there were no build errors, so it is either already present (installed as a dependency by something or another) or it didn't explicitly tell me, that I'm doing something dumb. If this is the issue, let me know, I'll see what I can do.

Note: The log contains a lot of missing VK_VALVE_mutable_descriptor_type, isn't this that feature that Mesa supports, yet Nvidia driver doesn't yet? I've managed to play Cyberpunk without it's support after patch 1.05 (which seemed to fix most of the related errors in the game itself, though clearly not all).

@doitsujin
Copy link
Collaborator

It succeeds at creating a device though, so that's... interesting.

@liam-middlebrook
Copy link
Contributor

liam-middlebrook commented Jan 29, 2021

The above datapoint for a native Linux vkd3d-proton matches my findings so far (minus the bit about the segfault). This issue isn't vkd3d-proton or Proton specific, I was able to reproduce it with Quake II RTX, both when running through Proton as well as the Steam Linux Runtime (more details below).

The difference here that is specific to NVIDIA Ampere GPUs as opposed to older GPU generations is the backend the driver will use as part of Ray Tracing operations. In the failing case this newer backend isn't being loaded properly. From my experimentation it seems that this issue is isolated to the Steam Linux Runtime, which Proton 5.13 and above are built on top of.

Since it seems like this may be blocking you from enjoying your games, one thing you could do is to use a custom Proton build (like a TK-Glitche variant) which doesn't make use of the Steam Linux Runtime, or I believe there are some shell script edits that people have done in the past back when the new runtime had issues with Vulkan layers like MangoHUD.

I've been in contact with some folks who work on the Steam Linux Runtime to better understand the issue here. It's still unknown as of now whether the bug is in the driver or the runtime, but from my understanding this issue should not effect applications which are not making use of the runtime. I'll share more information here once it is available.

@RoyShapiro
Copy link
Author

RoyShapiro commented Jan 29, 2021

@doitsujin @liam-middlebrook Liam, you were correct, when run without the Steam \ Lutris runtime, it works fine.

DXR is still disabled, I see. I will admit, after Liam's advice worked, I tried enabling it on my own risk by editing device.c, it shows in the menu, but just crashes the game afterwards (tried it on Cyberpunk by setting reported tier to TIER_1_0 - sorry, my bad, got impatient), so I've re-disabled it for now.

B.t.w., Liam, thanks for the detailed explanation of the issue at hand. It's nice to know how all of this works under the hood. Knowing that makes finding solutions to issues a lot easier.

@liam-middlebrook
Copy link
Contributor

NVIDIA Vulkan Developer Beta driver release 455.50.05 contains a fix for this issue.

@RoyShapiro
Copy link
Author

RoyShapiro commented Feb 5, 2021

@liam-middlebrook Thanks.
To anyone reading this issue, it's important to note, that in order for this to work, it is necessary to not only update the drivers but to also rebuild vkd3d-proton using the latest commits. For me 51bf939 worked.

Pardon, this wasn't the cause of it starting to work. Something weird is going on here. Please, read #500 .

@memeruiz
Copy link

memeruiz commented Aug 5, 2023

Another reason to get this error is to not have libnvidia-rtcore libnvoptix1 packages in debian (possibly also Ubuntu).

They give raytracing support to Nvidia in Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants