You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the nvidia driver is installed but the nvidia gpu is not attached (common scenario in egpu systems), apps will still try to use the nvidia vulkan driver. For example, calling vulkaninfo causes it to lag for a couple seconds and then display the following:
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
==========
VULKANINFO
==========
Vulkan Instance Version: 1.3.279
Instance Extensions: count = 22 ...
This doesn't cause any oblivious issues at first since a lot of programs seem to launch fine. But as soon as they use Vulkan they can crash. I have seen this happen with Firefox when loading PDFs or discord randomly crashing.
I have found a "fix" for this issue. We can tell the vulkan loader what ICDs to consider with the VK_ICD_FILENAME env var.
For my system the fix consisted of creating a script in /etc/profile.d/ with the following:
# Check if Nvidia GPU is present
if ! lspci | grep -i nvidia; then
# Nvidia GPU is not present, set VK_ICD_FILENAMES to use Intel GPU
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json
fi
This fix has a couple issues. The first one is that the vulkan icd is hard coded to be intel. This could be fixed by just making it put all of the available ICDs except the Nvidia one. The second issue is not as easy to fix...
This works for me because I only boot with the egpu or without it, I never hot plug. But since this variable is set at login, if you login with/without nvidia gpus, programs will ignore the nvidia vulkan icd if you happen to hot plug/unplug the gpu while already logged in. While xorg doesn't support hot-plugging gpus, wayland does. So this would require relogging in for those who hotplug or hot unplug (though hot unplugging is very much not great rn but some have gotten it to work). So while it would be nice to include something like the script above in the built nvidia-tkg package, it would fix the vulkan issue but introduce another issue. I don't know if this is a reasonable tradeoff for users.
The text was updated successfully, but these errors were encountered:
When the nvidia driver is installed but the nvidia gpu is not attached (common scenario in egpu systems), apps will still try to use the nvidia vulkan driver. For example, calling vulkaninfo causes it to lag for a couple seconds and then display the following:
This doesn't cause any oblivious issues at first since a lot of programs seem to launch fine. But as soon as they use Vulkan they can crash. I have seen this happen with Firefox when loading PDFs or discord randomly crashing.
I have found a "fix" for this issue. We can tell the vulkan loader what ICDs to consider with the VK_ICD_FILENAME env var.
For my system the fix consisted of creating a script in /etc/profile.d/ with the following:
This fix has a couple issues. The first one is that the vulkan icd is hard coded to be intel. This could be fixed by just making it put all of the available ICDs except the Nvidia one. The second issue is not as easy to fix...
This works for me because I only boot with the egpu or without it, I never hot plug. But since this variable is set at login, if you login with/without nvidia gpus, programs will ignore the nvidia vulkan icd if you happen to hot plug/unplug the gpu while already logged in. While xorg doesn't support hot-plugging gpus, wayland does. So this would require relogging in for those who hotplug or hot unplug (though hot unplugging is very much not great rn but some have gotten it to work). So while it would be nice to include something like the script above in the built nvidia-tkg package, it would fix the vulkan issue but introduce another issue. I don't know if this is a reasonable tradeoff for users.
The text was updated successfully, but these errors were encountered: