Overclocking Raspberry Pi 4

Safe overclocking of the Raspberry Pi 4 to 2 GHz

Raspberry Pi Zero 2Last updated: November 8, 2021

Introduction.

When a positive voltage is applied to the gate, negatively charged electrons inside the body are drawn just under the gate insulator, thereby forming a conductive tunnel between the source and the drain. The state is 'on'. Removing the voltage on the gate and the MOSFET switches off again. The insulator between the gate and the body ensures that almost no current is needed to control the transistor. That explains why, for instance, pocket calculators can work years on a single battery.

Overvoltage.

Heat.

Preparations.

EEPROM.

Check always if you have the latest EEPROM (electrically erasable programmable read-only memory) firmware installed. The Raspberry Pi 3 had all the operating software on the SD card. The Raspberry Pi 4, on the other hand, is also partially booted from two EEPROMs. These EEPROMs are programmed after PCB assembly in the factory. Updating the firmware in both EEPROMs, with improvements made recently by the Raspberry team, will not immediately increase the clock speed, but will decrease the heat due to reduced power consumption. The update involves the installation of the rpi-eeprom loader. The new EEPROM software is of course not mandatory. More information about the installation can be found here. And this is a good article testing the heat production of various firmware versions. $ sudo apt-get update$ sudo apt-get full-upgrade$ sudo apt-get install rpi-eeprom# to get the current status$ sudo rpi-eeprom-update# to update the firmware$ sudo rpi-eeprom-update -a$ sudo reboot

Beta version software.

Previously, the highest achievable clock frequency was limited to 1850. Above that, you had to install a Raspbian beta version. Fortunately, this limit has now been discontinued since NOOBS 3.3.1. Now you can easily increase the clock frequency to above 2000 MHz if you want. The highest stable frequency during our experiments was 1950 MHz.

Practice.The actual overclocking is surprisingly simple. One line of text, arm_freq=xxxx, in the /boot/config.txt will do. The table below, some frequencies are given. Up to 2140 MHz, the Raspberry Pi 4 still works, but it will crash when all four cores are running simultaneously. So be cautious. If the CPU gets above the 60°C (140°F), a frequency of even 1950 MHz can crash your RPi.

GPU overclocking.

Not only the CPU but also the GPU can be overclocked. One extra line of text, gpu_freq=xxx, in the /boot/config.txt will do. The GPU frequency may increase from standard 500 MHz to a maximum of 650 MHz. Overclocking the GPU needs also overvoltage and, of course, generates additional heat. Because we mostly use the CPU with its NEON-ARM instructions, we don't overclock the GPU. In our case, it would only generate unnecessary heat. SDRAM overclocking.In the previous Raspberry Pi 3, it was also possible to overclock the SDRAM. Increasing both sdram_freq and over_voltage_sdram gave you a faster data transfer rate from ram to CPU. However, overclocking the SDRAM on the Raspberry Pi 4 is not possible. Luckily the design team used the newest DDR4 memory with a clock of 3200 MHz, giving you a 52x faster transfer rate compared to the RPi 3. Overclocking this type of memory now only results in a negligible increase in performance.

Auto adjusting overvoltage.

Since the Raspberry Pi 400 has a large heat sink, overclocking is possible without the risk of overheating the CPU. That is probably why the latest Raspberry Pi firmware has automatic overvoltage adjustment. The clock governor takes care of this. However, it turns out that the choice of an overvoltage by the governor is often too moderate. A little bit more voltage on the core may lead to fewer crashes. You can always set the over_voltage parameter. Keep in mind, it's a fixed value, always selected, even when the cores are running idle at arm_freq_min.

Open the Nano text editor with the following command and place your lines at the end of the file. Close the session with the <Ctrl+X> key combination. With <Y> and <Enter> changes are being saved. Now reboot and your Raspberry Pi 4 runs at the new speed. Please note, the figures given are only examples. You can adjust them to your own good.$ sudo nano /boot/config.txt # Add your lines at the end.arm_freq = y gpu_freq = z# you may skip this lineover_voltage = x # Ctrl+X, Y, Enter to save the session# Reboot to run at the new clock frequency$ sudo reboot

Underclocking.

Like you can overclock the Raspberry Pi, you can also underclock your Pi.The reason is mainly to reduce power consumption. Not all parts of the chip are affected by the central clock governor, for instance, the USB and Ethernet devices. Clocked at 200 MHz, your RPi consumes about 1.7 Watts.$ sudo nano /boot/config.txt# Add your lines at the end.arm_freq_min = 200 # Ctrl+X, Y, Enter to save the session # Reboot to run at the new clock frequency$ sudo reboot

Power consumption.As expected, power consumption will increase in proportion to the clock frequency. Below is a table with the power consumption of the Raspberry Pi 4 at different clock frequencies. The first line shows a Raspberry Pi which has been shut down. Even then, the electronics on the board still consume 300 mA. The second line reflects the situation when the Pi is running idle. All other lines indicate the power consumption of a Raspberry Pi 4 running with four cores simultaneously at full speed. The maximum allowable temperature is inversely proportional to the core voltage. This temperature is shown in the fourth column.

As mentioned earlier, keep an eye on your temperature when your Raspberry is running at high speed. Below are some graphs with different cooling options. We like to use this 'sandwich' heat sink because it also protects your electronics on the back against short circuits or other damage.

When the Raspberry Pi gets too hot, it starts to throttle. Here is an example of this phenomenon. Running a deep learning model is an intensive task. All four cores are used here, each up to 86%. The temperature hits 82 °C (180 °F) and the frequency is lowered, as can be seen from the yellow color in the temperature monitor. Needless to say that this situation should not last too long.

Final remarks.

Use a new SD card. Old and worn out cards cause problems when the Raspberry Pi is overclocked. They can crash the system when writes are stacked due to slow processing. There is a very powerfull tool which can be used when working with the Raspberry Pi hardware: vcgencmd (VideoCore General Command). We use it all the time. A few examples. More info can be found here.# to monitor your actual clock in a separate terminal$ watch -n1 vcgencmd measure_clock arm# to monitor your actual Vcore in a separate terminal$ watch -n1 vcgencmd measure_volts core # to get lots of information about the current status$ vcgencmd get_config int

Last updated