Warm tip: This article is reproduced from stackoverflow.com, please click
driver linux nvidia vulkan

How does vkEnumeratePhysicalDevices retrieve information about the system configuration?

发布于 2020-04-23 11:21:54

I recently installed a new Nvidia proprietary driver on linux, everything works as expected, except now Vulkan reports that there are two graphics cards with the same driver version, same name, same queue families and so on, though I only have a single graphics card installed. I'm now really curious why this is the case. I tried looking at the implementation of the Vulkan loader at https://github.com/KhronosGroup/Vulkan-Loader, but I couldn't make much sense of it.

Questioner
Thomas Klingler
Viewed
38
krOoze 2020-02-08 05:38

The ICD discovery on Linux works per this document: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md#icd-discovery-on-linux

Basically there can be json files in predetermined paths. One such json file contains the path to a driver file.

Furthermore a driver can report more physical devices. The Loader simply calls vkEnumeratePhysicalDevices of each driver and pools together the results.

Your problem is probably a duplicate json file. You probably have the proprietary and free driver installed next to each other.