mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-09-14 06:02:35 +00:00
nvidia driver stability & version menu
- Refactored NVIDIA installation with robust DKMS verification (`_verify_nvidia_dkms_build`). Automatically detects build failures for the current kernel and repairs them via `dpkg-reconfigure`, ensuring modules compile against active kernels without manual intervention.
- Added Secure Boot detection (`_nvidia_secure_boot_enabled`) to warn users if the NVIDIA module is compiled but unsigned, preventing boot issues on systems with UEFI security enabled.
- Implemented `_configure_nvidia_wayland()` for Wayland support. Detects hybrid laptops (Optimus) vs desktops using DMI chassis types and battery presence. Configures `NVreg_PreserveVideoMemoryAllocations` only for desktops to avoid Optimus conflicts, and adds architecture-specific guards (e.g., Kepler warnings).
- Introduced version selection menu (`_show_nvidia_version_menu`). Users can select driver versions (470/535/550/590/595) based on Debian release. Parametrized CUDA repo installation for 590/595 with post-install DKMS branch verification.
- Fixed state inconsistency bugs in `NVIDIA_DRIVER_MODE`. Added guards to ensure configuration files are only written upon successful installation, preventing partial setups after failures (e.g., backports, CUDA repo).
- Improved hardware detection helpers (`_is_hybrid_laptop`, `_get_nvidia_arch_family`). Prevents false positives on multi-GPU desktops by verifying iGPU presence alongside dGPU.
- Updated Java/Minecraft support in `modules/extras/java.sh`. Added Temurin 25 ("Minecraft 26+") to the runtime selection menu and updated documentation.
- Enhanced utility robustness (`_run_cmd`, `_configure_lightdm`). Properly propagates exit codes from commands and handles failures gracefully (yellow warnings + skip) instead of crashing under `set -e`.
This commit is contained in:
+9
-3
@@ -628,12 +628,14 @@ _pause() {
|
||||
}
|
||||
|
||||
# Blocks 2-4: run → pause
|
||||
# Returns the exit code of the executed command so callers can abort
|
||||
# or adjust state (e.g. NVIDIA_DRIVER_MODE) when a step fails.
|
||||
_run_cmd() {
|
||||
local title="$1" command="$2" success_msg="${3:-Running...}"
|
||||
echo -e "${GREEN}[+]${NC} $success_msg"
|
||||
echo "──────────────────────────────────────────────"
|
||||
bash -c "$command"
|
||||
local rc=$?
|
||||
local rc=0
|
||||
bash -c "$command" || rc=$?
|
||||
echo "──────────────────────────────────────────────"
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo -e "${GREEN}[+]${NC} Done."
|
||||
@@ -641,6 +643,7 @@ _run_cmd() {
|
||||
echo -e "${RED}[-]${NC} Failed (exit code: $rc)."
|
||||
fi
|
||||
_pause
|
||||
return "$rc"
|
||||
}
|
||||
|
||||
# Blocks 1-4: confirm → run → pause
|
||||
@@ -757,7 +760,10 @@ _check_network() {
|
||||
if _confirm "LightDM" "Configure LightDM to show the user list on the login screen?\n\nThis disables greeter-hide-users."; then
|
||||
if ! is_installed lightdm-gtk-greeter-settings; then
|
||||
echo -e "${YELLOW}Installing lightdm-gtk-greeter-settings...${NC}"
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y lightdm-gtk-greeter-settings
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive apt install -y lightdm-gtk-greeter-settings; then
|
||||
echo -e "${YELLOW}lightdm-gtk-greeter-settings could not be installed — LightDM configuration skipped.${NC}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
local conf_dir="/etc/lightdm/lightdm.conf.d"
|
||||
|
||||
Reference in New Issue
Block a user