Merge pull request #1263 from lebensterben/multipleGPU

Works for multiple GPUs now
This commit is contained in:
black 2019-06-05 20:11:10 +03:00 committed by GitHub
commit 45f7e32932
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2135,9 +2135,9 @@ get_gpu() {
case "$os" in
"Linux")
# Read GPUs into array.
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]}}')"
gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4}
END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
# Remove duplicate Intel Graphics outputs.