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

NVidia 535.x VK_ERROR_INITIALIZATION_FAILED on Debian #2787

Open
davidsl118 opened this issue Aug 23, 2024 · 46 comments
Open

NVidia 535.x VK_ERROR_INITIALIZATION_FAILED on Debian #2787

davidsl118 opened this issue Aug 23, 2024 · 46 comments
Assignees

Comments

@davidsl118
Copy link

Dota failing to launch after the most recent update (Major update with compendium)

DotaVulkanIssue

@davidsl118 davidsl118 changed the title Failed to initialize Vulkan [Linux] Failed to initialize Vulkan Aug 23, 2024
@kisak-valve
Copy link
Member

Hello @davidsl118, please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.

@davidsl118
Copy link
Author

Diagnostic gist

@kagmole
Copy link

kagmole commented Aug 24, 2024

Same issue here on Debian Unstable.
It looks like it's trying to start on the integrated graphics and not the discrete graphic card.

@TormenTeDx
Copy link

Same here... Debian (bookworm), can't start the game since the ringmaster update...

@pavel-garmatyuk
Copy link

Similar problem, after updates there is no initialization of Vulcan, then it crashes with an error
2024-08-23_16-18

@TormenTeDx
Copy link

any workaround for this?

@kagmole
Copy link

kagmole commented Aug 30, 2024

I tried some solutions like DRI_PRIME=1 %command% or using Proton but no chance.
Looks like it's not working right now with Proton as well : https://www.protondb.com/app/570#EtQd9pA3uB

@TormenTeDx
Copy link

I tried with proton too, I have the same problem. It opens for like 5-10 seconds and then closes

@TTimo
Copy link
Collaborator

TTimo commented Aug 30, 2024

There was a problem earlier this week which could cause a system crash running out of descriptors shortly after startup. This has been fixed now, and OP's report is a different issue.

If you are not crashing on startup with a Failed to initialize Vulkan error, please consider opening a separate issue.

@davidsl118 can you go through the following steps to help diagnosing this:

  • Set a launch option of -consolelog $HOME/.steam/steam/logs/dota2.log on Dota 2, e.g.
    30ed3284236a574342815425e3191dd0
  • Attempt to launch to reproduce the Vulkan init error again
  • Send in your logs, which you can grab by running tar -zcvf ~/Desktop/steam-logs.tar.gz ~/.steam/steam/logs

@kagmole
Copy link

kagmole commented Aug 31, 2024

I ain't davids118 but here goes my own logs:

08/31 09:33:20 [RenderSystem] Loaded video settings config from 'cfg/video.txt'
08/31 09:33:20 [RenderSystem] vkCreateDevice failed with error VK_ERROR_INITIALIZATION_FAILED, unable to create Vulkan device.

@TormenTeDx
Copy link

TormenTeDx commented Aug 31, 2024

Same here
[logs]$ cat dota2.log
08/31 12:14:08 [RenderSystem] Loaded video settings config from 'cfg/video.txt' 08/31 12:14:08 [RenderSystem] vkCreateDevice failed with error VK_ERROR_INITIALIZATION_FAILED, unable to create Vulkan device.

@kagmole
Copy link

kagmole commented Aug 31, 2024

Tried to remove the file cfg/video.txt and launch (bad config maybe?) but it still doesn't work.

@TTimo
Copy link
Collaborator

TTimo commented Aug 31, 2024

Thanks but I would prefer to look at the entire set of logs, not just the error line.

@TormenTeDx
Copy link

TormenTeDx commented Aug 31, 2024

Here I zipped all logs.
steam-logs.tar.gz

@TormenTeDx
Copy link

TormenTeDx commented Aug 31, 2024

@kagmole You should just run tar -zcvf ~/Desktop/steam-logs.tar.gz ~/.steam/steam/logs to grab all the logs

@kagmole
Copy link

kagmole commented Aug 31, 2024

And here's mine. Removed all files from logs then did a Steam launch and Dota 2 launch.
steam-logs.tar.gz

@kagmole
Copy link

kagmole commented Sep 1, 2024

Tried to disable the iGPU (dGPU only) in the UEFI settings but no chance. :)

@davidsl118
Copy link
Author

@TTimo Here are the compressed logs.
steam-logs.tar.gz

@TTimo
Copy link
Collaborator

TTimo commented Sep 7, 2024

Thanks @davidsl118, I appreciate your patience. The logs didn't reveal anything unfortunately.

It looks like you are on an Optimus laptop, so let's try a few things:

  • Try to run vkcube in the sniper runtime and validate that it initializes over the eGPU (your nvidia card):
    __NV_PRIME_RENDER_OFFLOAD=1 ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper -- vkcube

On my Optimus system this reports Selected GPU 0: NVIDIA GeForce RTX 4060 Laptop GPU, type: DiscreteGpu indicating it picked the eGPU over the iGPU.

If you don't specify the __NV_PRIME_RENDER_OFFLOAD=1 I expect it'll report your software vulkan backend instead (llvmpipe).

  • If this works, you can try to launch dota directly from the terminal like this (while the steam client is running):
timo@eta-carinae ~/.s/s/s/c/dota 2 beta> cd ~/.steam/steam/steamapps/common/dota\ 2\ beta/game/
timo@eta-carinae ~/.s/s/s/c/d/game> __NV_PRIME_RENDER_OFFLOAD=1 ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper -- ./dota.sh

You can find more information about Optimus at https://wiki.debian.org/NVIDIA%20Optimus

@kagmole
Copy link

kagmole commented Sep 7, 2024

The Steam Linux runtime folder may be here for Debian, if you used the Steam installer from the Debian repository:

~/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper

@TormenTeDx
Copy link

image

I ran these __NV_PRIME_RENDER_OFFLOAD=1 ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper -- vkcube and with or without the argument I still get in both cases the same gpu nvidia rtx3080. and running dota through sniper gives the same vulkan error as it does via steam.

image

Sadly it didn't help for me

@kagmole
Copy link

kagmole commented Sep 7, 2024

Same as @TormenTeDx, except graphic card is:

Selected GPU 1: NVIDIA GeForce RTX 4070 Laptop GPU, type: DiscreteGpu

@davidsl118
Copy link
Author

Hi @TTimo. I get the vkcube rendered with or without the argument, and in both cases the same discrete GPU is selected. Since this was not what you expected, I did not test the next step.

@TTimo
Copy link
Collaborator

TTimo commented Sep 9, 2024

Ok .. so next thing to try, enabling verbose in the Vulkan loader:

VK_LOADER_DEBUG=all __NV_PRIME_RENDER_OFFLOAD=1 ~/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper -- ./dota.sh 2>&1 | tee ~/verbose-loader.txt

That will save out a log to ~/verbose-loader.txt which you can attach and we'll see if it reveals anything.

@TormenTeDx
Copy link

Here you go:
verbose-loader.txt

@TTimo
Copy link
Collaborator

TTimo commented Sep 10, 2024

I'll have to pour over the logs some more tomorrow, but can you also try setting NODEVICE_SELECT=1 and capturing another? Just in case an issue in the llvmpipe layer is collapsing the whole init for some reason.

@TormenTeDx
Copy link

You mean like this? NODEVICE_SELECT=1 VK_LOADER_DEBUG=all /home/ryszard/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_sniper/run-in-sniper -- ./dota.sh 2>&1 | tee ~/verbose-loader-nodevice-select.txt
Here, still getting vulkan error:
verbose-loader-nodevice-select.txt

@TTimo TTimo changed the title [Linux] Failed to initialize Vulkan NVidia 535.x VK_ERROR_INITIALIZATION_FAILED on Debian Sep 10, 2024
@TTimo
Copy link
Collaborator

TTimo commented Sep 10, 2024

Ok that makes the whole loading business cleaner, and at least removes that possibility of a problem.

At this point we're starting to suspect the combo of 535 drivers and recent NVidia hardware (3080 and up). We may be requesting extensions in the recent Dota2 update that the drivers are unhappy about. It'll take a few days but we'll add some options to test that out.

Corollary is that you should try with newer drivers, 550 or ideally 560 but it seems Debian is lagging behind, we've asked for those to be added in experimental.

@TTimo TTimo self-assigned this Sep 10, 2024
@TormenTeDx
Copy link

cool, thanks. 535 are the newest one right now on stable debian afaik.

@kagmole
Copy link

kagmole commented Sep 10, 2024

Same for Debian Unstable. Version 535.183.06-1.
But a friend on Ubuntu doesn't have the problem with an older version, 535.183.01.
#2807 (comment)

@smcv
Copy link

smcv commented Sep 10, 2024

a friend on Ubuntu doesn't have the problem with an older version, 535.183.01

535.183.01 happens to still be available in the Debian 12 repositories (versioned 535.183.01-1~deb12u1), so you could try downgrading to that and see whether it helps?

@TormenTeDx
Copy link

I have 535.183.01, so it won't help.
image

@kagmole
Copy link

kagmole commented Sep 10, 2024

I tried to downgrade but the DKMS build fails with Linux kernel 6.10.9-amd64.

@smcv
Copy link

smcv commented Sep 10, 2024

I have 535.183.01, so it won't help

If that's the case, then there must be some other factor in why you see this but @kagmole's friend does not. Everyone here seems to have mentioned dual-GPU (Nvidia + other), so perhaps that's part of it.

@TormenTeDx
Copy link

I have single gpu, 3080 rtx, its probably because of debian. I've heard it works on ubuntu fine

@kagmole
Copy link

kagmole commented Sep 10, 2024

I tried to disable the iGPU to only have one dGPU but no luck on this as well.

@smcv
Copy link

smcv commented Sep 10, 2024

Do you have libnvidia-rtcore installed? If not, try installing that, at the same version as your Vulkan drivers?

As packaged in Debian, it's a Recommends (weak dependency, installed by default but possible to turn off), but there are indications that it should perhaps be a required dependency.

@smcv
Copy link

smcv commented Sep 10, 2024

Or, more generally, if any of the dependencies of nvidia-driver-full are missing, try installing them, again with their version matching the parts of the driver that you already have installed.

@kagmole
Copy link

kagmole commented Sep 10, 2024

libnvidia-rtcore was indeed missing, no idea why. I installed it and now it works! Thanks a lot. :)
I will reinstall all recommended packages as well, just to be sure. I didn't disable the installation of recommended packages though.

@smcv
Copy link

smcv commented Sep 10, 2024

I didn't disable the installation of recommended packages though

Hmm, something must have gone wrong during installation or upgrade of your drivers: normally Recommends are selected for installation automatically, unless either (a) you explicitly turned them off (in which case you're accepting the risk that some things will not work), or (b) they were temporarily impossible to install for some reason.

@kagmole
Copy link

kagmole commented Sep 10, 2024

Must be option (b) since I'm on Unstable. I do admit I neglect to check on packages starting with lib.

@TormenTeDx
Copy link

I can't believe it, I installed libnvidia-rtcore and it works too. I think it wasn't installed since beggining and it just wasn't required for dota before... cause it basically stopped working after the ringmaster update

@smcv
Copy link

smcv commented Sep 10, 2024

I think it wasn't installed since beggining and it just wasn't required for dota before

Perhaps it's actually only required for games that use particular Vulkan features, and Dota started using those features recently?

@TTimo
Copy link
Collaborator

TTimo commented Sep 10, 2024

Perhaps it's actually only required for games that use particular Vulkan features, and Dota started using those features recently?

Yep we do try to enable some raytracing extensions since recently.

@davidsl118
Copy link
Author

After installing libnvidia-rtcore the game launches fine. Many thanks!

@smcv
Copy link

smcv commented Sep 11, 2024

Reported as https://bugs.debian.org/1081314

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

7 participants