How to Overclock the Raspberry Pi


Article Outline
  1. 1. 1. Edit the config.txt
    1. 1.1. Raspberry Pi OS
    2. 1.2. Ubuntu
  2. 2. 2. Add the following lines to ‘config.txt’
    1. 2.1. Raspberry Pi 4
    2. 2.2. Raspberry Pi 400
  3. 3. 3. Description of Overclocking variables
  4. 4. 4. How to measure temp and cpu frequency
    1. 4.1. Raspberry Pi OS
    2. 4.2. Ubuntu

Instructions for overclocking the Raspberry Pi 4/400.[1]

1. Edit the config.txt

Overclocking the Raspberry Pi requires editing the config.txt file.

Raspberry Pi OS

  • Open config.txt for editing,
1
sudo nano /boot/config.txt

Ubuntu

  • Open config.txt for editing,
1
sudo nano /boot/firmware/config.txt

2. Add the following lines to ‘config.txt’

Raspberry Pi 4

1
2
3
4
5
6
over_voltage=8
arm_freq=2200
h264_freq=750
isp_freq=750
v3d_freq=750
hevc_freq=750

Raspberry Pi 400

1
2
3
4
5
6
over_voltage=6
arm_freq=2200
h264_freq=750
isp_freq=750
v3d_freq=750
hevc_freq=750

3. Description of Overclocking variables

  • arm_freq Frequency of the ARM CPU in MHz.
  • over_voltage CPU/GPU core voltage adjustment.
    • This value should be in the range [-16, 8] which equates to the range [0.8V, 1.4V] with 0.025V steps. In other words, specifying -16 will give 0.8V as the GPU/core voltage, and specifying 8 will give 1.4V. Values above 6 are only allowed when force_turbo is specified: this sets the warranty bit if over_voltage is also set.
  • gpu_freq This sets the core_freq, h264_freq, isp_freq, v3d_freq and hevc_freq together.
    • On the Pi 4 it is recommended to use the individual frequency settings (isp_freq, v3d_freq etc) rather than gpu_freq because changing core_freq is not supported, any change from the default will almost certainly cause a failure to boot, it is not likely to have the desired effect.
  • The following variables are individual overrides of the gpu_freq setting:
    • core_freq Frequency of the GPU processor core in MHz.
      • This influences CPU performance because it drives the L2 cache and memory bus; the L2 cache benefits only Pi Zero/Pi Zero W/ Pi 1, there is a small benefit for SDRAM on Pi 2/Pi 3.
    • h264_freq Frequency of the hardware video block in MHz
    • isp_freq Frequency of the image sensor pipeline block in MHz
    • v3d_freq Frequency of the 3D block in MHz
    • hevc_freq Frequency of the High Efficiency Video Codec block in MHz. Pi 4 only.

4. How to measure temp and cpu frequency

Raspberry Pi OS

Run the following command:

1
vcgencmd measure_temp

Ubuntu


  1. Title: Overclocking Options in config.txt
    Publication: Raspberry PI Foundation ↩︎