Skip to content

Commit

Permalink
[PR] dylanaraps/neofetch#1131 from xudong-yang - fix GPU driver detec…
Browse files Browse the repository at this point in the history
…tion bug with bumblebee-managed dual video cards

Upstream PR: dylanaraps/neofetch#1131
Thanks to @xudong-yang

Co-authored-by: xudong-yang <xudong.yang@ucl.ac.uk>
  • Loading branch information
hykilpikonna and xudong-yang committed Aug 12, 2022
2 parents bd04158 + 00e0343 commit 2850674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -4416,7 +4416,7 @@ get_gpu_driver() {
case $os in
"Linux")
gpu_driver="$(lspci -nnk | awk -F ': ' \
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "; exit}')"
'/Display|3D|VGA/{nr[NR+2]}; NR in nr && $1~"nel driv" {printf $2 ", "}')"
gpu_driver="${gpu_driver%, }"

if [[ "$gpu_driver" == *"nvidia"* ]]; then
Expand Down

0 comments on commit 2850674

Please sign in to comment.