From 3866ad0249f017a0dfc6482773e363688216c088 Mon Sep 17 00:00:00 2001 From: Mingcong Bai Date: Tue, 3 Sep 2024 16:41:19 +0800 Subject: [PATCH] fix(neofetch): list all Intel GPUs as detected Now that Intel is selling its own dedicated GPUs, it is increasingly common to see laptops and desktop devices with multiple Intel GPUs. This patch is intended to fix GPU detection on a laptop with both an integrated UHD Graphics GPU and an Arc 380 (DG2). Note that this may potentially cause regressions, but the original upstream did not record the original issue, so I'm inclined to write it off as an outdated fix: commit ee815f9c6651423ae93f8ead237ebc99e2373c06 Author: Dylan Araps Date: Mon Apr 9 09:51:23 2018 +1000 gpu: Fixed duplicate intel bug. --- neofetch | 9 --------- 1 file changed, 9 deletions(-) diff --git a/neofetch b/neofetch index 7f2e0f3b..8b34c356 100755 --- a/neofetch +++ b/neofetch @@ -3429,15 +3429,6 @@ get_gpu() { IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd" - # Remove duplicate Intel Graphics outputs. - # This fixes cases where the outputs are both - # Intel but not entirely identical. - # - # Checking the first two array elements should - # be safe since there won't be 2 intel outputs if - # there's a dedicated GPU in play. - [[ "${gpus[0]}" == *Intel* && "${gpus[1]}" == *Intel* ]] && unset -v "gpus[0]" - for gpu in "${gpus[@]}"; do # GPU shorthand tests. [[ "$gpu_type" == "dedicated" && "$gpu" == *Intel* ]] || \