3

I have multiple AMD Radeon GPUs (of the same model) on Linux. I'd like to be able to uniquely identify them, so that if I swap them between PCIe slots, or even between machines, I'll know which one is which without tracking them physically.

Is it possible to get a unique ID (e.g. the serial number) of a GPU on Linux? lspci, dmidecode and /sys/bus/pci/devices/0000:nn:00.0/ don't seem to give anything useful for this purpose. I could also insert an unique ID into the empty space of the BIOS image, but doing so will likely void the warranty.

I'm aware of the similar question "Is it possible to get the serial number of a GPU without opening the case?", but mine is on Linux and I can use any unique IDs, not just the serial number.

netvope
  • 5,215
  • 14
  • 57
  • 77

1 Answers1

0

Dell has a document that describes how to identify devices by slot on linux.

Run dmidecode –t slot and match Bus Address and Designation for populated PCI slots
then
Run lspci –s to get info about device at the Bus Address for a given PCI slot.

Or use their bash script

Edit. Testing this further shows that this can identify the model of video cards, but can't distinguish between identical cards.

spuder
  • 9,854
  • 4
  • 42
  • 57
  • 2
    The OP already mentioned that neither `lspci` nor `dmidecode` help. If you know how to use these tools to get the info, please edit your answer to explain how. – terdon Jan 05 '14 at 11:25
  • spuder has a fine answer, @terdon. Both the bash script and Dell's document address the OP, no reason to disparage this answer. +1 for me. – MariusMatutiae Jan 05 '14 at 17:17
  • @MariusMatutiae I was not disparaging as such, but: 1) Link answers are [discouraged](http://superuser.com/help/how-to-answer), it is better to copy the relevant info into the answer (especially for such a small document) 2) the OP mentions both tools and specifically states that they did not help. I also tried this on my Dell laptop and couldn't figure out how to link `dmidecode` output to `lspci`'s. Therefore, this answer just suggests the OP do what (s)he has already done without explaining how to do it or giving any extra information at all. How is it a fine answer? – terdon Jan 05 '14 at 17:23
  • 1
    @terdon He provides a **new** document, a **new** bash script, info on how to use two instruments in a novel way. Whether they work or not is a subject for discussion, not for terse dismissal. – MariusMatutiae Jan 05 '14 at 17:45
  • 1
    @MariusMatutiae I was not terse. I politely (note the _please_) asked that spuder edit the answer to explain how to use the tools suggested. I did not downvote nor leave a disparaging comment, let alone a terse dismissal. That the proposed solution does not work IS a problem, how could it not be? The bash script is neither useful nor new because it also uses the `dmidecode` command whose output does not seem to contain the necessary info. That's why we _test_ our answers before posting them. This is simply a direct copy/paste of a post on Dell's forum, has not been tested and does not work. – terdon Jan 05 '14 at 17:54
  • @terdon Fine, this is constructive criticism, let us leave it at this. – MariusMatutiae Jan 05 '14 at 17:58