Open alexreinking opened 5 years ago
What's the full content of lspci -mm
?
@konimex -- Sorry for the delay. Here is the output:
@konimex - did you get a chance to take a look at this?
I just finished my mid-terms so maybe I can get on this. But my awk-fu is quite weak, I'll see what I can do.
So far we have two options:
{if(!seen[a[i]]++)
in our command, so the same GPU would be shown twice.x2
or x3
everytime there's a duplicate CPU, however I don't know if awk
support this.@dylanaraps, what do you think?
Changing that line also worked for me on Arch Linux
Will take a look at this shortly. Apologies.
Since I don't have two GPUs, I used the following:
gpu_cmd="$(cat ./test/lspci.txt | awk -F '\"|\" \"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4}
END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')"
On Arch Linux, using version 6.1.0, I got both GPUs in output; however, using version 3.4.0 and the lspci.txt gave just one GPU in the output.
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.
GPU0
andGPU1
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