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

opt-hardware.opengl.driSupport Does Not Set Vulkan ICD Filenames #276021

Open
mcmah309 opened this issue Dec 22, 2023 · 1 comment
Open

opt-hardware.opengl.driSupport Does Not Set Vulkan ICD Filenames #276021

mcmah309 opened this issue Dec 22, 2023 · 1 comment

Comments

@mcmah309
Copy link
Contributor

mcmah309 commented Dec 22, 2023

Describe the bug

opt-hardware.opengl.driSupport, or related, does not set VK_ICD_FILENAMES as mentioned here

The first option is through the `VK_ICD_FILENAMES` environment variable.
. This causes a warning and possible downstream issues

vulkaninfo --summary
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 5.  Skipping ICD.
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 6.  Skipping ICD.
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.268

Instance Extensions: count = 23
...

Setting this variable manually removes this warning.

vulkaninfo --summary
==========
VULKANINFO
==========
glvkspirv.so.535.146.02
Vulkan Instance Version: 1.3.268
glsi.so.1
/nix/store/0piil24qf6xkwi6qnydc14dqkwnigc9s-nvidia-x11-535.146.02-6.5.13-lib32/lib/libnvidia-
Instance Extensions: count = 23

...

Steps To Reproduce

Turn on opt-hardware.opengl.driSupport on.

Expected behavior

VK_ICD_FILENAMES is set and Vulkan functions normally.

Possibly related issue to Chromium apps on Nvidia failing. Chrome log entry even though everything else looks good in vulkaninfo --summary:

Warning: vkCreateInstance: Found no drivers!
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:101)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:493)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:379)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:301)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:556)

Notify maintainers

Sorry if I tag the wrong person.
@xaverdh @Kiskae @Madouura @abbradar

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.13, NixOS, 24.05 (Uakari), 24.05.20231219.54aac08`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11, nixos-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

@Kiskae
Copy link
Contributor

Kiskae commented Dec 22, 2023

The warning is harmless, that is simply the result of having multiple Vulkan drivers on a system. This is also why setting that variable globally doesn't work, because some systems have more than 1 Vulkan driver that is dynamically selected at runtime.

The chromium issue is related to the fact that chromium ships its own non-patched vulkan-loader, and since we don't have configuration files in their standard locations this does not work.
I believe that it should be possible to substitute that library directly with our own version since it appears to just be an unmodified release.

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

No branches or pull requests

2 participants