Version 2.0.0
A comprehensive, enterprise-level optimization framework for Fedora Linux 43 that auto-detects system hardware and stages performance, power, security, and developer workflow tunings -- all applied safely on the next reboot.
- System: ASUS VivoBook X515EA / A516EA
- CPU: 11th Gen Intel Core i5-1135G7 (4 cores / 8 threads, Tiger Lake)
- GPU: Intel Iris Xe (TigerLake-LP GT2)
- RAM: 32GB-36GB DDR4 3200MHz
- Storage: NVMe SSD (2TB) + SATA SSD
- WiFi: Intel Wi-Fi 6 AX201
- Architecture: x86_64
- All changes are staged and applied only after a reboot -- nothing takes effect immediately.
- Every modified configuration file is backed up before changes are made.
- Full logging to
/var/log/system_optimizer.log. - A one-shot systemd service handles first-boot application of all staged configs.
The script executes the following phases in order:
| Phase | Module | Description |
|---|---|---|
| 1 | System Detection | Auto-detect CPU, RAM, GPU, storage, WiFi, laptop/battery status |
| 2 | Repository Setup | Refresh dnf cache, enable RPM Fusion (free + nonfree) |
| 3 | CPU Optimization | Intel P-State, Energy Performance Bias, tuned profiles, scheduler tuning |
| 4 | GPU Optimization | Intel Iris Xe i915 driver config, Mesa, Vulkan, VA-API, shader cache |
| 5 | Memory Optimization | zram (zstd), swappiness, dirty page tuning, transparent hugepages |
| 6 | Storage Optimization | I/O schedulers (none/mq-deadline/bfq), fstrim timer, NVMe/SSD tuning |
| 7 | Network Optimization | TCP BBR, buffer sizes, TCP fast open, WiFi 6 tuning |
| 8 | Power Optimization | power-profiles-daemon, powertop auto-tune, PCIe ASPM, USB autosuspend |
| 9 | Virtualization | KVM/QEMU, libvirt, OVMF (UEFI), virt-manager |
| 10 | Boot Optimization | Boot time analysis, slow service identification, kernel printk tuning |
| 11 | Security Hardening | firewalld, SELinux check, ICMP hardening, ASLR, kptr_restrict, BPF restriction |
| 12 | Privacy | Disable telemetry (ABRT, geoclue), crash dialog suppression |
| 13 | Developer Toolchain | GCC, Clang/LLVM, Rust, Go, Zig, NASM, GDB, Valgrind, ARM cross-compilers, 32-bit libs |
| 14 | Graphics Stack | OpenGL 4.6, Vulkan SDK, Wayland/X11 dev headers, DXVK, OpenCL |
| 15 | Kernel Parameters | Comprehensive sysctl.d config covering fs, kernel, vm, and network subsystems |
| 16 | System Smoothness | IRQ balancing, CFS scheduler tuning, real-time priority limits, file descriptor limits |
| 17 | GRUB Parameters | intel_pstate=active, transparent_hugepage=madvise, nowatchdog, mitigations=auto |
| 18 | Staging | Copy all staged configs to their destinations (no live application) |
- Fedora 43 (warns but proceeds on other versions)
- Root privileges (
sudo) - Internet connectivity (for package installation)
- dnf package manager
sudo ./main.shThe script will prompt for confirmation before proceeding. After completion, a reboot is required to apply all changes.
A systemd oneshot service (system-optimizer-apply.service) runs on the first boot after optimization and performs the following:
- Applies GRUB kernel parameter updates
- Loads sysctl configurations from
/etc/sysctl.d/99-performance-tuning.conf - Activates the appropriate tuned profile (AC vs battery)
- Tunes Intel P-State parameters
- Enables all configured systemd services
- Reloads udev rules
The service only runs once (gated by a marker file at /var/lib/system_optimizer_applied).
- Log file:
/var/log/system_optimizer.log - Backups:
/var/backups/system_opt_backup_<timestamp>/ - Staging directory:
/var/lib/system_optimizer_staging/ - Sysctl config:
/etc/sysctl.d/99-performance-tuning.conf - Boot apply script:
/usr/local/bin/apply-optimizer-on-boot.sh - Boot apply service:
/etc/systemd/system/system-optimizer-apply.service
The script installs packages across several categories:
- CPU/Power: tuned, cpupower-utils, powertop, power-profiles-daemon
- GPU/Graphics: mesa (GL, EGL, Vulkan), intel-media-driver, libva, vulkan-tools, glslang, shaderc
- Storage: hdparm, fio
- Network: ethtool, iproute-tc
- Virtualization: qemu-kvm, libvirt, virt-manager, edk2-ovmf, swtpm
- Security: firewalld, audit, rkhunter
- Development: gcc, clang, llvm, rust, cargo, golang, zig, nasm, gdb, valgrind, perf, strace
- Cross-compilation: ARM toolchains, qemu-user-static, Wine, 32-bit glibc/libstdc++
- Libraries: openssl-devel, zlib-devel, readline-devel, sqlite-devel, libffi-devel, and more
To undo all optimizations:
- Boot into a previous kernel from the GRUB menu.
- Restore backed-up files from
/var/backups/system_opt_backup_<timestamp>/. A manifest of all backed-up files is available atbackup_manifest.txtinside the backup directory. - Remove the staged configs:
sudo rm -rf /var/lib/system_optimizer_staging sudo rm -f /etc/sysctl.d/99-performance-tuning.conf sudo rm -f /var/lib/system_optimizer_applied sudo systemctl disable system-optimizer-apply.service
After rebooting, verify the optimizations with:
# Check sysctl values
sysctl -a | grep <parameter>
# Check CPU governor
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Check GPU
glxinfo | grep 'OpenGL renderer'
# Check Vulkan
vulkaninfo --summary
# Check zram
zramctl
# Check network
ss -s- Services like CUPS, Bluetooth, and Avahi are identified as optional candidates for disabling but are not automatically disabled. The script only logs suggestions.
- The
vm.overcommit_memory = 1setting is tuned for development workloads and may not be appropriate for production servers. kernel.unprivileged_userns_clone = 0may break some container runtimes (e.g., rootless Podman). Adjust if needed.- NVIDIA-related GRUB parameters are included but only relevant if an NVIDIA GPU is present.
This project is provided as-is with no warranty. Use at your own risk.