Make Vulkan Work After NVIDIA Drivers Update
I recently stumbled upon a problem with Vulkan on one of my laptops running a NVIDIA Optimus setup, that is two graphics cards running on the same computer where you depending on the workload switch between the integrated one (Intel) and the dedicated one (NVIDIA).
The problem was that after upgrading Ubuntu to the latest kernel (5.3.7 at the time of writing) and the NVIDIA drivers (440 at the time of writing) all Vulkan based games stopped working.
This is quite the problem, since for example Steam Play (Proton) uses Vulkan for most games. Running
vulkaninfo in the terminal showed that Vulkan could not be initialized, even though all the files and dependencies were in order.
After some extensive searching i found a very easy fix that seems to solve the problem, although it seems it needs to be done after each time you have switched between the Intel and NVIDIA card through the NVIDIA X Server software.
sudo vulkaninfo in a terminal instance and the problem is solved. This points to the problem being a rights one, I have not been able to figure out the source of it. But the above workaround at least works for now.