Unverified Commit 45f7e329 authored by black's avatar black Committed by GitHub

Merge pull request #1263 from lebensterben/multipleGPU

Works for multiple GPUs now
parents 614a2d1b b58942d6
...@@ -2135,9 +2135,9 @@ get_gpu() { ...@@ -2135,9 +2135,9 @@ get_gpu() {
case "$os" in case "$os" in
"Linux") "Linux")
# Read GPUs into array. # Read GPUs into array.
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \ gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END {for(i in a) '/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4}
{if(!seen[a[i]]++) print a[i]}}')" END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd" IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
# Remove duplicate Intel Graphics outputs. # Remove duplicate Intel Graphics outputs.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment