fix GPU driver detection bug with bumblebee-managed dual video cards

This commit is contained in:
xudong-yang 2018-12-06 16:35:57 +08:00
parent ed0b0a9746
commit e5d28f28c6
No known key found for this signature in database
GPG key ID: 210907064D2E51B6

View file

@ -3304,7 +3304,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 ", "}')"
'/Display|3D|VGA/{nr[NR+2]}; NR in nr && $1 == " Kernel driver in use" {printf $2 ", "}')"
gpu_driver="${gpu_driver%, }"
if [[ "$gpu_driver" == *"nvidia"* ]]; then