Skip to content

TheCreateGM/loptf43

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Fedora 43 Advanced System Optimization & Performance Engineering Framework

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.

Target Hardware

  • 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

Key Design Principles

  • 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.

Optimization Phases

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)

Requirements

  • Fedora 43 (warns but proceeds on other versions)
  • Root privileges (sudo)
  • Internet connectivity (for package installation)
  • dnf package manager

Usage

sudo ./main.sh

The script will prompt for confirmation before proceeding. After completion, a reboot is required to apply all changes.

What Happens on Reboot

A systemd oneshot service (system-optimizer-apply.service) runs on the first boot after optimization and performs the following:

  1. Applies GRUB kernel parameter updates
  2. Loads sysctl configurations from /etc/sysctl.d/99-performance-tuning.conf
  3. Activates the appropriate tuned profile (AC vs battery)
  4. Tunes Intel P-State parameters
  5. Enables all configured systemd services
  6. Reloads udev rules

The service only runs once (gated by a marker file at /var/lib/system_optimizer_applied).

File Locations

  • 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

Installed Packages

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

Reverting Changes

To undo all optimizations:

  1. Boot into a previous kernel from the GRUB menu.
  2. Restore backed-up files from /var/backups/system_opt_backup_<timestamp>/. A manifest of all backed-up files is available at backup_manifest.txt inside the backup directory.
  3. 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

Post-Reboot Verification

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

Notes

  • 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 = 1 setting is tuned for development workloads and may not be appropriate for production servers.
  • kernel.unprivileged_userns_clone = 0 may 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.

License

This project is provided as-is with no warranty. Use at your own risk.

About

laptop optimization for fedora linux 43 (tester)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages