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

Still Failed to create Vulkan device, vr -3 on Ampere #500

Closed
RoyShapiro opened this issue Feb 9, 2021 · 8 comments
Closed

Still Failed to create Vulkan device, vr -3 on Ampere #500

RoyShapiro opened this issue Feb 9, 2021 · 8 comments

Comments

@RoyShapiro
Copy link

Hello again.
This is in continuation of #488.
Nvidia driver 455.50.05 was supposed to fix the err:vkd3d_create_vk_device: Failed to create Vulkan device, vr -3 error on Ampere GPUs, namely RTX 3090.
However, with that driver on a freshly booted \ rebooted system, the problem persists in all D3D12 apps and games that use vkd3d-proton, this time regardless of whether they are run with or without Steam Runtime, that caused the problem previously.

Wine \ proton version, settings, as well as vkd3d-proton build, if it is a post-b4bc927 build, do not seem to fix the issue.

However, for some extremely weird and peculiar reason, if a vkd3d-proton test suite is natively built by doing the following:

meson -Denable_tests=true build
cd build
ninja

and then run at any time after system boot using:
./tests/d3d12

The problem goes away, and stays gone (everything works) until the next reboot, whereby it reappears and stays until ./tests/d3d12 (output attached output.txt) is run again.

It would seem as if running d3d12 native test somehow affects certain values in memory, that cause the issue to go away.
This is extremely weird and unexpected behavior. Not sure if it is a driver issue or vkd3d-proton's, since running that test works as a reliable workaround for an unknown reason.

Same system, software and hardware config as in #488, except the driver which is 455.50.05.

Originally posted by @RoyShapiro in #488 (comment)

@liam-middlebrook Liam, tagging you, since this may have to do with the driver, pardon for any inconvenience.

P.S. Sorry for opening a duplicate issue, the previous one got Closed before I could fully test the proposed solution and I couldn't reopen it. I'm relatively new to GitHub and don't know how visible the comments on the Closed issues are.

@HansKristian-Work
Copy link
Owner

I think for the next release we'll just need to temporarily disable RT extensions altogether.

@RoyShapiro
Copy link
Author

RoyShapiro commented Feb 12, 2021 via email

@liam-middlebrook
Copy link
Contributor

Just to confirm you’re only seeing this vkCreateDevice() failure on first launch with Proton/WINE, right?

Could you grab NVIDIA bug report logs for the following states?

  1. After a fresh reboot without playing any games
  2. After launching a game which uses vkd3d-proton (the version that has Ray Tracing extensions enabled)
  3. After launching a native application which uses the Vulkan Ray Tracing extensions (either vkd3d-proton tests or Quake II RTX should do)
  4. Repeat step 2

Either attach the logs here or in an email to linux-bugs [at] nvidia.com

@RoyShapiro
Copy link
Author

RoyShapiro commented Feb 15, 2021 via email

@liam-middlebrook
Copy link
Contributor

Thanks Roy. From the logs you attached it looks like the nvidia_uvm.ko kernel module is not being loaded properly. This kernel module is a requirement for a few different driver features. I was able to also confirm this behavior when running Quake II RTX using the Steam Linux Runtime (SLR) compatibility tool, in addition to Proton 5.13, and Proton Experimental.

I believe changes will need to be made to the SLR in order to include /usr/bin/nvidia-modprobe which is a helper binary included with the driver to allow as-needed loading of some of our kernel modules. In the meantime, I suggest running sudo modprobe nvidia_uvm before trying to launch any Vulkan application which will make use of the NVIDIA or Khronos Ray Tracing extensions. From the logs you sent me it appears that you may have nvidia.ko, nvidia_modeset.ko, and nvidia-drm.ko included in your initramfs, so you may want to also include nvidia_uvm.ko there in order to avoid having to manually load it, at least until SLR is able to complete the Vulkan driver's call to nvidia-modprobe.

@RoyShapiro
Copy link
Author

RoyShapiro commented Feb 17, 2021 via email

@RoyShapiro
Copy link
Author

With drivers version 470.57.02 the current correct (and simplest) solution is to run
nvidia-modprobe -u -c=0 (add sudo as needed)
at DE launch time (can be automated by putting it in a script set to autorun), as mentioned here:
#711 (comment)
by Hans-Kristian.

Since this solution has already been mentioned in several other issues, I'm closing this one.

@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

4 participants