diff --git a/debianito.sh b/debianito.sh index 1a2ed46..3e85381 100644 --- a/debianito.sh +++ b/debianito.sh @@ -116,6 +116,14 @@ kernels. Use the stable kernel provided by Bullseye." 10 60 check_root check_sudo +if ! _check_network; then + echo -e "${YELLOW}──────────────────────────────────────────${NC}" + echo -e "${YELLOW} No internet connectivity detected.${NC}" + echo -e "${YELLOW} Package installation will fail without network.${NC}" + echo -e "${YELLOW} You can use: System Info, User Privileges, and${NC}" + echo -e "${YELLOW} other offline features.${NC}" + echo -e "${YELLOW}──────────────────────────────────────────${NC}" +fi check_system_time sync_system_time diff --git a/docs/gaming.md b/docs/gaming.md index 19de5a7..7de9b6f 100644 --- a/docs/gaming.md +++ b/docs/gaming.md @@ -116,16 +116,35 @@ This approach eliminates the security risk of running OpenRGB as root while main | **Temurin 17** | Modern Minecraft servers, newer game clients | Balances performance and compatibility for post-1.16+ game versions | | **Temurin 21** | Latest game engines, cutting-edge mods | Provides best performance for modern Java applications | -The script injects the official Adoptium repository to pull community-maintained builds rather than Oracle's proprietary JRE: -```bash -# Repository injection logic (simplified) -echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list -``` +**Repository Management via extrepo:** The script leverages the `extrepo` utility to manage external repositories cleanly rather than manually injecting repository URLs into system files. This approach offers several advantages: + +1. **Automated Keyring Handling:** `extrepo` manages GPG keys and source file configurations automatically, eliminating manual intervention with `/etc/apt/sources.list.d/`. +2. **Dependency Resolution:** The utility checks for its own installation and handles the enabling of the Adoptium Temurin repository before proceeding with package installation. +3. **Maintenance Safety:** Updates to the upstream repository are reflected through `extrepo` without requiring direct edits to system configuration files, reducing the risk of breakage during OS updates. + +**Version Selection Logic:** Users can choose which Temurin version to install based on their specific game requirements via a TUI menu (`install_minecraft_java()`). The module justifies offering all three versions because: + +1. **Backward Compatibility:** Java 8 remains in use by many Minecraft mods and older game clients that haven't been updated for newer JVMs +2. **Performance Optimization:** Java 21 provides the best performance characteristics for modern games with heavy multithreading requirements +3. **Security Updates:** All Temurin versions receive regular security patches from the Eclipse Foundation community + +The installation process ensures clean repository management without polluting the system with multiple conflicting JRE installations, maintaining Debian's package integrity while providing flexibility for different gaming scenarios. It automatically installs `extrepo` if not present and enables the Adoptium source before proceeding with version-specific packages (e.g., `temurin-8-jre`, `temurin-17-jre`). + + +### References: + +- [https://wiki.debian.org/Steam](https://wiki.debian.org/Steam) +- [wiki.archlinux.org/title/Steam](wiki.archlinux.org/title/Steam) +- [https://repo.steampowered.com/steam/](https://repo.steampowered.com/steam/) +- [https://www.protondb.com/](https://www.protondb.com/) +- [https://github.com/lutris/lutris](https://github.com/lutris/lutris) +- [https://github.com/lutris/docs/blob/master/InstallingDrivers.md](https://github.com/lutris/docs/blob/master/InstallingDrivers.md) +- [https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher) +- [https://github.com/flightlessmango/Mangohud](https://github.com/flightlessmango/Mangohud) +- [https://github.com/feralinteractive/gamemode](https://github.com/feralinteractive/gamemode) +- [https://gitlab.com/CalcProgrammer1/OpenRGB](https://gitlab.com/CalcProgrammer1/OpenRGB) +- [https://adoptium.net/es/installation/linux](https://adoptium.net/es/installation/linux) + -**Version Selection Logic:** Users can choose which Temurin version to install based on their specific game requirements. The module justifies offering all three versions because: -1. **Backward Compatibility:** Java 8 remains in use by many Minecraft mods and older game clients that haven't been updated for newer JVMs -2. **Performance Optimization:** Java 21 provides the best performance characteristics for modern games with heavy multithreading requirements -3. **Security Updates:** All Temurin versions receive regular security patches from the Eclipse Foundation community -The installation process ensures clean repository management without polluting the system with multiple conflicting JRE installations, maintaining Debian's package integrity while providing flexibility for different gaming scenarios. diff --git a/docs/gpu.md b/docs/gpu.md index 1a50d0c..85f0ec3 100644 --- a/docs/gpu.md +++ b/docs/gpu.md @@ -48,7 +48,8 @@ This "detect-then-deploy" model prevents users from installing unnecessary drive | **Gen4** (Broadwater) | 65nm | GMA X4500, GMA X4500HD | `i915` | `i915` | Not supported | Predecessor to HD Graphics. Very limited support. The i915 DRI driver is the original, now obsolete. | | **Gen5** (Ironlake) | 32nm | HD Graphics (Westmere/Arrandale) | `i915` | `crocus` | Not supported | First generation "HD Graphics". OpenGL up to 3.3 only. Legacy driver `i965` was **removed** in Mesa 24.1, so `crocus` is now the only option. | | **Gen6** (Sandy Bridge) | 32nm | HD Graphics 2000/3000 | `i915` | `crocus` | Not supported | Significant performance improvement. Maximum OpenGL 3.3. | -| **Gen7** (Ivy Bridge) | 22nm | HD Graphics 2500/4000 | `i915` | `crocus` | Not supported | First generation at 22nm. `crocus` is the recommended driver. | +| **Gen7** (Ivy Bridge) | 22nm | HD Graphics 2500/4000 | `i915` | `crocus` | `ANV/HASVK ([incomplete/broken](https://www.reddit.com/r/vulkan/s/Hnf5zU8WZY))` | First Gen at 22nm. `crocus` is the recommended OpenGL driver. Vulkan is exposed but completely non-conformant (0.0.0.0 ), lacks basic features (e.g., texture swizzle), and is [unusable for real-world tasks.](www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)| +| **Gen7** (Bay Trail) | 22nm | HD Graphics (Bay Trail) | `i915` | `crocus` | `ANV ([incomplete](https://lists.debian.org/debian-user/2023/07/msg00550.html))` | `conformanceVersion = 0.0.0.0` Support is experimental up to Vulkan 1.2, lacks basic extensions, and may cause instability. The separate HASVK driver exists but is not used on this system. | | **Gen7.5** (Haswell) | 22nm | HD Graphics 4600, Iris Pro 5200 | `i915` | `crocus` | `hasvk` | Vulkan support via community driver `hasvk` (Vulkan 1.3). | | **Gen8** (Broadwell) | 14nm | HD Graphics 5300, Iris Pro 6200, Iris 6100 | `i915` | `iris/crocus` | `hasvk` | First generation at 14nm, `iris` becomes the main OpenGL driver. | | **Gen9** (Skylake) | 14nm | HD Graphics 530, Iris 540/550 | `i915` | `iris` | `anv` | Mature architecture with strong Linux support. Major performance boost for iGPU. | @@ -59,7 +60,7 @@ This "detect-then-deploy" model prevents users from installing unnecessary drive | **Xe2-LPG** (Lunar Lake) | TSMC N3B | Arc Graphics (Xe2-LPG - 8 Xe-Cores) | `i915?/xe` | `iris` | `anv` | First iGPU with Xe2 architecture (Battlemage). | | **Xe3-LPG** (Panther Lake) | Intel 18A | Arc Graphics (Xe3 iGPU) | `i915?/xe` | `iris` | `anv` | High-power iGPU. Requires Kernel 6.19 and Mesa 26 as base. | | **Xe-HPG** (Alchemist) | TSMC N6 | **Arc A380, A580, A750, A770** (dGPU) | `i915/xe` | `iris` | `anv` | First modern dGPU (Arc). Support since Kernel 6 and Mesa 22. | -| **Xe2-HPG** (Battlemage) | TSMC N5 | **Arc B580, B570** (dGPU) | `i915/xe` | `iris` | `anv` | Second generation dGPU. Very solid day-one Linux support since Kernel 6.12 and Mesa 24.2 | +| **Xe2-HPG** (Battlemage) | TSMC N5 | **Arc B570, B580** (dGPU) | [`i915/xe`](https://www.phoronix.com/review/intel-xe-i915-linux-619) | `iris` | `anv` | Second generation dGPU. Very solid day-one Linux support since Kernel 6.12 and Mesa 24.2 | --- @@ -71,6 +72,7 @@ This "detect-then-deploy" model prevents users from installing unnecessary drive * **Legacy Hardware (Gen5-Gen8)**: The classic `i965` driver was **officially removed from Mesa in version 24.1**. **[`crocus`](https://www.phoronix.com/news/Intel-Crocus-Default-Gallium3D)** (Gallium3D) is the only active driver for this legacy hardware. * **Modern Hardware (Gen9 and Xe)**: **`iris`** is the standard driver. It works excellently on both iGPUs and Arc dGPUs (Alchemist/Battlemage). * **Vulkan**: + * **Old Hardware about Ivy Bridge and Bay Trail (Gen7)**: Although the ANV/HASVK drivers expose these GPUs as Vulkan devices (reporting API versions as high as 1.2 or 1.3), their state is completely non-compliant (conformanceVersion = 0.0.0.0). The support is purely theoretical, it lacks basic hardware features (e.g., texture swizzle on Ivy Bridge) and is unstable or unusable for real-world applications. Because of this, in Mesa 22.3, the Gen7/Gen8 Vulkan code was separated from the main driver (ANV) and moved to the legacy HASVK driver to avoid hindering the development of modern hardware. You can read the technical details of this decision [here](https://www.phoronix.com/news/Intel-HASVK-Old-Vulkan-Gen7-8). * **Legacy Hardware (Gen7.5 - Gen8)**: Uses **[`hasvk`](https://www.phoronix.com/news/Intel-ANV-HASVK-Split-Merged)**, a community-maintained driver (not directly by Intel engineers), offering Vulkan 1.2? on 2013-era hardware. *Additionally, in early 2024, the compiler code shared between `iris` and `anv` for [Gen8](https://www.phoronix.com/news/Intel-Mesa-Splitting-Gen8) was also isolated, following the same principle: to enable faster development for modern hardware without breaking Broadwell support*. * **Modern Hardware (Gen9+)**: **[`anv`](https://docs.mesa3d.org/drivers/anv.html)** is Intel's official driver. On recent hardware (Gen12+, Arc) it reaches the **Vulkan 1.4 standard**. @@ -118,7 +120,7 @@ These generations depend **exclusively** on the proprietary driver and closed st | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | **Fermi**
*(GF100/110)* | **390.xx** (Legacy) | `nvidia` (Closed) | **Vulkan 1.0** | No | **CUDA 8.0** | Last driver to support this architecture. Has not received security fixes for years. Only viable for completely offline systems. | | **Kepler**
*(GK100/110)* | **470.xx** (Legacy) | `nvidia` (Closed) | **Vulkan 1.2** | No | **CUDA 11.8** | Last generation to receive "Legacy" status. Good compatibility with OpenGL 4.6, but Vulkan support stalled at 1.2. | -| **Maxwell**
*(GM100/200)* | **580.xx** (Old Standard) | `nvidia` (Closed) | **Vulkan 1.3** | No | **CUDA 12.0** | Removed from official support in driver 555 (CUDA 12.1). Requires pinning system to branch 550. | +| **Maxwell**
*(GM100/200)* | **580.xx** (Old Standard) | `nvidia` (Closed) | **Vulkan 1.3** | No | **CUDA 12.0** | Removed from official support in driver 580 (CUDA 12.1). | | **Pascal**
*(GP100/102/104)* | **580.xx** (Old Standard) | `nvidia` (Closed) | **Vulkan 1.3** | No | **CUDA 12.0** | Shares same fate as Maxwell. Still very popular (GTX 1060/1080), but requires blocking packages (e.g., in Debian) to prevent updates that break graphics support. | --- @@ -131,7 +133,7 @@ Starting with Turing, NVIDIA introduced the **open kernel module**. From driver | **Turing**
*(TU100/102/116)* | 525.xx to 610+ | `nvidia` (**Open Module**) | **Vulkan 1.3** | **Yes** (Vulkan 1.3) | **CUDA 12.8+** | First generation to use Open Kernel Module (introduced in 515, default in 525). *Note:* Security processor firmware (GSP) remains a closed blob. Excellent NVK support. | | **Ampere**
*(GA100/102/104/107)* | 525.xx to 610+ | `nvidia` (**Open Module**) | **Vulkan 1.3** | **Yes** (Vulkan 1.3) | **CUDA 12.8+** | Mature support in both proprietary driver and NVK. For RTX 3060/3080/3090, NVK offers extremely competitive performance versus proprietary in many scenarios. | | **Ada Lovelace**
*(AD100/102/103/104)* | 525.xx to 610+ | `nvidia` (**Open Module**) | **Vulkan 1.3** | **Yes** (Vulkan 1.3) | **CUDA 12.8+** | NVK added full Ada support recently. Proprietary driver still required if hardware Ray Tracing or DLSS 3 (Frame Generation) is needed, as NVK does not yet implement these proprietary extensions. | -| **Blackwell**
*(GB100/102/202)* | [570](https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-570-211-01/index.html) to 610+ | `nvidia` (**Open Module**) | **Vulkan 1.3** | **Yes** (In development) | **CUDA 12.8+** | Latest generation architecture (RTX 5090/5080). NVK support is landing in the most recent kernel versions (6.12+) and Mesa (24.3+). Requires very updated `linux-firmware`. | +| **Blackwell**
*(GB100/102/202)* | [570.xx](https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-570-211-01/index.html) to 610+ | `nvidia` (**Open Module**) | **Vulkan 1.3** | **Yes** (In development) | **CUDA 12.8+** | Latest generation architecture (RTX 5090/5080). NVK support is landing in the most recent kernel versions (6.12+) and Mesa (24.3+). Requires very updated `linux-firmware`. | #### 💡 Quick context glossary for documentation: * **Open Module:** Starting with driver 515, [NVIDIA releases code that interacts directly with the Linux kernel under MIT/GPL license](https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/). However, the GPU still requires loading a proprietary closed microcode called **GSP (GPU System Processor)** to boot. diff --git a/docs/zram.md b/docs/zram.md index 76be697..50b84d2 100644 --- a/docs/zram.md +++ b/docs/zram.md @@ -241,3 +241,11 @@ To ensure ZRAM persists across reboots, the script writes configuration to `/etc ```bash echo "zram" | sudo tee /etc/modules-load.d/zram.conf ``` + + +### References: + +- [https://docs.kernel.org/admin-guide/blockdev/zram.html](https://docs.kernel.org/admin-guide/blockdev/zram.html) +- [https://wiki.debian.org/ZRam](https://wiki.debian.org/ZRam) +- [https://wiki.archlinux.org/title/Zram](https://wiki.archlinux.org/title/Zram) +- [https://wiki.gentoo.org/wiki/Zram](https://wiki.gentoo.org/wiki/Zram) diff --git a/modules/extras/internet/internet.sh b/modules/extras/internet/internet.sh index d3dde37..4113c7e 100644 --- a/modules/extras/internet/internet.sh +++ b/modules/extras/internet/internet.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # internet.sh — Browsers, email, VPN # extrepo-powered: mozilla, floorp, palemoon, librewolf, tailscale, mullvad, protonvpn +# firefox-esr from Debian repos (with locale auto-detect) # ── Helpers extrepo ── _ensure_extrepo() { @@ -122,9 +123,11 @@ _cat_internet() { local epiphany_state; epiphany_state=$(_state "epiphany-browser") local falkon_state; falkon_state=$(_state "falkon") local firefox_state="OFF" - if command -v firefox &>/dev/null && ! command -v firefox-esr &>/dev/null; then + if command -v firefox &>/dev/null && ! is_installed "firefox-esr"; then firefox_state="ON" fi + local firefox_esr_state + firefox_esr_state=$(_state "firefox-esr") local floorp_state; floorp_state=$(_state "floorp") local konqueror_state; konqueror_state=$(_state "konqueror") local librewolf_state; librewolf_state=$(_state "librewolf") @@ -149,6 +152,7 @@ _cat_internet() { "epiphany-browser" "GNOME web browser$(_inst epiphany-browser)" "$epiphany_state" \ "falkon" "KDE web browser (QtWebEngine)$(_inst falkon)" "$falkon_state" \ "firefox" "Firefox from Mozilla (replaces ESR)" "$firefox_state" \ + "firefox-esr" "Firefox ESR (official Debian + locale auto)" "$firefox_esr_state" \ "floorp" "Firefox-based browser (extrepo)$(_inst floorp)" "$floorp_state" \ "konqueror" "KDE file manager / web browser$(_inst konqueror)" "$konqueror_state" \ "librewolf" "Privacy-focused Firefox fork (extrepo)$(_inst librewolf)" "$librewolf_state" \ @@ -170,11 +174,19 @@ _cat_internet() { local cleaned; cleaned=$(echo "$choices" | tr -d '"') + if echo "$cleaned" | grep -q "firefox" && echo "$cleaned" | grep -q "firefox-esr"; then + _msg "Firefox" "You selected both Firefox (Mozilla) and Firefox ESR.\nPlease choose only one Firefox variant." 10 60 + return + fi + for pkg in $cleaned; do case $pkg in firefox) install_firefox_mozilla ;; + firefox-esr) + install_firefox_esr + ;; floorp) _enable_floorp_repo _run_install floorp @@ -239,7 +251,12 @@ _cat_internet() { } install_firefox_mozilla() { - if command -v firefox &>/dev/null && ! command -v firefox-esr &>/dev/null; then + if [ "$DEBIAN_VERSION" -lt 12 ] 2>/dev/null; then + _msg "Firefox" "Mozilla Firefox is only available on\nDebian 12 (Bookworm) and 13 (Trixie).\n\nSkipping installation." 10 60 + return 1 + fi + + if command -v firefox &>/dev/null && ! is_installed "firefox-esr"; then echo "Firefox (Mozilla) is already installed." return fi @@ -255,6 +272,36 @@ install_firefox_mozilla() { fi _enable_mozilla_repo - _run_install firefox + _run_cmd "Firefox" "sudo apt install -y firefox" "Installing Firefox (Mozilla)..." echo -e "${GREEN}Firefox (Mozilla) installed.${NC}" } + +install_firefox_esr() { + if is_installed "firefox-esr"; then + echo "Firefox ESR is already installed." + return + fi + + if command -v firefox &>/dev/null; then + if _confirm "Firefox" "Mozilla Firefox is installed.\nRemove it before installing Firefox ESR?"; then + echo "Removing Mozilla Firefox..." + sudo apt remove -y firefox + else + echo "Keeping Mozilla Firefox." + return + fi + fi + + _run_cmd "Firefox ESR" "sudo apt install -y firefox-esr" "Installing Firefox ESR..." + + local lang_pkg + lang_pkg=$(_detect_lang_pkg "firefox-esr-l10n") + if [ -n "$lang_pkg" ]; then + _run_cmd "Firefox ESR Locale" "sudo apt install -y ${lang_pkg}" \ + "Installing locale: ${lang_pkg}..." + else + echo "No matching locale package found for your language." + fi + + echo -e "${GREEN}Firefox ESR installed.${NC}" +} diff --git a/modules/extras/office/office.sh b/modules/extras/office/office.sh index 53b4ad6..7e5ecb3 100644 --- a/modules/extras/office/office.sh +++ b/modules/extras/office/office.sh @@ -33,16 +33,8 @@ install_libreoffice_bpo() { return fi - local sys_lang - sys_lang=$(echo "${LANG:-en}" | cut -c1-2 | tr '[:upper:]' '[:lower:]') - - local lang_pkg="" - if [ "$sys_lang" != "en" ]; then - local candidate="libreoffice-l10n-${sys_lang}" - if apt-cache show "$candidate" &>/dev/null 2>&1; then - lang_pkg="$candidate" - fi - fi + local lang_pkg + lang_pkg=$(_detect_lang_pkg "libreoffice-l10n") local ver ver=$(apt-cache policy libreoffice 2>/dev/null | awk 'NR==3 {print $2; exit}') diff --git a/modules/utils.sh b/modules/utils.sh index 77436ea..d7f39c7 100644 --- a/modules/utils.sh +++ b/modules/utils.sh @@ -48,7 +48,7 @@ check_system_time() { fi local year year=$(date +%Y) - if [ "$year" -lt 2026 ]; then + if [ "$year" -lt 2025 ]; then local msg="System date/time appears to be incorrect\n" msg+="($(date '+%Y-%m-%d %H:%M')). This will prevent Debian\n" msg+="repositories from working properly.\n\n" @@ -58,7 +58,7 @@ check_system_time() { sync_system_time local new_year new_year=$(date +%Y) - if [ "$new_year" -ge 2026 ]; then + if [ "$new_year" -ge 2025 ]; then echo -e "${GREEN}Time synced: $(date '+%Y-%m-%d %H:%M')${NC}" else echo -e "${RED}Could not sync time automatically.${NC}" @@ -581,3 +581,52 @@ get_backports_kernel_version() { echo "unknown" fi } + +# ---------------------------------- +# Language helpers +# ---------------------------------- +_detect_lang() { + local sys_lang + sys_lang=$(echo "${LANG:-en}" | cut -c1-2 | tr '[:upper:]' '[:lower:]') + echo "$sys_lang" +} + +_detect_lang_pkg() { + local base="$1" + local lang2 + lang2=$(_detect_lang) + + [ "$lang2" = "en" ] && echo "" && return + + local full="${LANG%%.*}" + local hyphenated_full + hyphenated_full=$(echo "$full" | tr '[:upper:]' '[:lower:]' | tr '_' '-') + local pkg + + pkg=$(apt-cache search "^${base}-${hyphenated_full}$" 2>/dev/null | awk 'NR==1{print $1}') + [ -z "$pkg" ] && pkg=$(apt-cache search "^${base}-${lang2}$" 2>/dev/null | awk 'NR==1{print $1}') + [ -z "$pkg" ] && pkg=$(apt-cache search "^${base}-all$" 2>/dev/null | awk 'NR==1{print $1}') + + echo "$pkg" +} + +# ---------------------------------- +# Network connectivity check +# ---------------------------------- +_check_network() { + local target="${1:-deb.debian.org}" + + if command -v ping &>/dev/null; then + ping -c 1 -W 3 "$target" &>/dev/null && return 0 + fi + + if command -v wget &>/dev/null; then + wget -q --timeout=5 --spider "http://${target}" &>/dev/null && return 0 + fi + + if command -v curl &>/dev/null; then + curl -s --connect-timeout 5 -o /dev/null "http://${target}" &>/dev/null && return 0 + fi + + return 1 +}