Vulkan ICD loader issue

Again, my username is not a commentary on anything here. I’ve had it since the Diablo 3 days (but with my low post count it could look like I meant it to be a commentary when it is not).

Lutris 0.5.10 brought a new field in the WINE runner, called “Vulkan ICD loader.” The default for this field is “Auto: Intel Open Source (MESA:ANV).”

I have to manually change it to “Nvidia Proprietary” to get things to work correctly on my existing games that previously worked well. My setup uses Nvidia prime render offload (via the tick box right above the Vulkan ICD dropdown), but having the option for Vulkan ICD set to Intel Open Source defeats the prime render offloading and forces the game to run on the slow Intel integrated graphics.

I am not sure of all of the mechanics around this, but perhaps if there is an Nvidia proprietary driver present (which would only be the case if there was also an Nvidia card), that should be the default.

I’m sorry to have to say this, but I suggest checking a game’s configuration (Runner Options, with Advanced view enabled) every time before launching it, to see that it hasn’t changed runtime droplists etc. out from underfoot. In my observations, this occurs if you have the “default” selected in the fields, when the version control files get updated it changes to a new default. Unless you have selected something other than that.

I check whatever game I’m going to play, every time I start Lutris now.

So you know how that vulkan loader shit works, “Auto” means don’t set anything. ANV is the .json that gets processed first, so the tests are getting that from the environment. That setting will be making use of a variable, VK_ICD_FILENAMES to override the default vulkan loader choice. It specifies the path to the .json files, separated by colon if more than one (e.g. 64 bit and 32 bit). For example, I could do this if I had multiple vulkan ICD’s and it was causing problems.

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json

I don’t know the exact filenames for the NVIDIA .json but that’s how you’d specify them with that variable.

Do you ever want to use Vulkan on your Intel adapter? I don’t have hybrid graphics, but I can’t see why I would want that happening at this time (I only use Vulkan for games, not other graphics applications or vk_video yet or anything though)

On most distributions these .icd files are in /usr/share/vulkan/icd.d

What I do, is move out any that I don’t want. For example you could move intel_icd.x86_64.json and intel_icd.i686.json out of there (as well as lvp_icd or any others that were built with your Mesa) and then the vulkan loader will only find your nvidia .json.

Then you could just leave that setting defaulting to Auto.


Note for others: Having AMDVLK installed now overrides the vulkan-icd-loader behaviour. It becomes the default and uses its own switching mechanism unless overridden by:

DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1

Then it goes back to the vulkan-icd-loader method. Alternatively, the variable AMD_VULKAN_ICD=RADV can be used with the new method.