Vulkan apps not always use Nvidia GPU
As I understand Nvidia drivers readme, the __NV_PRIME_RENDER_OFFLOAD
env var causes the special Vulkan layer VK_LAYER_NV_optimus
to be loaded, which, in turn, reorders GPUs reported to the app so that Nvidia GPUs come first. The app is supposed to select the first GPU, but it appears to be not always the case, especially for Wine.
To make sure that Vulkan apps always use the Nvidia dGPU, one should set __VK_LAYER_NV_optimus=NVIDIA_only
, which tells the special layer to report only the Nvidia GPUs, thus, leaving the app no other choice.
Edited by Filippe LeMarchand