Bug 6128

Summary: Nvidia Vulkan broken by rpmfusion driver: VK_ERROR_INITIALIZATION_FAILED (Vulkan randomly toggling between software lavapipe and Nvidia's Vulkan)
Product: Fedora Reporter: Kyle K <kyle>
Component: nvidia-kmodAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED WORKSFORME    
Severity: major CC: leigh123linux, leigh123linux
Priority: P1    
Version: f35   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description Kyle K 2021-11-05 00:53:24 CET
I cannot get Vulkan properly working in F34 or F35, I'm trying to launch Wolftestein Youngblood from Steam on X11 session and I'm getting a VK_ERROR_INITIALIZATION_FAILED error. Same system works on Archlinux, I can even launch Youngblood in Wayland session.

Under Fedora I notice the following things
- in wayland session vulkaninfo fails to run unless WAYLAND_DISPLAY is unset like so: WAYLAND_DISPLAY= vulkaninfo
- on Fedora with X11 session vulkaninfo randomly toggles between Mesa's software lavapipe vulkan and nvidia's vulkan implementation
- steam fails to launch a Proton game (Wolfenstein Youngblood) on X11/Wayland with "Startup failure: VK_ERROR_INITIALIZATION_FAILED" message
- I hear you need to set Vulkan variable: export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json before running 'steam', I tried and it fixes running 'vulkaninfo' so lavapipe doesn't randomly activate but it had no effect on steam, still getting VK_ERROR_INITIALIZATION_FAILED

Vulkan on Fedora is absolute shit show, I'm using the latest 495.xx driver from rpmfusion repo, I always had this problem on Fedora, where as in Archlinux things just work (tested on 2 systems, one with older GTX 680 and one with RTX 2070). I want to use Fedora because it supports Secure Boot and I want that enabled. Archlinux does not support secure boot.

I originally posted about the problem here: https://old.reddit.com/r/Fedora/comments/qkvsbn/fedora_3435_nvidia_vulkan_vk_error_initialization/
Comment 1 Kyle K 2021-11-05 00:58:02 CET
Today I found the root cause: the nvidia driver in rpmfusion is causing Vulkan issues.

I purged the the driver from rpmfusion and installed NVIDIA-Linux-x86_64-495.44.run manually, without any fiddling with VK_ICD_FILENAMES or anything else, I launched 'steam' and Wolftestein Youngblood is finally working, no VK_ERROR_INITIALIZATION_FAILED error either.

Please fix Nvidia driver in rpmfusion, you're doing something wrong with packaging. I had this problem before F35 on F34, doesn't matter if I clean installed or did 34 to 35 upgrade, problem was always there for me.
Comment 2 leigh scott 2021-11-05 02:59:11 CET
The GTX 680 isn't supported by the 495.xx driver, it's needs the 470.xx driver.
495.xx works fine here with wayland without setting VK_ICD_FILENAMES or anything else.
You don't even provide the basic required info.


https://rpmfusion.org/Howto/NVIDIA?highlight=%28%5CbCategoryHowto%5Cb%29#Bug_Report


(In reply to Kyle K from comment #1)
> Today I found the root cause: the nvidia driver in rpmfusion is causing
> Vulkan issues.
> 
> I purged the the driver from rpmfusion and installed
> NVIDIA-Linux-x86_64-495.44.run manually, without any fiddling with
> , I launched 'steam' and Wolftestein
> Youngblood is finally working, no VK_ERROR_INITIALIZATION_FAILED error
> either.
> 
> Please fix Nvidia driver in rpmfusion, you're doing something wrong with
> packaging. I had this problem before F35 on F34, doesn't matter if I clean
> installed or did 34 to 35 upgrade, problem was always there for me.

If you have run NVIDIA-Linux-x86_64-495.44.run manually on the system I have zero interest in investigating.



(In reply to Kyle K from comment #0)

> Vulkan on Fedora is absolute shit show, I'm using the latest 495.xx driver
> from rpmfusion repo, I always had this problem on Fedora, where as in
> Archlinux things just work (tested on 2 systems, one with older GTX 680 and
> one with RTX 2070). I want to use Fedora because it supports Secure Boot and
> I want that enabled. Archlinux does not support secure boot.

Maybe you should go back to Archlinux.
Comment 3 Kyle K 2021-11-05 03:18:22 CET
Hi leigh scott,

Yes my bad on GTX 680 I was 470.xx of course, I didn't fill out info because there's nothing special: clean install, install nvidia driver from rpmfusion, run Wolfenstein Youngblood and observe VK_ERROR_INITIALIZATION_FAILED

With all due respect, I was just wondering if you by any chance own Wolfenstein Youngblood and had a chance to run it via Proton on Steam? It would be hard for me to believe you don't get a VK_ERROR_INITIALIZATION_FAILED error.

Sorry I don't use archlinux, I only used it for testing to see if they package nvidia driver differently compared to rpmfusion, I turns out they do because no VK_ERROR_INITIALIZATION_FAILED error is witnessed. So Vulkan works on archlinux nvidia drivers, nvidia's official .run work, rpmfusion nvidia driver has a problem. And it is not only me, there's at least 1 person in other bug report with lavapipe problem. I can reproduce on 2 computers, there's definitely a problem with rpmfusion.

I appreciate all of your packaging efforts and contribution that you make to Fedora. Thanks.
Comment 4 Nicolas Chauvet 2021-11-05 11:49:00 CET
Out of curiosity, do you have installed xorg-x11-drv-nvidia-libs.i686 in order to have vulkan support for 32bit application ?
Comment 5 leigh scott 2021-11-05 12:03:09 CET
You still haven't provided the basic required info.


https://rpmfusion.org/Howto/NVIDIA?highlight=%28%5CbCategoryHowto%5Cb%29#Bug_Report


I don't use steam, can you find another fedora provide app that reproduces the issue.

Did you try erasing the mesa provided files?

sudo rm /usr/share/vulkan/icd.d/lvp_icd.*
Comment 6 Kyle K 2021-11-08 03:20:35 CET
(In reply to Nicolas Chauvet from comment #4)
> Out of curiosity, do you have installed xorg-x11-drv-nvidia-libs.i686 in
> order to have vulkan support for 32bit application ?
Yes I used:
# dnf install xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs.i686 akmod-nvidia
Comment 7 Kyle K 2021-11-08 04:47:36 CET
(In reply to leigh scott from comment #5)
> You still haven't provided the basic required info.
> 
> 
> https://rpmfusion.org/Howto/
> NVIDIA?highlight=%28%5CbCategoryHowto%5Cb%29#Bug_Report
> 
> 
> I don't use steam, can you find another fedora provide app that reproduces
> the issue.
> 
> Did you try erasing the mesa provided files?
> 
> sudo rm /usr/share/vulkan/icd.d/lvp_icd.*

Hello,

'sudo rm /usr/share/vulkan/icd.d/lvp_icd.*' does not help, still VK_ERROR_INITIALIZATION_FAILED

https://paste.centos.org/view/5f779bd8

KhronosGroup/Vulkan-Samples 64-bit samples are working for when I'm rpmfusion, it is only steam games such as Wolfenstein Youngblood that result in VK_ERROR_INITIALIZATION_FAILED, and I'm installing xorg-x11-drv-nvidia-libs.i686


> I don't use steam
Give it a try, Wolfenstein Youngblood was $5 on sale when I bought it (my 2nd copy), state of the art game engine.