An automated, idempotent system tuning utility engineered specifically for Small Form Factor (SFF) Mini PCs running modern Linux distributions (including Fedora, Ubuntu, Debian, and rolling-release distros) paired with external graphics infrastructure (Oculink / dedicated PCIe links).

This engine eliminates aggressive power-state downshifting, bypasses mobile driver thermal throttling, stabilizes LUKS storage hooks, and tunes virtual memory boundaries to guarantee zero-latency throughput for heavy developer compute, deep learning inference, and high-frame-rate rendering.


The Core Problem (Why This Exists)

Standard Linux distributions are aggressively optimized for mobile power conservation. When running a desktop discrete graphics card through a dedicated Oculink interface, the kernel’s default power governors constantly drop the link down to PCIe Gen 1 speeds during idle periods.

This causes:

  • Micro-stuttering & Latency Spikes as the link forces its way back to Gen 4 speeds under load.
  • Kernel Panics & Driver Dropouts due to aggressive Active State Power Management (ASPM).
  • Clock-Speed Throttling triggered by mobile-specific driver assumptions on compact hardware form factors.

This engine locks your hardware links into absolute high-performance execution states.


Optimization Pillars

Feature PillarTarget SystemTechnical Mechanism
PCIe Link LockingBootloader / BusComplete bypass of universal pcie_port_pm and pcie_aspm power saving parameters.
NVIDIA RiggingModprobe / DriverInjects NVreg_Mobile=0 and forces PowerMizer registry keys to 0x1 (Max Perf) across supported architectures.
Real-Time SchedulerKernel (sysctl)Fine-tunes vm.dirty_ratio and disables split-lock mitigation performance penalties.
Storage SafeguardsInitramfs / LUKSVerifies sd-encrypt or volume initialization blocks prior to system image rebuilds.

Fast Installation

Deploy the core optimization engine directly to your system with a single automated payload:

curl -sSL https://raw.githubusercontent.com/scottyad/Universal-Linux-Oculink-eGPU-Performance-Optimizer/main/optimize-system.sh | sudo bash

Repository: github.com/scottyad/Universal-Linux-Oculink-eGPU-Performance-Optimizer


Target Hardware

  • Mini PC: AMD Ryzen 7 8745HS or similar (35-65W mobile APU)
  • GPU: NVIDIA RTX 3060 12GB (desktop card) through Oculink/M.2 adapter
  • Interface: Dedicated PCIe Gen 4 x4 link (no Thunderbolt overhead)
  • OS: Linux (linux-zen kernel), CachyOS optimized builds

Before vs After

BeforeAfter
PCIe link oscillates Gen 1 ↔ Gen 4PCIe link locked at Gen 4 x4 permanently
Frame drops in games and GPU workloadsConsistent frame times, zero stutter
Kernel panics during heavy I/O + GPU loadStable under sustained GPU + I/O load
Thermal throttling at 60°C (mobile limits)Thermal limits match desktop card specs

Technical Deep Dive

Kernel Parameters (GRUB/cmdline)

pcie_aspm=off           — Disable Active State Power Management
pcie_port_pm=off        — Disable PCIe port power management
nvidia.NVreg_Mobile=0   — Force desktop GPU behavior

Modprobe Configuration

options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x1"

License

MIT — Use it, modify it, share it.

Authored by thedemiurge. Running CachyOS on bare metal since 2024.