mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-07-16 05:49:49 +00:00
dual-gpu fix & nvme
- Replaced the restrictive head -n1 hardware parsing with a dynamic while read loop. The script now fully detects and registers multiple coexisting GPUs (Intel+Nvidia / AMD+Nvidia). - Rewrote install_gpu_drivers() in modules/gpu.sh from a mutually exclusive case block to independent, sequential if conditions. Laptops now install both integrated firmware (Intel/AMD with non-free VA-API acceleration) and dedicated graphics stacks (Nvidia driver + 32-bit libs for Steam) seamlessly in a single pass. - Improved Nvidia Kepler architecture guards under Debian 13 (Trixie). The script now safely skips missing legacy Nvidia packages without aborting or crashing the remaining Intel/AMD configurations. - Added nvme-cli utility installation across all Debian versions. For Bookworm and Trixie, it features dynamic hardware validation via lsblk transport filtering and interactive, real-time SMART log viewing with an execution screen-pause. - Created a brand new standalone module (modules/extras/dev/jellyfin.sh) to cleanly inject Jellyfin Media Server across Debian 11, 12, and 13 using its official setup script, protected by strict SHA256 checksum validations and guaranteed error-cleanup. - Added OpenRGB to the Gaming menu for Debian 12 and 13. Implemented secure curl downloads with an emulated Chrome User-Agent to bypass Codeberg bot blocks, complete with automatic i2c-dev module configuration, user groups provisioning, and udev permission rules execution. - Standardized menu headers across 15 separate files using a centralized readonly SCROLL_HINT=" [↑↓]" variable, replacing messy hardcoded strings with clean, uniform Whiptail instructions. - update README.md
This commit is contained in:
+79
-81
@@ -10,7 +10,6 @@ source "${_GPU_DIR}/nvidia.sh"
|
||||
NVIDIA_DRIVER_MODE=""
|
||||
|
||||
install_gpu_drivers() {
|
||||
# Step 1: Info banner
|
||||
local info="This section installs the latest Mesa graphics stack\n"
|
||||
info+="from Debian backports (or stable), plus GPU firmware\n"
|
||||
info+="and monitoring tools tailored to your hardware.\n\n"
|
||||
@@ -26,9 +25,8 @@ install_gpu_drivers() {
|
||||
return
|
||||
fi
|
||||
|
||||
# Step 2: GPU detected?
|
||||
# ── Unknown GPU / VM block ──
|
||||
if [ "$GPU_TYPE" = "unknown" ] || [ -z "$GPU_TYPE" ]; then
|
||||
# --- BLOQUE B: No GPU / VM (inline, no _install_mesa_backports) ---
|
||||
local mesa_pkgs=(mesa-vulkan-drivers libgl1-mesa-dri libglx-mesa0 libegl-mesa0 mesa-va-drivers)
|
||||
local ref_ver
|
||||
ref_ver=$(apt-cache policy mesa-vulkan-drivers 2>/dev/null | awk 'NR==3 {print $2; exit}')
|
||||
@@ -63,94 +61,94 @@ install_gpu_drivers() {
|
||||
fi
|
||||
fi
|
||||
offer_generic_tools
|
||||
else
|
||||
# --- BLOQUE A: GPU detectada (AMD / Intel / NVIDIA) ---
|
||||
local ref_ver
|
||||
ref_ver=$(apt-cache policy mesa-vulkan-drivers 2>/dev/null | awk 'NR==3 {print $2; exit}')
|
||||
local ref_bpo_ver
|
||||
ref_bpo_ver=$(apt-cache madison mesa-vulkan-drivers 2>/dev/null | \
|
||||
grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
|
||||
local comp_line="Components: Vulkan, OpenGL, GLX, EGL, VA-API (64-bit)"
|
||||
echo -e "${GREEN}Graphics stack setup complete.${NC}"
|
||||
return
|
||||
fi
|
||||
|
||||
local src_line="Source: Debian Stable"
|
||||
[ -n "$ref_bpo_ver" ] && [ "$(is_backports_enabled)" == "true" ] && src_line="Source: Debian ${DEBIAN_CODENAME^}-Backports"
|
||||
# ── Detectable GPU: build plan ──
|
||||
local ref_ver
|
||||
ref_ver=$(apt-cache policy mesa-vulkan-drivers 2>/dev/null | awk 'NR==3 {print $2; exit}')
|
||||
local ref_bpo_ver
|
||||
ref_bpo_ver=$(apt-cache madison mesa-vulkan-drivers 2>/dev/null | \
|
||||
grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
|
||||
local comp_line="Components: Vulkan, OpenGL, GLX, EGL, VA-API (64-bit)"
|
||||
|
||||
local plan="GPU detected: ${GPU_DESC}\n\n"
|
||||
plan+="${src_line}\n"
|
||||
plan+="Mesa ${ref_bpo_ver:-$ref_ver}\n"
|
||||
plan+="${comp_line}\n"
|
||||
local src_line="Source: Debian Stable"
|
||||
[ -n "$ref_bpo_ver" ] && [ "$(is_backports_enabled)" == "true" ] && src_line="Source: Debian ${DEBIAN_CODENAME^}-Backports"
|
||||
|
||||
case "$GPU_TYPE" in
|
||||
amd) plan+="[+] Firmware: firmware-amd-graphics\n" ;;
|
||||
intel)
|
||||
local _gen; _gen=$(get_intel_generation)
|
||||
local _va; [ "$_gen" = "gen7-" ] && _va="i965-va-driver-shaders" || _va="intel-media-va-driver-non-free"
|
||||
plan+="[+] Firmware: firmware-intel-graphics + ${_va}\n"
|
||||
;;
|
||||
nvidia) plan+="[+] NVIDIA driver (details in next step)\n" ;;
|
||||
esac
|
||||
local plan="GPUs detected: ${GPU_DESC}\n\n"
|
||||
plan+="${src_line}\n"
|
||||
plan+="Mesa ${ref_bpo_ver:-$ref_ver}\n"
|
||||
plan+="${comp_line}\n\n"
|
||||
plan+="Components:\n"
|
||||
if $HAS_INTEL; then
|
||||
local _gen; _gen=$(get_intel_generation)
|
||||
local _va; [ "$_gen" = "gen7-" ] && _va="i965-va-driver-shaders" || _va="intel-media-va-driver-non-free"
|
||||
plan+=" [+] Intel firmware + ${_va}\n"
|
||||
fi
|
||||
if $HAS_AMD; then
|
||||
plan+=" [+] AMD firmware (firmware-amd-graphics)\n"
|
||||
fi
|
||||
if $HAS_NVIDIA; then
|
||||
plan+=" [+] NVIDIA driver (details in next step)\n"
|
||||
fi
|
||||
|
||||
if ! _confirm "Graphics Stack — ${GPU_DESC}" "$plan" 14 70; then
|
||||
echo "Skipping Graphics Stack."
|
||||
return
|
||||
fi
|
||||
if ! _confirm "Graphics Stack — ${GPU_DESC}" "$plan" 14 70; then
|
||||
echo "Skipping Graphics Stack."
|
||||
return
|
||||
fi
|
||||
|
||||
# 3. _run_cmd (via vendor functions — each with its own pkg_versions + _confirm)
|
||||
case "$GPU_TYPE" in
|
||||
amd) install_amd_firmware ;;
|
||||
intel) install_intel_firmware ;;
|
||||
nvidia)
|
||||
if [ "$DEBIAN_VERSION" = "11" ]; then
|
||||
# Bullseye: solo Fermi check, resto → nvidia-driver directo
|
||||
if type install_nvidia_bullseye &>/dev/null; then
|
||||
install_nvidia_bullseye
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
elif [ "$DEBIAN_VERSION" = "12" ]; then
|
||||
# Bookworm: Kepler intercepción → legacy, sin nvidia-detect
|
||||
if [ "$(is_nvidia_kepler)" = "true" ]; then
|
||||
if type _install_nvidia_bookworm_kepler &>/dev/null; then
|
||||
_install_nvidia_bookworm_kepler
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
elif [ "$DEBIAN_VERSION" = "13" ]; then
|
||||
# Trixie: Kepler → advertencia Nouveau, sin driver
|
||||
if [ "$(is_nvidia_kepler)" = "true" ]; then
|
||||
_msg "NVIDIA Kepler — Trixie" \
|
||||
"Su GPU es arquitectura Kepler (GKxxx).\n\n\
|
||||
Los drivers privativos NVIDIA para Kepler (rama 470)\n\
|
||||
NO están disponibles en Debian 13 (Trixie).\n\n\
|
||||
Se recomienda usar el driver libre Nouveau:\n\
|
||||
- Soporte básico de display\n\
|
||||
- Sin aceleración 3D completa\n\
|
||||
- Sin Optimus/PRIME\n\n\
|
||||
Si necesita driver privativo, use Debian 12 (Bookworm)\n\
|
||||
con nvidia-legacy-470xx-driver." 16 70
|
||||
NVIDIA_DRIVER_MODE=""
|
||||
return 1
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
# ── Sequential firmware / driver installs ──
|
||||
if $HAS_INTEL; then
|
||||
install_intel_firmware
|
||||
fi
|
||||
|
||||
if $HAS_AMD; then
|
||||
install_amd_firmware
|
||||
fi
|
||||
|
||||
if $HAS_NVIDIA; then
|
||||
if [ "$DEBIAN_VERSION" = "11" ]; then
|
||||
if type install_nvidia_bullseye &>/dev/null; then
|
||||
install_nvidia_bullseye
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
elif [ "$DEBIAN_VERSION" = "12" ]; then
|
||||
if [ "$(is_nvidia_kepler)" = "true" ]; then
|
||||
if type _install_nvidia_bookworm_kepler &>/dev/null; then
|
||||
_install_nvidia_bookworm_kepler
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
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."
|
||||
NVIDIA_DRIVER_MODE=""
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
else
|
||||
install_nvidia_driver
|
||||
fi
|
||||
fi
|
||||
|
||||
# Mesa (backports / stable)
|
||||
_install_mesa_backports
|
||||
# ── Mesa (once) ──
|
||||
_install_mesa_backports
|
||||
|
||||
# Vendor-specific tools
|
||||
case "$GPU_TYPE" in
|
||||
amd) offer_amd_tools ;;
|
||||
intel) offer_intel_tools ;;
|
||||
nvidia) offer_generic_tools ;;
|
||||
esac
|
||||
# ── Vendor-specific tools ──
|
||||
if $HAS_INTEL; then
|
||||
offer_intel_tools
|
||||
fi
|
||||
if $HAS_AMD; then
|
||||
offer_amd_tools
|
||||
fi
|
||||
if $HAS_NVIDIA; then
|
||||
offer_generic_tools
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Graphics stack setup complete.${NC}"
|
||||
|
||||
Reference in New Issue
Block a user