Skip to content

Commit

Permalink
Merge pull request #49 from toumorokoshi/master
Browse files Browse the repository at this point in the history
Adding more restrictive eGPU detection
  • Loading branch information
hertg committed Aug 7, 2020
2 parents 4ae0d5d + c3ec3b3 commit eaf2f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egpu-switcher
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function is_egpu_connected() {
declare bus2h=$(printf "%02x" $bus2d)
declare bus3h=$(printf "%01x" $bus3d)

if [ $(lspci | grep -iEc "$bus1h:$bus2h.$bus3h") -eq 1 ]; then
if [ $( (lspci -d ::0300 && lspci -d ::0302) | grep -iEc "$bus1h:$bus2h.$bus3h") -eq 1 ]; then
print_info "EGPU is ${green}connected${blank}."
gpu_connected=1
hex_id=$bus1h:$bus2h.$bus3h
Expand Down

0 comments on commit eaf2f8e

Please sign in to comment.