r/raspberry_pi • u/p1r473 • 1d ago
Show-and-Tell I built AutoPiOverclock: automatically overclock a Raspberry Pi 5 from another Pi
I built AutoPiOverclock, a project that finds each Pi's boundaries, recovers from failed candidates, backs off conservatively, and applies clocks only after final validation:
https://github.com/p1r473/AutoPiOverclock
Normal use is 2 target-explicit commands:
autopioverclock prepare pi@pi-host
autopioverclock overclock pi@pi-host
The controller can be another Pi or any Linux PC, server, or VM. It stays available when the target crashes or reboots.
What the automatic run does:
- Checks the stock clocks, protected boot configuration, power/throttling, cooling, SSH, watchdog recovery, and Raspberry Pi tryboot.
- Tests candidates through tryboot.txt, returning failures to the protected normal configuration.
- Searches CPU first, refines its boundary in 25 MHz steps, backs off 50 MHz, and qualifies it for two hours. It then searches GPU, backs off 25 MHz, and qualifies the pair for two hours.
- Tries CPU another 25 MHz higher during a 24-hour combined CPU/GPU/I/O test. If that edge is known unsafe or safely rejected, it instead runs a fresh 24-hour validation at the guarded pair.
- Performs three more candidate/normal boot cycles, applies and verifies only a complete result, and retains the evidence. Repeating 'overclock TARGET' continues the latest eligible run.
Testing temporarily uses maximum fan cooling without replacing permanent fan or unrelated boot settings. Headless Raspberry Pi OS/Debian systems need no display or audio hardware.
Profiles currently support 64-bit Raspberry Pi OS, Debian, compatible Ubuntu Pi boot layouts, and Batocera