Skip to content

Commit eaf2f8e

Browse files
authored
Merge pull request #49 from toumorokoshi/master
Adding more restrictive eGPU detection
2 parents 4ae0d5d + c3ec3b3 commit eaf2f8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

egpu-switcher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function is_egpu_connected() {
144144
declare bus2h=$(printf "%02x" $bus2d)
145145
declare bus3h=$(printf "%01x" $bus3d)
146146

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

0 commit comments

Comments
 (0)