Vulkan tries to use Intel GPU by default

Whenever I try to play a Vulkan game, I get a black screen because the game's trying to render to my Intel GPU (which isn't connected to any monitor). Using the launch option "VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%" in Steam works, but I'd like to know if there's a way to use my Nvidia GPU by default. I'd disable my Intel GPU but I likely will be connecting a monitor to it soon.


Add this line at the end of the file named .profile located in your home directory:

export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json"