NVIDIA Fermi/Kepler Fixes & Utils

- Refined NVIDIA GPU detection in `_helpers.sh`. Corrected Kepler GK208 range (`0x1280–0x12BF`) and added refined Fermi ID ranges to eliminate device collisions across architectures.
- Updated `gpu.sh` driver logic for Debian Bookworm (explicit Fermi veto) and Trixie (unified Kepler/Fermi check). Prevents legacy driver conflicts and ensures correct selection per version.
- Cleaned `bullseye/legacy.sh`. Removed outdated Fermi checks with collisions; now inherits unified validation from `_helpers.sh` to maintain Debian 11 compatibility.
- Fixed Wi-Fi interface regex in `utils.sh`. Added `wlan*` pattern to catch ath9k interfaces (`wlan0`) alongside standard wl/wlp/wlo identifiers.
- Validated syntax across all files with `bash -n`. Confirmed zero collision between Fermi and Kepler device IDs, ensuring stable detection on Debian 11/12/
This commit is contained in:
stornic56
2026-06-22 18:39:16 -05:00
committed by GitHub
parent bfd3144c7e
commit 2272306313
4 changed files with 42 additions and 27 deletions
-22
View File
@@ -27,28 +27,6 @@ No security updates will be available." 12 60
fi
}
# ---------------------------------------------------------------------------
# Fermi PCI ID detection — 6 condiciones inclusivas
# ---------------------------------------------------------------------------
is_nvidia_fermi() {
local dev_id
dev_id=$(lspci -nn | grep -iE "VGA|3D" | grep -i nvidia | \
grep -oP '10de:\K[0-9a-fA-F]+' | head -n1)
[ -z "$dev_id" ] && { echo false; return; }
local dev_int
dev_int=$((16#${dev_id,,}))
if [ "$dev_int" -ge $((16#06C0)) ] && [ "$dev_int" -le $((16#06DF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0DC0)) ] && [ "$dev_int" -le $((16#0DFF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0DE0)) ] && [ "$dev_int" -le $((16#0DFF)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#0E00)) ] && [ "$dev_int" -le $((16#0E1F)) ]; then echo true; return; fi
if [ "$dev_int" -ge $((16#1080)) ] && [ "$dev_int" -le $((16#10DF)) ]; then echo true; return; fi
if [ "$dev_int" -eq $((16#1201)) ]; then echo true; return; fi
echo false
}
# ---------------------------------------------------------------------------
# NVIDIA driver installer for Bullseye (Kepler → 470, Fermi → 390)
# ---------------------------------------------------------------------------
+7 -3
View File
@@ -105,13 +105,17 @@ install_gpu_drivers() {
else
install_nvidia_driver
fi
elif [ "$(is_nvidia_fermi)" = "true" ]; then
_msg "NVIDIA Fermi — Bookworm" \
"Fermi GPUs (GF1xx) are not supported\nin Debian 12 (Bookworm).\nThe nvidia-legacy-390xx driver is\nnot available in this version.\n\nNo NVIDIA driver will be installed."
NVIDIA_DRIVER_MODE=""
else
install_nvidia_driver
fi
elif [ "$DEBIAN_VERSION" = "13" ]; then
if [ "$(is_nvidia_kepler)" = "true" ]; then
_msg "NVIDIA Kepler — Trixie" \
"Your GPU is NVIDIA Kepler architecture.\nThe nvidia-tesla-470 driver is not available\nin Debian 13 (Trixie).\n\nNo NVIDIA driver will be installed for this GPU.\nOther GPUs (Intel/AMD) will still be configured."
if [ "$(is_nvidia_kepler)" = "true" ] || [ "$(is_nvidia_fermi)" = "true" ]; then
_msg "NVIDIA — Trixie" \
"Kepler and Fermi GPUs are not supported\nin Debian 13 (Trixie).\n\nThe nvidia-legacy drivers are not available\nin this version of Debian.\n\nNo NVIDIA driver will be installed."
NVIDIA_DRIVER_MODE=""
else
install_nvidia_driver
+34 -1
View File
@@ -15,12 +15,45 @@ is_nvidia_kepler() {
if [ "$dev_int" -ge $((16#1000)) ] && [ "$dev_int" -le $((16#103F)) ]; then echo true; return; fi
# Bloque 3: GK104/GK106 (completo) — 0x1180..0x11FF
if [ "$dev_int" -ge $((16#1180)) ] && [ "$dev_int" -le $((16#11FF)) ]; then echo true; return; fi
# Bloque 4: GK208/GK208B acotado — 0x1280..0x12BF
# Bloque 4: GK208/GK208B (completo) — 0x1280..0x12BF
if [ "$dev_int" -ge $((16#1280)) ] && [ "$dev_int" -le $((16#12BF)) ]; then echo true; return; fi
echo false
}
is_nvidia_fermi() {
local dev_id
dev_id=$(lspci -nn | grep -iE "VGA|3D" | grep -i nvidia | grep -oP '10de:\K[0-9a-fA-F]+' | head -n1)
[ -z "$dev_id" ] && { echo false; return; }
local dev_int
dev_int=$((16#${dev_id,,}))
# GF100 / GF110 — GTX 480, GTX 580, Quadro 6000, Tesla C2050
if [ "$dev_int" -ge $((16#06C0)) ] && [ "$dev_int" -le $((16#06DF)) ]; then echo true; return; fi
# GF104 / GF114 — GTS 450, GTX 460M, GT 555M
if [ "$dev_int" -ge $((16#0DC0)) ] && [ "$dev_int" -le $((16#0DCF)) ]; then echo true; return; fi
# GF104 / GF108 — GT 445M, GT 435M, GT 550M
if [ "$dev_int" -ge $((16#0DD0)) ] && [ "$dev_int" -le $((16#0DDF)) ]; then echo true; return; fi
# GF108 — GT 440, GT 430, GT 520, GT 610, GT 620M, NVS 5400M
if [ "$dev_int" -ge $((16#0DE0)) ] && [ "$dev_int" -le $((16#0DEF)) ]; then echo true; return; fi
# GF108 — GT 525M, GT 540M, GT 550M, Quadro 600, Quadro 500M
if [ "$dev_int" -ge $((16#0DF0)) ] && [ "$dev_int" -le $((16#0DFF)) ]; then echo true; return; fi
# GF104 / GF114 — GTX 460, GTX 470M, GTX 485M
if [ "$dev_int" -ge $((16#0E22)) ] && [ "$dev_int" -le $((16#0E31)) ]; then echo true; return; fi
# GF119 — GT 520M, GT 610M, NVS 4200M
if [ "$dev_int" -ge $((16#1050)) ] && [ "$dev_int" -le $((16#105F)) ]; then echo true; return; fi
# GF110 — GTX 580, GTX 570, GTX 560 Ti, GTX 590
if [ "$dev_int" -ge $((16#1080)) ] && [ "$dev_int" -le $((16#108F)) ]; then echo true; return; fi
# GF110 — Tesla M2090, Quadro 5010M, Quadro 7000
if [ "$dev_int" -ge $((16#1090)) ] && [ "$dev_int" -le $((16#109F)) ]; then echo true; return; fi
# GF116 / GF119 — GTX 560, GTX 460 v2, GTX 555, GT 645
if [ "$dev_int" -ge $((16#1200)) ] && [ "$dev_int" -le $((16#120F)) ]; then echo true; return; fi
# GF116 / GF108 — GTX 550 Ti, GTS 450 rev, GT 545, GT 640 (Fermi)
if [ "$dev_int" -ge $((16#1240)) ] && [ "$dev_int" -le $((16#124F)) ]; then echo true; return; fi
echo false
}
is_nvidia_maxwell() {
local dev_id
dev_id=$(lspci -nn | grep -iE "VGA|3D" | grep -i nvidia | grep -oP '10de:\K[0-9a-fA-F]+' | head -n1)
+1 -1
View File
@@ -299,7 +299,7 @@ detect_network() {
ETH_IPS+=("${ip4:-}")
ETH_DESCS+=("${ETH_DESC:-}")
;;
wl*|wlp*|wlo*)
wl*|wlp*|wlo*|wlan*)
ip4=$(ip -4 -o addr show "$iface" 2>/dev/null | awk '{print $4}')
ssid=""
[ "$state" = "UP" ] && ssid=$(iwgetid -r "$iface" 2>/dev/null || true)