Migrated from Original Issue
Original Issue: dylanaraps#1206
Author: @alexreinking
Original Description
Description
If you have multiple identical graphics cards installed in your system, neofetch will show only one of them. This is because the hash table in the awk command uses the vendor name + model for the key, rather than the pci address.
Relevant code reproduced below:
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END {for(i in a)
{if(!seen[a[i]]++) print a[i]}}')"
Changing this to the following fixes the problem on my machine, though I don't know if it will work for others.
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
'/"Display|"3D|"VGA/ {a[$1] = $3 " " $4} END {for(i in a)
{print a[i]}}')"
Maybe it would be best to make this feature configurable via an option? Allow users to include "duplicate" graphics cards?
Neofetch version
Version 3.4.0 via Ubuntu 18.04 package manager. Also affects master.
Screenshot

I would expect to see two lines, eg. GPU0 and GPU1 or a comma-separated list, or something similar. Something cool like "x2" or "SLI" (for Nvidia) would show that there were multiple copies of the same card and be more compact.
Config file
config.txt
Verbose log
neofetchlog.txt
This issue was automatically migrated from the archived dylanaraps/neofetch repository.
Migrated from Original Issue
Original Issue: dylanaraps#1206
Author: @alexreinking
Original Description
Description
If you have multiple identical graphics cards installed in your system, neofetch will show only one of them. This is because the hash table in the awk command uses the vendor name + model for the key, rather than the pci address.
Relevant code reproduced below:
Changing this to the following fixes the problem on my machine, though I don't know if it will work for others.
Maybe it would be best to make this feature configurable via an option? Allow users to include "duplicate" graphics cards?
Neofetch version
Version 3.4.0 via Ubuntu 18.04 package manager. Also affects master.
Screenshot
I would expect to see two lines, eg.
GPU0andGPU1or a comma-separated list, or something similar. Something cool like "x2" or "SLI" (for Nvidia) would show that there were multiple copies of the same card and be more compact.Config file
config.txt
Verbose log
neofetchlog.txt