Displays managers & zram menu

- LightDM Overhaul: Rewrote `install_lightdm()` logic to verify both lightdm and lightdm-gtk-gtk-greeter-settings. Now installs the trio in a single command if missing, skipping only when fully present. Added "Enable autologin" option modifying `/etc/lightdm/lightdm.conf` with robust `sed` patterns for `SUDO_USER`. Fixed missing `debconf-set-selections` to ensure LightDM is set as default during installation.
- GDM3 Implementation: Created a new sub-menu in `modules/desktop_display.sh` allowing independent installation of GDM3, User List toggle (hide/show), Autologin configuration via `/etc/gdm3/daemon.conf`, and conditional "Force Enable Wayland on NVIDIA" for Debian 12/13 using udev symlinks.
- SDDM Integration: Added SDDM as option 3 in the Display Manager menu. Implemented automatic session detection (Wayland > X11) to populate `/etc/sddm.conf.d/autologin.conf` without user input, defaulting to plasmawayland, lxqt-wayland, or generic fallbacks.
- greetd support: Added conditional support for Debian 12 and 13 only. Implemented sub-menu with base install, recommended `tuigreet` (with backports handling for Bookworm), and other manual setup options (`gtkgreet`, `nwg-hello`, `wlgreet`) exclusive to Trixie. 
- ZRAM UX Improvements: Updated descriptions in `modules/zram.sh` to explicitly mention I/O reduction and responsiveness benefits for low-RAM systems (e.g., 4GB). Cleaned up compression algorithm labels (`lz4`, `zstd`) to remove redundancy in menu values.
- General Code Quality: Standardized all user-facing messages to English across modules. Ensured independent package installation checks prevent script abortion if one DM fails, while maintaining strict error handling for system configurations.
- update docs and readme
This commit is contained in:
stornic56
2026-07-16 01:02:51 -05:00
committed by GitHub
parent ba72fd9f87
commit d8878b67e1
14 changed files with 518 additions and 87 deletions
+15 -36
View File
@@ -1,10 +1,11 @@
# Debianito - Post-Installation Automation for Debian
<h1 align="center">Debianito - Post-Installation Automation for Debian</h1>
<div align="center">
Debianito is a user-friendly post-installation automation script for Debian 11 (Bullseye), Debian 12 (Bookworm) and Debian 13 (Trixie). It streamlines system configuration, driver installation (including NVIDIA drivers with legacy support via rescue environment), repository setup with backports support, gaming tools integration, and more with an interactive menu-driven interface.
Debianito is a user-friendly post-installation automation script for Debian 11 (Bullseye), Debian 12 (Bookworm) and Debian 13 (Trixie). It streamlines system configuration, driver installation (including NVIDIA drivers), repository setup with backports support, gaming tools integration, and more with an interactive menu-driven interface.
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-red.svg?style=for-the-badge&logo=gnu&logoColor=white)](https://github.com/stornic56/debianito-post-install/blob/main/LICENSE)
![Script](media/gift/script.gif)
</div>
@@ -55,10 +56,11 @@ After running the script:
| **6** | [Backports Kernel](/docs/kernel.md) | Install latest kernel from Debian backports|
| **7** | [Gaming Setup ](/docs/gaming.md)| Steam, Heroic Games Launcher, [RetroArch](/docs/retroarch.md) GameMode, MangoHud, OpenRGB, Java JRE (Temurin 8/17/21) |
| **8** | [ZRAM](/docs/zram.md)| Configure compressed RAM for memory optimization|
| **9** | Swap Management| Manage swap file or partition size and enable/disable swap space for system stability|
| **9** | [Swap Management](/docs/swap.md)| Manage swap file or partition size and enable/disable swap space for system stability|
| **10** | Install Programs and Software | Browse and install packages by category (Development, Themes, System Tools, etc.) using APT |
| **11** | Boot Rescue & Repair| Fix GRUB bootloader issues, chroot repair, or restore system boot configuration|
| **12** | Exit | Return to terminal |
| **11** | [Boot Rescue + GRUB](/docs/boot.md))| Config and fix GRUB bootloader issues, chroot repair, or restore system boot configuration|
| **12** | [Desktop & Display](/docs/desktops_display.md)| Install and configure desktops and display managers|
| **13** | Exit | Return to terminal |
### Install Programs and Software (Option 10)
@@ -76,9 +78,10 @@ The submenu offers the next categories:
| **7** | Servers & Dev Tools | Web servers (Nginx/Apache), databases (PostgreSQL/MariaDB), Java Development Kit (Temurin 17/21/25 JDK), Docker, Python, SSH tools, Jellyfin Server and essential utilities |
| **8** | Security & Networking | Wireshark, tcpdump, Zenmap, ClamAV, UFW, fail2ban |
| **9** | Software Centers | Choose a software store to install. |
| **10** | System Tools | htop/btop, ncdu, Timeshift, tmux/screen, nvme-cli, Flatpak support, extension repository manager and qemu/virtmanager |
| **11** | Fetch / System Info | fastfetch/neofetch, hyfetch, Linux logo and screenfetch |
| **12** | Back to Main Menu | Return directly to the main Debianito menu (exit submenu) |
| **10** | Office & Productivity | Choose a software store to install. |
| **12** | System Tools | htop/btop, ncdu, Timeshift, tmux/screen, nvme-cli, Flatpak support, extension repository manager and qemu/virtmanager |
| **12** | Fetch / System Info | fastfetch/neofetch, hyfetch, Linux logo and screenfetch |
| **13** | Back to Main Menu | Return directly to the main Debianito menu (exit submenu) |
---
@@ -94,34 +97,6 @@ The submenu offers the next categories:
| `modules/gaming/` | Gaming launcher and optimization scripts: Steam, Heroic, Lutris, performance tools. |
| `modules/gpu/` | GPU driver installation scripts for AMD and NVIDIA with architecture detection. |
| `modules/repos/` | Repository management scripts: migration tool (`migrate.sh`) and format detection (`repo_detect.sh`). |
| `modules/extras/design/` | Multimedia & design tools installer (Blender, GIMP, Kdenlive, OBS). |
| `modules/extras/dev/` | Development tools installer with special handling for Jellyfin and Java. |
| `modules/extras/download/` | Download tools installer (aria2, FileZilla) and torrent clients (qBittorrent, Transmission). |
| `modules/extras/essential/` | Essential package installer for basic system utilities on older Debian versions. |
| `modules/extras/fetch/` | System information fetcher tools (neofetch, screenfetch, linuxlogo). |
| `modules/extras/internet/` | Internet tools installer: browsers, email clients, download managers. |
| `modules/extras/java.sh` | Java runtime installer for Minecraft and development (Temurin 8/17/21). |
| `modules/extras/office/` | Office productivity suite installer (LibreOffice, GIMP alternatives). |
| `modules/extras/players/` | Media player installer (MPV, VLC) with codec support. |
| `modules/extras/programming/` | Code editors and IDEs installer (Vim, Neovim, Emacs, Kate). |
| `modules/extras/security/` | Security tools installer: ClamAV, Fail2Ban, UFW, Wireshark. |
| `modules/extras/system/` | System utilities installer with software center options (GNOME Software, Discover). |
| `modules/extras/themes/` | Desktop customization installer: themes, icons, cursors, fonts. |
| `modules/gaming/_helpers.sh` | Shared helper functions for gaming modules (32-bit support, Mesa drivers). |
| `modules/gpu/amd_intel.sh` | AMD and Intel GPU firmware + monitoring tools (radeontop, nvtop, vainfo). |
| `modules/gpu/_helpers.sh` | Shared helper functions for GPU detection (NVIDIA architecture checks). |
| `modules/nvidia.sh` | NVIDIA driver installer with multi-architecture support (Kepler, Fermi, Maxwell, Pascal, Blackwell). |
| `modules/amd_intel.sh` | AMD and Intel GPU firmware + monitoring tools installation. |
| `modules/kernel.sh` | Kernel management: backports kernel installation and detection. |
| `modules/repos/migrate.sh` | Branch migration tool for Debian stable → testing/SID with backup/rollback. |
| `modules/repos/repo_detect.sh` | Repository format detection (DEB822 vs classic) for idempotent configuration. |
| `modules/rescue.sh` | Boot rescue and repair tools: GRUB fix, chroot repair, system restore. |
| `modules/sudo_config.sh` | Sudo configuration: group membership, passwordless sudo, home directory ownership. |
| `modules/swap.sh` | Swap management: file/partition size configuration and enable/disable swap space. |
| `modules/sysinfo.sh` | System information detection and display (OS, CPU, RAM, GPU, storage). |
| `modules/utils.sh` | Utility functions shared across modules (color codes, confirmation dialogs, installation helpers). |
| `modules/zram.sh` | ZRAM configuration for compressed RAM optimization. |
| `README.md` | Project documentation and usage instructions. |
```bash
├── debianito.sh
@@ -135,12 +110,16 @@ The submenu offers the next categories:
│   ├── system_info.md
│   ├── user_priv_feed.md
│   └── zram.md
├── media
│   └── gift
│   └── script.gif
├── modules
│   ├── bluetooth.sh
│   ├── bullseye
│   │   ├── extras.sh
│   │   ├── legacy.sh
│   │   └── repos.sh
│   ├── desktop_display.sh
│   ├── extras
│   │   ├── design
│   │   │   └── design.sh
+3 -3
View File
@@ -55,11 +55,11 @@ main_menu() {
sudo -v >/dev/null 2>&1 || true
local STATE_REFRESHED=false
local choice
choice=$(_menu "DEBIANITO — simple configurator script" "" \
choice=$(_menu "DEBIANITO — Simple Configurator Script" "" \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"1" "System Info" \
"1" "System Information" \
"2" "User Privileges & Feedback" \
"3" "Configure repositories" \
"3" "Configure Repositories" \
"4" "Firmware, Wireless & Bluetooth" \
"5" "Graphics Drivers & Mesa Stack" \
"6" "Backports Kernel" \
+73
View File
@@ -0,0 +1,73 @@
## Option 11: Boot Rescue & Repair
### 1. What does this component do?
This component serves as a comprehensive rescue toolkit designed to diagnose and fix boot-related issues on Debian systems, specifically targeting GRUB configuration, UEFI Secure Boot integrity, and initrd image validity. It provides three primary operations: configuring the GRUB boot menu behavior (including timeout adjustments and visibility settings), repairing UEFI Secure Boot by reinstalling signed bootloader packages after kernel or driver changes, and regenerating initramfs images to resolve missing driver errors. All modifications are protected by automatic backup creation before system files are altered, with built-in rollback mechanisms that restore the original state if any operation fails during execution.
### 2. Logical Execution Flow
**Block 1 — GRUB Boot Menu Settings**
- **Menu Options:** Users select from four presets or a custom option to control boot behavior:
1. Hide GRUB menu entirely (Fastest boot, requires holding ESC during power-on).
2. Show 3-second countdown (Faster boot).
3. Show menu for 5 seconds (Default behavior).
4. Custom timeout (User inputs specific seconds; -1 allows indefinite wait).
- **Variable Application:** Each selection updates three core variables: `GRUB_TIMEOUT`, `GRUB_TIMEOUT_STYLE`, and `GRUB_RECORDFAIL_TIMEOUT`. The custom option also allows setting `GRUB_DISABLE_OS_PROBER` to prevent extra entries.
- **Backup & Safety:** Before applying changes, the script creates a timestamped backup of `/etc/default/grub`. It writes an override configuration file at `/etc/default/grub.d/99_script_override.cfg` to ensure settings persist across updates.
- **Execution & Rollback:** The system runs `update-grub` to apply changes. If this command fails, the script automatically restores the timestamped backup and removes the override file to prevent boot issues.
**Block 2 — UEFI Secure Boot Repair**
- **Pre-checks:** Before proceeding, the script verifies two conditions:
1. The system is running in UEFI mode (checks for existence of `/sys/firmware/efi`).
2. Secure Boot is currently enabled (uses `mokutil --sb-state` to confirm status).
- **Skip Logic:** If either check fails, the process stops immediately with a message indicating no repair is needed or applicable.
- **Repair Steps:** Upon user confirmation:
1. Reinstalls signed boot packages (`shim-signed`, `grub-efi-amd64-signed`, `linux-image-amd64`).
2. Reinstalls GRUB to the EFI partition using `grub-install` with the appropriate target and directory detection (preferring `/boot/efi` over `/boot`).
3. Regenerates the GRUB configuration via `update-grub`.
**Block 3 — Initramfs Regeneration**
- **Confirmation:** The script prompts for user confirmation before proceeding to avoid unintended rebuilds.
- **Execution:** Upon approval, it runs `update-initramfs -u -k all` to regenerate initrd images for all installed kernels.
- **Purpose:** This fixes boot issues caused by missing drivers or corrupted initrd images that prevent the system from loading properly.
### 3. Intelligent Automation
- **EFI Directory Detection:** The script intelligently detects the EFI partition, checking `/boot/efi` first and falling back to `/boot` if necessary.
- **Secure Boot State Verification:** Instead of assuming Secure Boot is active, it uses `mokutil --sb-state` to verify the actual state before attempting repairs on non-UEFI or disabled systems.
- **GRUB Backup Strategy:** A timestamped backup file (e.g., `/etc/default/grub.backup.YYYYMMDD_HHMMSS`) is created prior to any modification, ensuring a safe point for rollback.
- **Rollback Mechanism:** If `update-grub` fails during the GRUB settings or Secure Boot repair process, the script automatically restores the backup and cleans up temporary override files.
- **Override Persistence:** Configuration values are written to `/etc/default/grub.d/99_script_override.cfg`, ensuring that changes survive package updates which might otherwise reset `/etc/default/grub`.
- **Input Validation:** Custom timeout inputs are validated using regex matching for integers (e.g., `^-?[0-9]+$`), allowing negative numbers like -1 while rejecting invalid text.
- **Variable Handling Logic:** The `_set_grub_var()` function handles three distinct cases: updating an existing variable, uncommenting a commented variable, or appending a new variable if it does not exist in the configuration file.
### 4. Paquetes y Recursos Gestionados
**Boot Packages Reinstalled (Secure Boot Repair):**
| Package | Purpose |
|---|---|
| shim-signed | UEFI Secure Boot shim (first-stage bootloader) |
| grub-efi-amd64-signed | Signed GRUB for UEFI |
| linux-image-amd64 | Kernel image (re-signed) |
**GRUB Settings Modified:**
| Variable | Option 1 | Option 2 | Option 3 | Custom |
|---|---|---|---|---|
| GRUB_TIMEOUT | 0 | 3 | 5 | User value |
| GRUB_TIMEOUT_STYLE | hidden | menu | menu | menu |
| GRUB_RECORDFAIL_TIMEOUT | 0 | 3 | 5 | User value |
| GRUB_DISABLE_OS_PROBER | true | — | — | — |
**System Files Modified:**
| Package | Purpose |
|---|---|
| /etc/default/grub | Main GRUB configuration |
| /etc/default/grub.d/99_script_override.cfg | Persistent override (survives grub updates) |
| /etc/default/grub.backup.* | Timestamped backup (auto-created) |
>**Note UEFI:** The Secure Boot repair ONLY works on UEFI systems. The script checks for `/sys/firmware/efi` and `mokutil --sb-state` before attempting anything. Legacy BIOS systems are automatically skipped.
>**Note GRUB:** After hiding the GRUB menu (Option 1), you must hold ESC immediately after powering on to access the menu. There is no other way to reach it during boot.
> **Technical data:** The override file at `/etc/default/grub.d/99_script_override.cfg` persists across kernel updates because GRUB reads drop-in configs from that directory. This is more reliable than editing `/etc/default/grub` directly for values that should survive updates.
> **Technical data:** `GRUB_DISABLE_OS_PROBER=true` is set when hiding the menu to prevent OS prober from adding extra entries that would require the menu to appear. For multi-boot systems, use Option 3 or Custom instead.
+100
View File
@@ -0,0 +1,100 @@
## Option 12: Desktop & Display
### 1. What does this component do?
This component manages display managers (the login screen you see before entering your desktop). It allows users to install and configure LightDM, GDM3, SDDM, or greetd. It handles autologin setup, user list visibility toggles, and a specific Wayland override for NVIDIA GPUs. Currently, Desktop Environment management is marked as "Coming Soon".
### 2. Logical Flow of Execution
The execution logic is divided into five functional blocks:
**Block 1 — Display Manager Selection**
- The main menu offers two primary options within Option 12: "Desktop Environment" (currently unavailable) and "Display Manager".
- Selecting "Display Manager" opens a submenu listing available display managers based on the Debian version.
- **Available Managers:**
- LightDM (available on all Debian versions).
- GDM3 (available on all Debian versions).
- SDDM (available on all Debian versions).
- greetd (available only on Debian 12 and 13).
- Each selected manager opens its own dedicated configuration submenu.
**Block 2 — LightDM Configuration**
- A checklist menu presents three options:
1. Install LightDM + GTK Greeter (auto-selects the display manager via debconf-set-selections).
2. Enable user list at login screen (writes `greeter-hide-users=false` to a configuration file in `.conf.d`).
3. Enable autologin for current user (uncomments `autologin-user` and sets timeout to 0 in the main config).
- **Idempotency:** The script checks if `lightdm` and `lightdm-gtk-greeter-settings` are already installed before attempting installation, skipping redundant steps.
**Block 3 — GDM3 Configuration**
- A checklist menu presents up to four options:
1. Install/Reinstall gdm3 (auto-selects via debconf).
2. Toggle user list visibility (toggles `disable-user-list` in greeter.dconf-defaults).
3. Configure autologin (prompts for a username via whiptail inputbox to set in daemon.conf).
4. Force Enable Wayland on NVIDIA (Bookworm/Trixie + NVIDIA only).
- **Mechanism:** Creates or removes a symlink: `/etc/udev/rules.d/61-gdm.rules``/dev/null`.
- **Purpose:** This disables the udev rule that blocks GDM from using Wayland on NVIDIA GPUs.
- **Risk Warning:** Displays a warning that this may break graphics or cause instability.
- **Toggle Behavior:** If the symlink exists, removing it reverts to default behavior; if not present, creating it enables the override.
**Block 4 — SDDM Configuration**
- A submenu offers two options:
1. Install SDDM (auto-selects via debconf).
2. Enable Autologin:
- **Session Detection:** Auto-detects the installed session by checking `.desktop` files in priority order: `plasmawayland``lxqt-wayland``plasma``lxqt`.
- **Configuration:** Writes autologin settings to `/etc/sddm.conf.d/autologin.conf`.
- **Fallback:** If no session is found, it enables autologin but warns that SDDM will use the default session.
**Block 5 — greetd Configuration**
- greetd is a minimal, modern display manager designed for Wayland environments.
- Submenu options vary by Debian version:
- **All Versions:** Install base `greetd`, Install `greetd` + `tuigreet` (recommended TUI greeter).
- **Debian 13 only:** Additional options to install `gtk-greet`, `nwg-hello`, or `wlgreet`.
- **Backports Handling:** On Bookworm, `tuigreet` is installed from backports if not enabled.
- **Important Warning:** greetd is installed but NOT configured by the script. The user must manually create `/etc/greetd/config.toml` to be able to log in. The script displays a warning with references to man pages for configuration details.
### 3. Smart Automations
The component utilizes several intelligent automation features:
- **debconf-set-selections:** Pre-selects the display manager as default before `apt install`, preventing the interactive "Configuring shared/default-x-display-manager" dialog that would otherwise pause the script execution.
- **Session Auto-Detection (SDDM):** Checks `.desktop` files in priority order (Wayland first, then X11) to set the correct session type for autologin configuration.
- **Wayland Toggle:** Creates or removes a udev rule symlink to `/dev/null`. This is a known workaround that disables the GDM rule blocking NVIDIA Wayland support.
- **greetd Backports:** On Bookworm, `tuigreet` is installed from backports (newer version) if not already enabled in the system.
- **Manual Config Warning:** The script explicitly informs users that greetd requires manual configuration and points to man pages for further details.
- **User Detection:** Uses `SUDO_USER` (the real user who ran sudo) instead of `$USER` (which is root during script execution). This ensures the correct user is set for automatic login across all display managers.
### 4. Packages and Resources Managed
**Display Manager Packages:**
| DM | Packages | Debian Versions |
|---|---|---|
| LightDM | lightdm, lightdm-gtk-greeter, lightdm-gtk-greeter-settings | All |
| GDM3 | gdm3 | All |
| SDDM | sddm | All |
| greetd (base) | greetd | 12, 13 |
| greetd + tuigreet | greetd, tuigreet | 12 (backports), 13 |
| greetd + gtk-greet | greetd, gtk-greet | 13 only |
| greetd + nwg-hello | greetd, nwg-hello | 13 only |
| greetd + wlgreet | greetd, wlgreet | 13 only |
**Configuration Files Modified:**
| DM | File Path | Configuration Purpose |
|---|---|---|
| LightDM | /etc/lightdm/lightdm.conf.d/50-debianito-userlist.conf | User list visibility toggle |
| LightDM | /etc/lightdm/lightdm.conf | Autologin user + timeout settings |
| GDM3 | /etc/gdm3/greeter.dconf-defaults | User list toggle (disable-user-list) |
| GDM3 | /etc/gdm3/daemon.conf | Autologin user and enable flag |
| GDM3 | /etc/udev/rules.d/61-gdm.rules | Wayland override (symlink to /dev/null) |
| SDDM | /etc/sddm.conf.d/autologin.conf | Autologin user + session type |
**Session Detection Priority (SDDM Autologin):**
| Priority | Session File | Session Type |
|---|---|---|
| 1 | /usr/share/wayland-sessions/plasmawayland.desktop | KDE Wayland |
| 2 | /usr/share/wayland-sessions/lxqt-wayland.desktop | LXQt Wayland |
| 3 | /usr/share/xsessions/plasma.desktop | KDE X11 |
| 4 | /usr/share/xsessions/lxqt.desktop | LXQt X11 |
> ⚠️ **Warning: Wayland on NVIDIA:** The "Force Enable Wayland on NVIDIA" option creates a symlink that disables the GDM udev rule. This is a known workaround but MAY cause graphics instability or breakage. To revert, remove `/etc/udev/rules.d/61-gdm.rules`.
> ⚠️ **Warning: greetd:** Unlike other display managers, greetd is installed but NOT configured by this script. You MUST manually create `/etc/greetd/config.toml` before you can log in. See `man greetd` and `man 5 greetd-sessions` for configuration details.
> ⚠️ **Warning: Autologin:** All autologin configurations use `SUDO_USER` (the user who ran sudo) instead of `$USER` (which is root during script execution). This ensures the correct user is set for automatic login.
> 💡 **Technical Note:** `debconf-set-selections` pre-selects the display manager before apt install, preventing the interactive "Configuring shared/default-x-display-manager" dialog that would otherwise pause the script.
+1 -1
View File
@@ -51,7 +51,7 @@ This "detect-then-deploy" model prevents users from installing unnecessary drive
| **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](https://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. |
| **Gen8** (Broadwell) | 14nm | HD Graphics 5300, Iris Pro 6200, Iris 6100 | `i915` | `iris` | `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. |
| **Gen9.5** (Kaby Lake, Coffee Lake, Comet Lake) | 14nm+ / 14nm++ | UHD Graphics 620/630, UHD 610/630 | `i915` | `iris` | `anv` | Process node optimization for 14nm. "UHD" replaces "HD" in naming convention. |
| **Gen11** (Ice Lake) | 10nm | UHD Graphics G1, Iris Plus G4/G7 | `i915` | `iris` | `anv` | First architecture at 10nm. Vulkan 1.3+ support. |
+27 -16
View File
@@ -36,7 +36,7 @@ deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmwa
```yaml
Types: deb
URIs: https://deb.debian.org/debian
Suites: bookworm bookworm-updates
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
```
@@ -52,6 +52,7 @@ The script automatically detects your current format and offers migration option
The `configure_repos()` function in `repos.sh` executes the following sequence:
```bash
┌─────────────────────────────────────────────────────────────┐
│ INITIAL DETECTION PHASE │
@@ -71,51 +72,61 @@ The `configure_repos()` function in `repos.sh` executes the following sequence:
┌─────────────────────────────────────────────────────────────┐
│ USER INTERACTION PHASE │
├─────────────────────────────────────────────────────────────┤
│ 4. Repository Format Selection (Trixie only)
│ └── whiptail yesno: Migrate to DEB822? (default NO)
│ 4. Repository Menu Loop (while true)
│ └── _menu: Select action from multiple options
│ │
5. Backports Enablement
── whiptail confirm: Enable Backports?
Options Available:
── Debian 13+ (Trixie):
│ │ ├── 1. Enable Contrib & Non-Free Components │
│ │ ├── 2. Migrate traditional sources.list to DEB822 │
│ │ ├── 3. Setup/Update Backports repositories │
│ │ ├── 4. [ADVANCED] Upgrade system branch (Testing/SID)
│ │ └── 5. Back to main menu │
│ │
│ └── Other Versions: │
│ ├── 1-3 same as above │
│ └── No option 4 (branch upgrade not available)
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ DECISION MATRIX PHASE │
├─────────────────────────────────────────────────────────────┤
6. Determine Action Type
5. Determine Action Type (per menu selection)
│ ├── If format changed → "migrate"
│ ├── If nothing changed → "update" (skip)
│ ├── If nothing changed → "skip" (idempotent)
│ └── Otherwise → "write"
│ │
7. Idempotency Check │
6. Idempotency Check │
│ └── content_differs() compares generated vs existing │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ EXECUTION PHASE │
├─────────────────────────────────────────────────────────────┤
8. Backup Current Repositories │
7. Backup Current Repositories │
│ └── backup_current_repos() → temp directory │
│ │
9. Write Configuration │
8. Write Configuration │
│ ├── _write_deb822() OR _write_classic()
│ ├── Creates appropriate file(s)
│ └── Includes main + backports if enabled │
│ │
10. Update Package Lists │
9. Update Package Lists
│ └── sudo apt update │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ POST-EXECUTION PHASE │
├─────────────────────────────────────────────────────────────┤
│ 11. Success Path │
│ 10. Success Path │
│ ├── REPOS_CONFIGURED=true
│ ├── Cleanup disabled files │
│ └── Optional: Upgrade system if packages available │
│ │
│ 12. Failure Path (apt update failed)
│ 11. Failure Path (apt update failed)
│ └── restore_previous_repos() → rollback to backup │
└─────────────────────────────────────────────────────────────┘
```
**Key Safety Mechanisms:**
@@ -134,7 +145,7 @@ The script enables specific APT component branches that are essential for hardwa
|-----------|---------|--------------|---------------------|
| **main** | Free, open-source software (Debian official) | All packages | Always enabled |
| **contrib** | Free software that uses non-free components | Proprietary codecs, drivers | Enabled in all versions |
| **non-free** | Non-free firmware and proprietary software | NVIDIA/AMD GPU drivers, Wi-Fi firmware | Required for hardware support |
| **non-free** | Non-free firmware and proprietary software | NVIDIA GPU drivers, Wi-Fi firmware | Required for hardware support |
| **non-free-firmware** | Firmware blobs (Wi-Fi, Bluetooth, etc.) | Wireless adapters, embedded chips | **Critical from Debian 12+** |
#### Why `non-free-firmware` is Vital (Debian 12+)
@@ -143,7 +154,7 @@ Starting with Debian Bookworm (12.0), the `non-free-firmware` component was sepa
```bash
# Before Debian 12 (Bookworm)
deb https://deb.debian.org/debian bookworm main contrib non-free
deb https://deb.debian.org/debian bullseye main contrib non-free
# After Debian 12 (Bookworm+) - SEPARATE COMPONENTS
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
@@ -221,7 +232,7 @@ The script includes a detailed explanation because backports enable critical fea
| Feature | Without Backports | With Backports |
|---------|-------------------|----------------|
| **Linux Kernel** | Stable kernel only (e.g., 5.10) | Newer kernels (e.g., 6.x series) |
| **Linux Kernel** | Stable kernel only (e.g., 6.1-6.12) | Newer kernels (e.g., 6.x/7.x series) |
| **GPU "Drivers"** | Latest Mesa from stable | Latest Mesa from testing |
| **Wi-Fi Firmware** | Older firmware versions | Newest firmware for modern cards |
| **System Stability** | Maximum stability | Tested-but-newer packages |
+72
View File
@@ -0,0 +1,72 @@
## Option 9: Swap
### 1. What does this component do?
This module is responsible for the secure management of disk-based swap space within the `debianito` environment. Unlike standard Linux tools that might overwrite existing configurations or conflict with memory compression features (like ZRAM), this script operates as a **priority-aware, persistent swap manager**.
Its primary functions include:
* **Dynamic Allocation:** Creating and resizing swapfiles based on detected RAM capacity without requiring physical partition changes.
* **Priority Integration:** Explicitly setting the swap priority (`pri=10`) to ensure it sits below ZRAM (which uses `priority=100`). This prevents the system from using disk I/O for memory swapping until compressed RAM is exhausted, optimizing performance.
* **Persistence Management:** Safely editing `/etc/fstab` with a unique tag (`# debianito-managed-swap`) to ensure swap survives reboots without corrupting manual entries.
* **Safety Locking:** Prevents concurrent operations using file locking mechanisms to avoid race conditions during active system usage.
### 2. How does it work?
The script leverages several advanced Linux subsystems and safety protocols:
1. **File System Detection:** It identifies the filesystem type of the target partition (e.g., `ext4`, `btrfs`). For Btrfs, it applies specific flags (`chattr +C` for copy-on-write optimization) to prevent performance degradation during swap operations.
2. **Allocation Strategy:** It prefers `fallocate` for instant space reservation on supported filesystems, falling back to `dd if=/dev/zero` for compatibility or zeroing requirements (like Btrfs).
3. **Fstab Validation:** Before writing changes to `/etc/fstab`, it creates a temporary file and validates the syntax using `findmnt --verify`. If validation fails, the script aborts and restores the original state.
4. **Concurrency Control:** It utilizes `flock` on `/run/lock/debianito-swap.lock`. This ensures that if another process is modifying swap settings (e.g., a system update), this script will wait or exit gracefully to prevent filesystem corruption.
5. **Swappiness Tuning:** It configures `vm.swappiness` via both runtime (`sysctl -w`) and persistent (`/etc/sysctl.d/99-swappiness-debianito.conf`) mechanisms, defaulting to values that favor RAM usage over disk swapping (e.g., 10-20).
### 3. The Logical Decision Tree (Step by Step)
The execution flow follows a strict logical tree designed for safety and idempotency:
1. **Initialization & Locking:**
* The `manage_swap()` function attempts to acquire an exclusive lock (`flock -n`). If the lock is held by another process, it immediately exits with a "Busy" message to prevent conflicts.
2. **Menu Selection Loop:**
* Enters a continuous loop presenting options (Status, Create, Remove, Swappiness).
* Breaks only when the user selects "Back to main menu".
3. **Action Execution Paths:**
* **Path A: Status Check (`_swap_current_status`)**
* Reads active swap entries via `swapon --show`.
* Reads current swappiness from `/proc/sys/vm/swappiness`.
* Parses `/etc/fstab` for managed tags.
* **Path B: Create/Resize (`_swap_create_file`)**
* **Recommendation:** Calculates optimal size based on RAM (e.g., 2GB for >16GB RAM, 4GB for 8-16GB).
* **Btrfs Check:** If the filesystem is Btrfs, it warns about `nodatacow` requirements and hibernation limitations.
* **Existence Check:** If `/swapfile` exists, it prompts to confirm recreation (deleting old data first via `swapoff`).
* **Allocation:** Uses `fallocate` or `dd` to zero the file. Sets permissions (`chmod 600`) and initializes swap (`mkswap`).
* **Persistence:** Attempts to write the new entry to `/etc/fstab`. If validation fails, it cleans up (removes file) before exiting.
* **Path C: Remove (`_swap_remove_file`)**
* Checks for the unique `SWAP_FSTAB_TAG` in fstab.
* Confirms user intent to delete.
* Executes `swapoff`, removes the fstab line, and deletes the physical file.
* **Path D: Swappiness (`_swap_set_swappiness`)**
* Validates input (0-100 integer).
* Writes a temporary sysctl config file.
* Applies changes immediately via `sysctl -w`.
### 4. What does each menu item do and what does it mean?
Each option in the swap management submenu serves a specific technical purpose:
* **Option 1: Show current swap & swappiness**
* **Technical Action:** Aggregates data from `/proc/swaps`, `/proc/sys/vm/swappiness`, and `/etc/fstab`.
* **Significance:** Provides an audit trail of the current memory management state. It verifies if ZRAM is active (implied by priority check) and how much disk swap is currently in use.
* **Option 2: Create / resize swapfile**
* **Technical Action:** Allocates a new block device file (`/swapfile`) or expands an existing one. Sets the `pri=10` flag to ensure it acts as a secondary memory layer after ZRAM fills up.
* **Significance:** Essential for systems with low RAM that need overflow protection without installing physical partitions. The "Resize" capability allows adapting to new hardware configurations dynamically.
* **Option 3: Remove swapfile**
* **Technical Action:** Disables the swapfile (`swapoff`), removes it from `/etc/fstab`, and deletes the file from disk.
* **Significance:** Useful for troubleshooting, freeing up disk space (e.g., on SSDs where write cycles are a concern), or migrating to ZRAM-only configurations if RAM is sufficient.
* **Option 4: Change swappiness**
* **Technical Action:** Modifies the kernel parameter `vm.swappiness`.
* **Significance:** Controls the "aggressiveness" of swapping. A lower value (e.g., 10) tells the kernel to keep data in RAM longer, only using swap as a last resort. This is critical for desktop performance and battery life on laptops.
* **Option 5: Back to main menu**
* **Technical Action:** Releases the file lock (`exec 9>&-`) and terminates the submenu loop.
* **Significance:** Returns control to the user, ensuring no swap operations are running in the background before they navigate to other system configurations.
Binary file not shown.

After

Width:  |  Height:  |  Size: 852 KiB

+214 -12
View File
@@ -20,16 +20,28 @@ manage_desktop_display() {
display_manager_menu() {
while true; do
local -a dm_items=()
dm_items+=("1" "LightDM")
dm_items+=("2" "GDM3")
dm_items+=("3" "SDDM")
if [ "$DEBIAN_VERSION" = "12" ] || [ "$DEBIAN_VERSION" = "13" ]; then
dm_items+=("4" "greetd")
dm_items+=("5" "Back")
else
dm_items+=("4" "Back")
fi
local choice
choice=$(_menu "Display Manager" \
"Select an option:" $TUI_ALTO $TUI_ANCHO 6 \
"1" "LightDM" \
"2" "Back")
"${dm_items[@]}")
[ -z "$choice" ] && break
clear
case "$choice" in
1) lightdm_config_menu ;;
2) break ;;
2) configure_gdm3 ;;
3) configure_sddm ;;
4) configure_greetd ;;
5) break ;;
esac
done
}
@@ -37,7 +49,8 @@ display_manager_menu() {
lightdm_config_menu() {
local -a items=()
items+=("install_lightdm" "Install LightDM & GTK Greeter" "$(_state lightdm)")
items+=("enable_userlist" "Enable user list" "OFF")
items+=("enable_userlist" "Enable user list at login screen" "OFF")
items+=("enable_autologin" "Enable autologin for current user" "OFF")
local choices
choices=$(_checklist "LightDM Configuration" \
"Select options to apply:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
@@ -52,15 +65,11 @@ lightdm_config_menu() {
for item in $cleaned; do
case $item in
install_lightdm)
if ! is_installed lightdm; then
_run_cmd "LightDM" "sudo apt install -y lightdm" "Installing LightDM..."
if ! is_installed lightdm || ! is_installed lightdm-gtk-greeter-settings; then
echo "lightdm shared/default-x-display-manager select lightdm" | sudo debconf-set-selections
_run_cmd "LightDM" "sudo apt install -y lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings" "Installing LightDM & GTK Greeter..."
else
echo -e "${GREEN}[LightDM] already installed, skipping...${NC}"
fi
if ! is_installed lightdm-gtk-greeter-settings; then
_run_cmd "LightDM Settings" "sudo apt install -y lightdm-gtk-greeter-settings" "Installing LightDM Settings..."
else
echo -e "${GREEN}[LightDM Settings] already installed, skipping...${NC}"
echo -e "${GREEN}[LightDM] LightDM and GTK Greeter settings are already installed, skipping...${NC}"
fi
;;
enable_userlist)
@@ -73,7 +82,200 @@ greeter-hide-users=false" | sudo tee "$conf" > /dev/null; then
echo -e "${RED}Failed to write configuration.${NC}"
fi
;;
enable_autologin)
local dm_conf="/etc/lightdm/lightdm.conf"
local lightdm_user="${SUDO_USER:-$USER}"
sudo sed -i 's/^#[[:space:]]*autologin-user[[:space:]=].*/autologin-user='"$lightdm_user"'/' "$dm_conf"
sudo sed -i 's/^#[[:space:]]*autologin-user-timeout[[:space:]=].*/autologin-user-timeout=0/' "$dm_conf"
echo -e "${GREEN}Autologin enabled for user: ${lightdm_user}${NC}"
;;
esac
done
_pause
}
configure_greetd() {
while true; do
local -a gd_items=()
gd_items+=("1" "Install base greetd")
gd_items+=("2" "Install greetd + tuigreet (Recommended TUI greeter)")
if [ "$DEBIAN_VERSION" = "13" ]; then
gd_items+=("3" "Install gtkgreet (Requires manual setup)")
gd_items+=("4" "Install nwg-hello (Requires manual setup)")
gd_items+=("5" "Install wlgreet (Requires manual setup)")
gd_items+=("6" "Back")
else
gd_items+=("3" "Back")
fi
local choice
choice=$(_menu "greetd Configuration" \
"Select an option${SCROLL_HINT}:" \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"${gd_items[@]}")
[ -z "$choice" ] && return
clear
case "$choice" in
1)
echo "greetd shared/default-x-display-manager select greetd" | sudo debconf-set-selections
_run_cmd "greetd" "sudo apt install -y greetd" "Installing greetd..."
_msg "greetd" "Warning: greetd was installed but NOT configured.\n\nYou must manually create /etc/greetd/config.toml\nto be able to log in.\n\nSee 'man greetd' and 'man 5 greetd-sessions'."
;;
2)
if [ "$DEBIAN_VERSION" = "12" ]; then
if [ "$(is_backports_enabled)" != true ]; then
_write_deb822_backports "bookworm"
sudo apt update -qq
fi
_run_cmd "greetd" "sudo apt install -y -t bookworm-backports tuigreet greetd" "Installing greetd + tuigreet..."
else
_run_cmd "greetd" "sudo apt install -y greetd tuigreet" "Installing greetd + tuigreet..."
fi
_msg "greetd" "Warning: greetd was installed but NOT configured.\n\nYou must manually create /etc/greetd/config.toml\nto be able to log in.\n\nSee 'man greetd' and 'man 5 greetd-sessions'."
;;
3)
if [ "$DEBIAN_VERSION" = "13" ]; then
echo "greetd shared/default-x-display-manager select greetd" | sudo debconf-set-selections
_run_cmd "greetd" "sudo apt install -y greetd gtkgreet" "Installing greetd + gtkgreet..."
_msg "greetd" "Warning: greetd was installed but NOT configured.\n\nYou must manually create /etc/greetd/config.toml\nto be able to log in.\n\nSee 'man greetd' and 'man 5 greetd-sessions'."
else
return
fi
;;
4)
if [ "$DEBIAN_VERSION" = "13" ]; then
echo "greetd shared/default-x-display-manager select greetd" | sudo debconf-set-selections
_run_cmd "greetd" "sudo apt install -y greetd nwg-hello" "Installing greetd + nwg-hello..."
_msg "greetd" "Warning: greetd was installed but NOT configured.\n\nYou must manually create /etc/greetd/config.toml\nto be able to log in.\n\nSee 'man greetd' and 'man 5 greetd-sessions'."
fi
;;
5)
if [ "$DEBIAN_VERSION" = "13" ]; then
echo "greetd shared/default-x-display-manager select greetd" | sudo debconf-set-selections
_run_cmd "greetd" "sudo apt install -y greetd wlgreet" "Installing greetd + wlgreet..."
_msg "greetd" "Warning: greetd was installed but NOT configured.\n\nYou must manually create /etc/greetd/config.toml\nto be able to log in.\n\nSee 'man greetd' and 'man 5 greetd-sessions'."
fi
;;
6) return ;;
esac
done
}
configure_gdm3() {
while true; do
local items_enabled=()
items_enabled+=("install" "Install/Reinstall gdm3 (Set as default)" "$(_state gdm3)")
items_enabled+=("userlist" "Hide user list (disable-user-list)" "OFF")
items_enabled+=("autologin" "Configure Autologin" "OFF")
if [ "$DEBIAN_VERSION" = "12" ] || [ "$DEBIAN_VERSION" = "13" ]; then
if [ "$HAS_NVIDIA" = true ]; then
items_enabled+=("wayland" "Force Enable Wayland on NVIDIA (Risk!)" "OFF")
fi
fi
local choice
choice=$(_checklist "GDM3 Configuration" \
"Select options to apply${SCROLL_HINT}:" \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"${items_enabled[@]}")
[ -z "$choice" ] && return
clear
local cleaned
cleaned=$(echo "$choice" | tr -d '"')
for item in $cleaned; do
case $item in
install)
echo "gdm3 shared/default-x-display-manager select gdm3" | sudo debconf-set-selections
_run_cmd "GDM3" "sudo apt install -y gdm3" "Installing gdm3..."
;;
userlist)
local greeter_conf="/etc/gdm3/greeter.dconf-defaults"
if sudo grep -q '^disable-user-list=true' "$greeter_conf" 2>/dev/null; then
sudo sed -i 's/^disable-user-list=true/# disable-user-list=true/' "$greeter_conf"
echo -e "${GREEN}User list is now VISIBLE.${NC}"
else
sudo sed -i 's/^#[[:space:]]*disable-user-list=true/disable-user-list=true/' "$greeter_conf"
echo -e "${GREEN}User list is now HIDDEN.${NC}"
fi
sudo dpkg-reconfigure gdm3 >/dev/null 2>&1
;;
autologin)
local daemon_conf="/etc/gdm3/daemon.conf"
local username
username=$(whiptail --title "GDM3 Autologin" \
--inputbox "Enter username to autologin (leave empty to DISABLE autologin):" \
10 60 "" 3>&1 1>&2 2>&3 || true)
if [ -n "$username" ]; then
sudo sed -i 's/^# *AutomaticLoginEnable[[:space:]=].*/AutomaticLoginEnable=true/' "$daemon_conf"
sudo sed -i 's/^# *AutomaticLogin[[:space:]=].*/AutomaticLogin='"$username"'/' "$daemon_conf"
echo -e "${GREEN}Autologin enabled for user: ${username}${NC}"
else
sudo sed -i 's/^AutomaticLoginEnable[[:space:]=].*/# AutomaticLoginEnable=false/' "$daemon_conf"
sudo sed -i 's/^AutomaticLogin[[:space:]=].*/# AutomaticLogin=/' "$daemon_conf"
echo -e "${GREEN}Autologin disabled.${NC}"
fi
;;
wayland)
local rules_link="/etc/udev/rules.d/61-gdm.rules"
if [ -L "$rules_link" ] || [ -f "$rules_link" ]; then
sudo rm -f "$rules_link"
echo -e "${GREEN}Reverted. Wayland will be disabled by default on next reboot.${NC}"
elif [ -f "/lib/udev/rules.d/61-gdm.rules" ]; then
if _confirm "Wayland on NVIDIA" \
"Force-enable Wayland on NVIDIA?\n\nRisk: This may break graphics or cause instability.\nProceed?"; then
sudo ln -s /dev/null "$rules_link"
echo -e "${GREEN}Wayland override created. Reboot required.${NC}"
fi
fi
;;
esac
done
_pause
done
}
configure_sddm() {
while true; do
local choice
choice=$(_menu "SDDM Configuration" \
"Select an option${SCROLL_HINT}:" \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"1" "Install SDDM (Set as default)" \
"2" "Enable Autologin" \
"3" "Back")
[ -z "$choice" ] && return
clear
case "$choice" in
1)
echo "sddm shared/default-x-display-manager select sddm" | sudo debconf-set-selections
_run_cmd "SDDM" "sudo apt install -y sddm" "Installing SDDM..."
;;
2)
local sddm_session=""
local sddm_user="${SUDO_USER:-$USER}"
if [ -f /usr/share/wayland-sessions/plasmawayland.desktop ]; then
sddm_session="plasmawayland"
elif [ -f /usr/share/wayland-sessions/lxqt-wayland.desktop ]; then
sddm_session="lxqt-wayland"
elif [ -f /usr/share/xsessions/plasma.desktop ]; then
sddm_session="plasma"
elif [ -f /usr/share/xsessions/lxqt.desktop ]; then
sddm_session="lxqt"
fi
sudo mkdir -p /etc/sddm.conf.d
cat << EOF | sudo tee /etc/sddm.conf.d/autologin.conf > /dev/null
[Autologin]
User=${sddm_user}
Session=${sddm_session}
Relogin=false
EOF
if [ -n "$sddm_session" ]; then
echo -e "${GREEN}Autologin enabled for user ${sddm_user}, session: ${sddm_session}.${NC}"
else
echo -e "${YELLOW}Autologin enabled for user ${sddm_user}. No session set (SDDM will use default).${NC}"
fi
_pause
;;
3) return ;;
esac
done
}
+1 -1
View File
@@ -27,7 +27,7 @@ install_extras() {
while true; do
local cat_choice
cat_choice=$(_menu "Extra Software" \
cat_choice=$(_menu "Install Programs and Software" \
"Select a category${SCROLL_HINT}:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"0" "Essential Pack" \
"1" "Customization System" \
+1 -1
View File
@@ -373,7 +373,7 @@ install_firmware() {
# 2. Plan
local plan
plan=$(_build_firmware_plan)
_msg "Firmware & Wireless Setup" "$plan" 22 72
_msg "Firmware, Wireless & Bluetooth Setup" "$plan" 22 72
# 3. Confirm
if ! _confirm "Firmware" "Apply the network & firmware plan?"; then
+2 -2
View File
@@ -282,13 +282,13 @@ configure_repos() {
local repo_choice
if [ "$DEBIAN_CODENAME" = "sid" ]; then
repo_choice=$(_menu "Repositories" \
repo_choice=$(_menu "Configure Repositories" \
"Select an option:" $TUI_ALTO $TUI_ANCHO 6 \
"1" "Enable Contrib & Non-Free Components" \
"2" "Migrate traditional sources.list to DEB822 format" \
"3" "Back to main menu")
else
repo_choice=$(_menu "Repositories" \
repo_choice=$(_menu "Configure Repositories" \
"Select an option:" $TUI_ALTO $TUI_ANCHO 6 \
"1" "Enable Contrib & Non-Free Components" \
"2" "Migrate traditional sources.list to DEB822 format" \
+1 -1
View File
@@ -161,7 +161,7 @@ manage_swap() {
while true; do
local choice
choice=$(_menu "Swap Management (disk)" \
choice=$(_menu "Swap Management" \
"Select an option:" $TUI_ALTO $TUI_ANCHO 6 \
"1" "Show current swap & swappiness" \
"2" "Create / resize swapfile" \
+4 -10
View File
@@ -12,17 +12,11 @@ install_zram() {
local half_ram_mb=$(( ((RAM_KB / 1024 / 1024 + 1) / 2) * 1024 ))
local algo
algo=$(_menu "ZRAM Compression" \
"ZRAM compresses a portion of RAM into compressed swap,\
effectively increasing available memory.
Useful for systems with limited RAM or when you need
more swap space without disk writes.
Choose compression algorithm:" \
algo=$(_menu "ZRAM Configuration" \
"ZRAM creates a compressed block device in RAM to use as swap. This reduces disk I/O and can significantly improve responsiveness on systems with limited memory (e.g., 4GB RAM or less), at the cost of a small amount of CPU usage." \
$TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"lz4" "Fastest, low CPU (recommended)" \
"zstd" "Better ratio, more CPU")
"lz4" "Fastest compression/decompression. Lowest CPU overhead. (Default)" \
"zstd" "Higher compression ratio. Saves slightly more memory but uses more CPU.")
if [ -z "$algo" ]; then
echo "ZRAM configuration cancelled."