Automatically detect GPU
fyr77 opened this issue · 4 comments
Automatic GPU detection would be preferable over the current manual method using the website.
This probably needs a database to translate the GPU names reported by the system to the seemingly arbitrary GPUIDs used by Nvidia.
I could not find an existing database with Nvidia's PFIDs online, so I will have to create my own.
Now I just need to find a reliable way of identifying the GPU within Windows in the first place. The reported name of the GPU itself may not be accurate enough as some special versions and differing manifacturers may report different names. So I need to check for some ID that is unique to the GPU.
I found out how Nvidia looks up their internal IDs and experimented with the API a bit. A few things I found out:
- URL to get all GPUs with their pfid and psid: https://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=3
- URL for all OS IDs: https://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=4
- URL for all Language IDs: https://www.nvidia.com/Download/API/lookupValueSearch.aspx?TypeID=5
Some GPUs exist twice in the first list. That's because of the mobile variants of some GPUs haing the same name as the desktop variant. I tried a few models and found that the desktop product is always the first model in that list, the mobile version being the second occurence.
This means I can now work on automatically populating the download API call I was already using all the time.
https://www.nvidia.com/Download/processDriver.aspx?psid=<ProductSeries>&pfid=<ProductType>&osid=<OperatingSystem>&lid=<Language>