Tighten NVIDIA GPU PCI detection

This commit is contained in:
Mikhail Chusavitin
2026-04-08 10:20:38 +03:00
parent 025548ab3c
commit 4ef403898f
3 changed files with 16 additions and 6 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ log() {
}
have_nvidia_gpu() {
lspci -nn 2>/dev/null | grep -qi '10de:'
lspci -Dn 2>/dev/null | awk '$2 ~ /^03(00|02):$/ && $3 ~ /^10de:/ { found=1; exit } END { exit(found ? 0 : 1) }'
}
service_active() {