Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 651400

Summary: x11-drivers/nvidia-drivers vulkan non-glvnd json file is incorrect - vulkan doesn't work correctly
Product: Gentoo Linux Reporter: Jason Oliveira <jason.oliveira>
Component: Current packagesAssignee: David Seifert <soap>
Status: RESOLVED OBSOLETE    
Severity: normal CC: axl, dan, gentoo-bugzilla, hydrapolic, ionen, o.freyermuth, O01eg, tsebrenko
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: F1 2017 (Commercial Game) error when normal nvidia_icd.json is used

Description Jason Oliveira 2018-03-25 03:38:06 UTC
according to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864477, Gentoo is using the non-GLVND version of the driver, and is therefore reporting the incorrect library in /etc/vulkan/icd.d/nvidia_icd.json

Replace "libGLX_nvidia.so.0" with "libGL.so.1" in the file, and vulkan applications will magically begin working.
Comment 1 Tomáš Mózes 2018-03-25 08:28:12 UTC
Can you please be more specific in what way are the applications broken?
Comment 2 Jason Oliveira 2018-03-25 17:40:40 UTC
Created attachment 525428 [details]
F1 2017 (Commercial Game) error when normal nvidia_icd.json is used

Normal behavior when unmodified nvidia-drivers is used.
In addition, other vulkan-based applications (tested Dolphin and Retroarch) both fail to launch, or launch to a black screen, in vulkan mode, but work perfectly post-modification of /etc/vulkan/icd.d/nvidia_icd.json
Comment 3 Jason Oliveira 2018-11-24 19:34:28 UTC
had to re-do the change for nvidia-drivers-415.13. 

{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGL.so.1",
        "api_version" : "1.1.84"
    }
}


Vulkan works again after this change.
Comment 4 Jason Oliveira 2018-12-05 05:35:42 UTC
proper /etc/vulkan/icd.d/nvidia_icd.json file for 396.54 (current stable):

{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGL.so.1",
        "api_version" : "1.1.70"
    }
}
Comment 5 Matti Eskelinen 2019-02-07 22:25:21 UTC
I can confirm this for the last few driver versions (from 415.13 to the newest beta, 418.30).

Without the filename change Vulkan programs crash on start, though for some reason this does not affect vkcube. Testing with Dota 2, it consistently fails to start without the library name change when using -Vulkan in launch options, while it starts fine in both cases when not using Vulkan (as expected). The same sort of crash happens with Elite Dangerous when ran through steam proton with the Vulkan translation layer.
Comment 6 Alexandru N. Barloiu 2019-04-02 17:01:10 UTC
Can also confirm that this fixed a variety of issues for me, including Lutris and rpcs3. (both vulkan applications).
Comment 7 Jason Oliveira 2019-08-04 10:06:10 UTC
Turns out, this issue affects those using -compat as well (worst. default. option. ever.), so it doesn't appear to be GLVND-specific. This is a Vulkan issue with the /etc/vulkan/icd.d/nvidia_icd.json file
Comment 8 David Seifert gentoo-dev 2021-01-10 21:49:25 UTC
Is this still a problem? I've tested samples from https://github.com/SaschaWillems/Vulkan and vulkan works fine for me.
Comment 9 Ionen Wolkens gentoo-dev 2021-03-06 08:35:05 UTC
There was still a lot of oddities going on in 2018-2019 with glvnd, and old compat libraries are gone now.

If someone still has issues with vulkan please open a new bug, I'd like to review issues with a current setup.