amd gcn legacy support & kernel overhaul

- Fixed Mesa 32-bit dependency conflicts by removing mesa-va-drivers from gaming setup; mesa-libgallium now includes VA-API for Mesa >= 25.3.3, resolving solver errors with backports (Mesa 26.x).
- Removed corectrl detection and installation from AMD tools in gpu/amd_intel.sh (retained in System Tools checklist only).
- Added zutty terminal emulator option alongside alacritty for Debian 12+ in terminals.sh.
- Overhauled Kernel menu: replaced "Backports Kernel" with "Kernel" submenu offering Stable, RT, Cloud, and Backports options; removed hardcoded Debian 11 restriction (backports hidden only on Bullseye); headers now installed automatically with all kernel variants; NVIDIA warnings added for Backports (DKMS required) and RT (driver compatibility note).
- Implemented AMD GCN legacy driver migration: is_amd_legacy_gcn() function detects GCN 1.0/1.1 GPUs via whitelist of 85 PCI IDs; offers user prompt to force amdgpu module with GRUB parameters (radeon.si_support=0, radeon.cik_support=0, amdgpu.si_support=1, amdgpu.cik_support=1); safe sed-based injection into GRUB_CMDLINE_LINUX_DEFAULT with backup and idempotency check.
- Standardized UI across 27 checklist locations: unified text to "Check [*] the packages you want installed/updated on your system."; removed SCROLL_HINT variable entirely from all code; changed OK button to "Apply" in _checklist() and _inputbox() only (not in _msg/_menu).
- Reordered gaming menu checklists: i386 moved to top position, steam/mangohud positioned immediately after for better dependency flow.
- Enhanced kernel installation prompts: all variants (Stable, RT, Cloud, Backports) now display candidate version numbers in parentheses using apt-cache policy and madison queries.
- update readme
This commit is contained in:
stornic56
2026-07-23 00:18:24 -05:00
committed by GitHub
parent da88e9fcee
commit fa81a9f1aa
29 changed files with 312 additions and 100 deletions
+66 -20
View File
@@ -1,31 +1,77 @@
#!/usr/bin/env bash
# kernel.sh
# kernel.sh — Submenu for kernel variants: Stable, RT, Cloud, Backports
install_kernel_backports() {
if [ "$(is_backports_enabled)" != "true" ]; then
_msg "Kernel" "Backports repository is not enabled.\n\nUse option 3 (Configure repositories) to enable backports\nbefore installing the backports kernel."
return 1
fi
show_kernel_menu() {
while true; do
local items=("stable" "Install linux-image-amd64")
[ "$DEBIAN_VERSION" != "11" ] && items+=("backports" "Install from backports")
items+=("rt" "Install linux-image-rt-amd64 (Preempt-RT)")
items+=("cloud" "Install linux-image-cloud-amd64")
items+=("back" "Return to main menu")
local backports_kernel_ver
backports_kernel_ver=$(get_backports_kernel_version)
local choice
choice=$(_menu "Kernel Installation" "Select kernel variant:" \
16 65 5 "${items[@]}")
[ -z "$choice" ] && break
clear
local msg="Install the latest kernel from backports?"
if [ "$backports_kernel_ver" != "unknown" ]; then
msg+="\n\nVersion: $backports_kernel_ver"
fi
msg+="\nOlder kernels remain available in GRUB."
case "$choice" in
stable) _install_kernel_package "linux-image-amd64" "Stable" "" ;;
rt) _install_kernel_package "linux-image-rt-amd64" "RT" "" ;;
cloud) _install_kernel_package "linux-image-cloud-amd64" "Cloud" "" ;;
backports)
if [ "$(is_backports_enabled)" != "true" ]; then
_msg "Kernel" "Backports repository is not enabled.\n\nUse option 3 (Configure repositories) to enable backports\nbefore installing the backports kernel."
else
_install_kernel_package "linux-image-amd64" "Backports" \
"-t ${DEBIAN_CODENAME}-backports"
fi
;;
back) break ;;
esac
done
}
if [ "$GPU_TYPE" == "nvidia" ]; then
msg+="\n\nWARNING: may break NVIDIA driver."
fi
_install_kernel_package() {
local pkg_base="$1"
local flavor="$2"
local bpo_flag="$3"
if ! _confirm "Backports Kernel" "$msg"; then
echo "Skipping kernel installation."
if ! apt-cache show "$pkg_base" >/dev/null 2>&1; then
_msg "Kernel" "Kernel not available for your current version of Debian.\n\nPackage: ${pkg_base}" 10 60
return
fi
_run_cmd "Kernel" "sudo apt install -y -t ${DEBIAN_CODENAME}-backports linux-image-amd64" "Installing kernel from backports..."
echo -e "${GREEN}Kernel installed. Reboot to use it.${NC}"
if [ "$flavor" = "Backports" ] && [ "$GPU_TYPE" = "nvidia" ]; then
if ! _confirm "Kernel" "WARNING: Backports kernel changes the kernel version.\nYour NVIDIA driver will need recompilation (DKMS).\n\nProceed?"; then
echo "Skipping."; return
fi
fi
if [ "$flavor" = "RT" ] && [ "$GPU_TYPE" = "nvidia" ]; then
_msg "Kernel — RT" "Note: Ensure your NVIDIA driver supports the RT (Preempt-RT) kernel.\nSome proprietary drivers may not work correctly." 10 60
fi
local headers_pkg="${pkg_base/linux-image-/linux-headers-}"
local ver headers_ver
if [ -n "$bpo_flag" ]; then
ver=$(apt-cache madison "$pkg_base" 2>/dev/null | grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
headers_ver=$(apt-cache madison "$headers_pkg" 2>/dev/null | grep "${DEBIAN_CODENAME}-backports" | awk '{print $3}' | head -1)
else
ver=$(apt-cache show "$pkg_base" 2>/dev/null | sed -n 's/^Version: //p' | grep -v '~bpo' | head -1)
headers_ver=$(apt-cache show "$headers_pkg" 2>/dev/null | sed -n 's/^Version: //p' | grep -v '~bpo' | head -1)
fi
[ -n "$ver" ] && ver=" ($ver)"
[ -n "$headers_ver" ] && headers_ver=" ($headers_ver)"
local summary="Install ${flavor} kernel?\n Image: ${pkg_base}${ver}\n Headers: ${headers_pkg}${headers_ver}"
[ -n "$bpo_flag" ] && summary+="\n From: ${DEBIAN_CODENAME^}-backports"
if ! _confirm "Kernel — ${flavor}" "$summary"; then
echo "Skipping."; return
fi
_run_cmd "Kernel" "sudo apt install -y ${bpo_flag} ${pkg_base} ${headers_pkg}" \
"Installing ${flavor} kernel + headers..."
echo -e "${GREEN}${flavor} kernel installed. Reboot to use it.${NC}"
_pause
}