Fix nvidia check

This commit is contained in:
David Heinemeier Hansson
2025-07-02 16:21:52 -07:00
parent e9a399173b
commit 863a1b0b3e

View File

@ -9,12 +9,7 @@
# ==============================================================================
# --- GPU Detection ---
# Check if nvidia gpu exists, exit silently if not found
gpu_info=$(lspci | grep -i 'nvidia')
if [ -z "$gpu_info" ]; then
exit 0
fi
if [ -n "$(lspci | grep -i 'nvidia')" ]; then
# --- Driver Selection ---
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
if echo "$gpu_info" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
@ -84,3 +79,4 @@ env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
EOF
fi
fi