11 Commits

Author SHA1 Message Date
mindesbunister
ac74501319 Add comprehensive Proxmox host analysis before optimization
New features:
- analyze_proxmox_status() function shows detailed system state
  - RAM usage and allocation
  - VM/Container count and status
  - Total VM memory allocation and overcommit ratio
  - Storage status (pvesm)
  - Current kernel parameters vs recommended
  - CPU governor status
  - ZFS ARC size (if applicable)
  - Existing optimizations detection

- Added optimize_cpu_governor() function
  - Sets CPU to 'performance' mode for VMs
  - Makes persistent via cpufrequtils

- Added optimize_zfs_arc() function
  - Limits ZFS ARC to 25% of RAM
  - Frees more RAM for VMs
  - Updates initramfs for persistence

Analysis now runs automatically when Proxmox is detected,
showing comprehensive system status before mode selection.
2025-10-06 11:11:30 +02:00
mindesbunister
8683739f21 Integrate Proxmox host optimization into one-button optimizer
Major changes:
- Added Proxmox detection with interactive mode selection
- Mode 1: Proxmox Host (hypervisor-optimized)
  - Different kernel parameters (swappiness=10, BBR, FQ)
  - Minimal tmpfs (2GB APT cache only)
  - No zram (VMs need direct RAM)
  - No desktop app configuration
- Mode 2: Desktop (original behavior with warnings)
- Mode 3: Abort (recommends running in VMs)

Technical implementation:
- check_proxmox() now offers mode selection
- analyze_and_prompt() branches on PROXMOX_MODE
- tune_kernel() handles both desktop and proxmox profiles
- setup_tmpfs() handles minimal proxmox tmpfs
- Updated PROXMOX_COMPATIBILITY.md with new behavior

Result: One unified script for both desktop and Proxmox use cases
2025-10-06 10:51:40 +02:00
mindesbunister
8ac5ed591c Add Proxmox compatibility detection and warning
- Created PROXMOX_COMPATIBILITY.md with detailed analysis
- Added check_proxmox() function to detect Proxmox VE hosts
- Shows warning about potential issues (RAM allocation, kernel params)
- Allows user to continue or abort
- Updated README.md with Proxmox warning
- Recommends running inside VMs instead of on host

Key concerns on Proxmox host:
- zram reduces RAM available for VMs
- tmpfs allocates up to 40% of RAM
- Desktop kernel parameters not optimal for hypervisor
- Safe to use: inside VMs or monitoring scripts only
2025-10-06 10:37:02 +02:00
mindesbunister
865040845b Fix all ((configured_count++)) instances causing script exit during configuration
- Replace ((configured_count++)) with configured_count=$((configured_count + 1))
- This fixes script exiting prematurely after configuring first application
- Issue: ((var++)) returns old value (0) which causes exit with set -euo pipefail
- Fixed 14 instances across the configure_applications_for_tmpfs function
2025-10-06 09:49:31 +02:00
mindesbunister
f128291dfe Fix script exit bug caused by ((var++)) with set -e
Critical bug fix:
- Script was exiting after 'Application Configuration Status:'
- Issue: ((total_browsers++)) returns 1 when var is 0
- With 'set -e', non-zero return causes immediate exit
- Solution: Use var=$((var + 1)) instead of ((var++))

Changed all increment operations:
- ((total_browsers++)) → total_browsers=$((total_browsers + 1))
- ((configured_browsers++)) → configured_browsers=$((configured_browsers + 1))

This prevents script termination and allows proper browser detection
to complete and display configuration status for all browsers.
2025-10-06 09:44:49 +02:00
mindesbunister
8e5b6e8036 Show detailed per-application configuration status
- Replace simple yes/no check with detailed per-app status display
- Show configuration status for each detected browser individually
- Display Firefox, Brave, Chrome, Chromium status separately
- Show NPM and Pip configuration status
- Always show status even when apps are configured
- Allow reconfiguration even if some apps are already set up
- Count configured vs total browsers for smart prompting

Output example:
📱 Application Configuration Status:
    Firefox: Configured
   ⚠️  Brave: Not configured
    Chromium: Configured
   ⚠️  NPM: Not configured

Benefits:
- Users can see exactly which apps are configured
- Easy to identify missing configurations
- Can reconfigure specific apps without full reset
- More transparent and informative
2025-10-06 09:37:14 +02:00
mindesbunister
642c8c64ff Fix browser detection and remove standalone configuration script
- Rewrite browser detection to check config directories instead of commands
- Fix Brave browser detection and configuration (was not being reported)
- Add proper support for Chromium installed via snap
- Separate detection for each browser (Firefox, Brave, Chrome, Chromium)
- Each browser now reports configuration success individually
- Remove standalone configure-apps-for-tmpfs.sh script per user request
- Keep all functionality in the all-in-one optimizer script
- Update README to remove reference to standalone script

Fixes:
- Brave browser now properly detected via ~/.config/BraveSoftware
- Chromium detected even when installed as snap package
- All browsers report their configuration status
- Cleaner, more reliable directory-based detection
2025-10-06 09:33:10 +02:00
mindesbunister
03153f2380 Add application configuration prompt for already-optimized systems
- Add check for application configuration when system is already optimized
- Prompt user to configure apps even if tmpfs mounts already exist
- Create standalone configure-apps-for-tmpfs.sh script
- Detect if applications are already configured (Firefox prefs check)
- Skip redundant configuration attempts with 'already configured' messages
- Add backup timestamp to avoid overwriting previous backups
- Update README with new configuration script

Benefits:
- Users with existing tmpfs can now configure applications
- Standalone script allows re-configuration without full optimizer run
- Smarter detection prevents duplicate configurations
- Better user experience for incremental optimization
2025-10-06 09:28:59 +02:00
mindesbunister
8e5e370e09 Add automatic application configuration for tmpfs caches
- Auto-detect and configure Firefox cache location in prefs.js
- Auto-create optimized .desktop launchers for Chrome/Chromium/Brave
- Auto-configure NPM and Pip cache directories
- Auto-link KDE/Plasma thumbnail cache to tmpfs
- Add configure_applications_for_tmpfs() function with smart detection
- Backup original configs before modification
- Set proper ownership and permissions for all cache directories
- Replace manual setup instructions with automatic configuration
- Show progress of configured applications with count
- Update next steps to reflect automatic setup

Benefits:
- Zero post-setup manual configuration needed
- Immediate performance improvement on app restart
- Safer with automatic backups and proper permissions
- Better user experience with clear progress reporting
2025-10-06 09:25:01 +02:00
mindesbunister
548dc1d0d3 Remove overlay filesystem functionality and add detection/removal capability
- Remove unused overlay filesystem configuration and references
- Remove overlayfs sections from all profile JSON files
- Remove OVERLAY_ENABLED/OVERLAY_PROTECT_CONFIGS from config
- Update documentation to focus on tmpfs optimization
- Add overlay detection and removal functionality for cleanup
- Add remove_overlays() function with safe unmounting
- Add overlay status reporting in final optimization summary
- Add test-overlay-detection.sh for testing detection logic
- Simplify codebase by removing complex unused features
- Focus on proven desktop optimizations (tmpfs, zram, kernel)
2025-09-23 12:35:45 +02:00
mindesbunister
2edb4a73c3 Complete Linux system optimization suite with tmpfs, zram, and German locale support
- Fixed missing setup_tmpfs() function that was causing silent failures
- Added comprehensive system scanning for browsers, IDEs, gaming caches
- Implemented detailed optimization information display for transparency
- Added German locale compatibility for 'free' command (Speicher: vs Mem:)
- Fixed division by zero errors in RAM calculations
- Created tmpfs-info.sh helper script for detailed status reporting
- Enhanced scanning to work on already-optimized systems
- Added comprehensive optimization breakdowns with purpose explanations
2025-09-23 12:11:45 +02:00