Skip to content

How-to / Raspberry Pi

Overclock a Raspberry Pi 4

Get more performance from your Raspberry Pi 4 by overclocking the CPU and GPU. This guide covers safe overclocking procedures, configuration, testing, and temperature monitoring.

AdvancedPi 4 · PerformanceBy Vilros

Before you start

Overclocking increases your Raspberry Pi 4's clock speeds beyond their default values, boosting performance for CPU and GPU-intensive tasks. However, overclocking also increases power consumption, heat generation, and the risk of system instability.

Important warnings

Overclocking can void your warranty if settings are too aggressive. It can cause system instability, crashes, or data corruption if done improperly. Always use adequate cooling when overclocking—a fan and heatsink are essential. Back up your data before making changes.

You'll need:

  • A Raspberry Pi 4 (any RAM variant)
  • Active cooling: at least a fan and heatsink
  • A quality power supply (official Raspberry Pi power supply recommended)
  • Raspberry Pi OS installed and updated
  • A backup of your SD card

Overclocking results vary by individual board. Not all Pi 4 units can reach the same overclock speeds due to manufacturing variance (the "silicon lottery"). Start conservatively and increase speeds gradually.

01 Back up your SD card

Before making any changes, create a complete backup of your SD card. If overclocking causes problems, you can restore from this backup.

Use a tool like Win32 Disk Imager (Windows), dd (Linux/macOS), or Raspberry Pi Imager to create a full image of your SD card. Store the backup on a separate drive.

02 Edit config.txt

Overclocking on the Raspberry Pi 4 is done by editing the config.txt file in the boot partition. This file controls hardware configuration, including clock speeds and voltages.

  1. Open Terminal on your Pi.

  2. Edit the configuration file:

    sudo nano /boot/firmware/config.txt
    On older Raspberry Pi OS installations, the path may be /boot/config.txt. Use whichever path exists on your system.

  3. Scroll to the end of the file. Add a new [pi4] section if one doesn't exist, then add overclocking parameters. Here's a conservative starting point:

    [pi4]
    over_voltage=6
    arm_freq=2000
    gpu_freq=600

    • over_voltage: Increases core voltage to support higher clock speeds. Values from 0 to 8 are safe and won't void warranty. Higher values may improve stability but increase heat.
    • arm_freq: CPU clock speed in MHz. Default is 1500 MHz (1.5 GHz). This example sets it to 2000 MHz (2.0 GHz).
    • gpu_freq: GPU clock speed in MHz. Default is 500 MHz. This example sets it to 600 MHz.
  4. Save the file: press Ctrl + X, then Y, then Enter.

  5. Reboot:

    sudo reboot

If your Pi fails to boot after overclocking, the system will automatically revert to default clock speeds on the next boot attempt. You can then edit config.txt again with more conservative values.

Advanced settings

Additional parameters for fine-tuning (use with caution):

  • over_voltage_sdram_c, over_voltage_sdram_i, over_voltage_sdram_p: Increase SDRAM voltage for stability at higher RAM speeds.
  • sdram_freq: SDRAM clock speed. Default is 3200 MHz for LPDDR4.
  • force_turbo=1: Disables dynamic frequency scaling, forcing the CPU to always run at max speed. This permanently voids the warranty bit and causes high power consumption and heat. Only use for testing.

03 Test stability

After overclocking, test your Pi for stability before relying on it for important work.

  1. Check that it boots. If the Pi doesn't boot, power cycle it and let it boot with default settings, then reduce your overclock values.

  2. Run stress tests. Use stress or sysbench to load the CPU and check for crashes or freezes:

    sudo apt install stress
    stress --cpu 4 --timeout 600
    This runs a 10-minute CPU stress test. If the system crashes, freezes, or shows errors, reduce your overclock settings.

  3. Test your typical workload. Run the applications you normally use. If you experience crashes, graphical glitches, or unexpected behavior, reduce clock speeds or voltage.

04 Monitor temperature

Overclocking generates more heat. Monitor your Pi's temperature to ensure it stays within safe limits. The Pi 4 begins thermal throttling at 80°C and will reduce performance to cool down.

Check temperature in real time:

vcgencmd measure_temp

Or watch it continuously:

watch -n 1 vcgencmd measure_temp

Under full load with a good fan and heatsink, your overclocked Pi 4 should stay below 70–75°C. If temperatures exceed 80°C regularly, improve your cooling or reduce your overclock.

To check if thermal or voltage throttling has occurred:

vcgencmd get_throttled

A result of throttled=0x0 means no throttling has occurred. Any other value indicates the Pi has throttled due to undervoltage or overheating at some point.

If it doesn't work

  • Pi won't boot after overclocking: Power cycle the Pi. It should automatically boot with default settings. Then edit config.txt and use more conservative values. Try lower arm_freq and over_voltage.
  • System crashes or freezes under load: Your overclock is unstable. Reduce clock speeds by 100 MHz increments or increase over_voltage by 1. Ensure cooling is adequate.
  • High temperatures (above 80°C): Improve cooling: ensure the fan is working, heatsinks are properly attached, and there's adequate airflow. Reduce overclock settings if temperatures remain too high.
  • Graphics glitches or corruption: Reduce gpu_freq or increase over_voltage. GPU overclocking can be less stable than CPU overclocking.
  • USB devices not working: This can indicate power supply issues. Use the official Raspberry Pi power supply. Disconnect unnecessary USB devices.

Need help with overclocking?

Tell us your Pi 4 model (RAM size), your cooling setup, your config.txt overclock settings, and the symptoms you're experiencing.

Contact Vilros Support ↗