Home Projects How to Overclock Raspberry Pi 4

How to Overclock Raspberry Pi 4

by Arun Kumar
overclock raspberry pi

The Raspberry Pi is one of the most popular and reliable small board computers available in the market today. It can be configured to perform various tasks from a Network Attached Storage, Media Center, Software development to IoT programming. The Raspberry Pi 4 board is considered one of the releases with the best overall performance. However, did you know it can be overclocked to enhance its capabilities even further?.

At the heart of the Raspberry Pi 4 board lies a base ARM Cortex-A72 processor operating at 1500MHz (or 1.5GHz). That is quite a high processing speed, but we can overclock it! This post will show you how to overclock your Raspberry Pi 4 board to achieve at least 2.147GHz clock speed! Let’s dive in and learn how.

Overclocking Raspberry Pi 4

Requirements

  • Raspberry Pi 4 board
  • Raspberry Pi 4 Casing (necessary for cooling)
  • Raspbian OS

Beware!

The process of overclocking a Raspberry Pi board and trying to get the maximum value can be risk-taking. There is a high probability chance that you might corrupt your SD card, leading to data loss. To avoid that, I would highly recommend using a clean install of the Raspbian OS that doesn’t contain any vital information.

Background Information

Raspberry Pi’s usual speed is 1.5GHz. However, it idles around 600MHZ and only attains that maximum processing speed (1.5GHz) when required. By overclocking, we mean increasing the default processing speed (1.5 GHz) to a higher value. To do so, we will need to tweak the configuration file (config.txt) and overclock both the CPU (Central Processing Unit) and GPU (Graphics Processing Unit).

We had earlier tried overclocking the Raspberry Pi 4 board, and we were able to achieve speeds of up to 2.147GHz for the CPU and 750MHz for the GPU, which is usually 500MHz. That is the processing speed you will probably find on some of the latest laptop and Desktop computers we have available in the market.

Step 1: Install and Update Raspberry Pi OS

We will need to use the official Raspberry Pi operating system (Raspbian OS) for this particular process. Lucky for you, we already have a post –How to install Raspbian on Raspberry Pi, that gives you the step-by-step procedure.

Hint: In this post, you don’t necessarily need a monitor/screen since all the actions can be done on the Terminal/Console. You can, therefore, connect to your Raspberry Pi via SSH and execute all the commands that we will discuss.

Once you have installed Raspbian, we will need to update it to the latest version. Execute the command below:

sudo apt update
sudo apt dist-upgrade

When done, reboot the system with the command below:

sudo reboot

Step 2: Take note of Raspberry Speed

Before getting started with overclocking your Raspberry Pi 4, it is good you first take note of the speeds. Open the Terminal and execute the command below:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
default cpu speed

Default CPU speed

You will probably get an output of 600000. This speed is in kHz. To convert to MHz, divide this value by 1000, and you will get 600MHz. Further, divide by 1000, and you get 0.6GHz. That is the desired speed requested by the Kernel. However, that speed can be slowed down due to a voltage or temperature problem.

To get the actual speed, we will use the vcgencmd command. It is a command-line utility that gathers information from the VideoCore GPU on the VideoCore-based Raspberry Pi. It takes a wide range of parameters. Execute the command below:

vcgencmd measure_clock arm

That will give you an output of the actual speed of your Raspberry at that particular time. When you execute the vcgencmd measure_clock arm several times, you will notice that this speed varies depending on how you are using your Raspberry Pi.
To monitor this speed without constantly executing the vcgencmd measure_clock arm command, we can use the watch command below:

watch -n 1 vcgencmd measure_clock arm
watch command

watch command

That will keep the vcgencmd process running, and the results are updated each second (the -n 1 option is the interval in seconds). Execute/Run some tasks, and your Raspberry Pi will get slightly faster, above 1500000 or 1.5GHz.

Step 3: Overclock your Raspberry Pi

To overclock your Raspberry Pi 4 SBC (small board computer), we will need to tweak the configuration text file. You can easily do so from the Terminal using the nano editor. Execute the command below:

sudo nano /boot/config.txt

Scroll down to the following lines:

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
default values

Default values

As you can see, they are commented, and they are the default values. Change these configurations to the values below. Remember to add the over_voltage line.

#uncomment to overclock the arm. 700 MHz is
the default.
over_voltage=2
arm_freq=1750
overclock raspberry pi 4

Overclock Raspberry Pi 4

Now, save the file (Ctrl + O, then Enter) and exit (Ctrl + X). Reboot your Raspberry Pi by executing the command below:

sudo reboot

Once the Raspberry Pi boots up, rerun the watch command, and you will see the Pi hit speeds of up to 17500000 or 1.75GHz.

watch -n 1 vcgencmd measure_clock arm
overclock to 1.75ghz

Overclock to 1.75GHz

The over_voltage value

When you overclock your Raspberry PI, the CPU and GPU will demand a lot more voltage. If enough voltage is not provided and you overclock the Pi, you will see a lightning icon at the top of the window, and the Pi will revert to 700MHz. The over_voltage parameters accept values between -16 and 8. The default value is zero (0)

Step 4: Overclock to 2GHz

I believe you have had a taste of 1.75GHz, which I can say is quite impressive. Now let’s overclock the Pi to speeds of 2.0GHZ. Open the configuration file (config.txt) and edit the lines we added previously;y to the new values below:

over_voltage=6
arm_freq=2000
overclock to 2ghz

Overclock to 2GHz

Save the file (Ctrl + O, then Enter) and exit (Ctrl + X). Reboot your Raspberry Pi by executing the command below:

sudo reboot

Once the Raspberry Pi is back up, execute the watch command again, and you will see the Raspberry hit speeds of up to 2GHz.

watch -n 1 vcgencmd measure_clock arm
overclock to 2ghz

Overclock to 2GHz

Step 5: Overclock your Raspberry to 2.147GHz

Since we have tested the 1.75GHz and 2GHz speeds, let’s go even higher. Open the configuration file again and edit the values as shown below. This time, however, we will introduce a new value – gpu_freq.

over_voltage=6
arm_freq=2147
gpu_freq=750

Save the file (Ctrl + O, then Enter) and exit (Ctrl + X). Reboot your Raspberry Pi by executing the command below:

sudo reboot

Once the Raspberry Pi is back up, execute the watch command again, and you will see the Raspberry hit speeds of up to 2.147GHz.

watch -n 1 vcgencmd measure_clock arm
overclock to 2.147ghz

Overclock to 2.147GHz

Troubleshooting

Even though overclocking gives us quite high processing speeds, it might not go well for some boards. One of the issues you might face when you overclock your Raspberry to the maximum is the inability to boot/start. In such a situation, boot your Raspberry Pi while holding down the SHIFT key. That will revert all the configurations to the default settings. Alternatively, you can eject the SD card and access the configuration from your Laptop or Desktop.

Conclusion

I believe this post has given you a step-by-step guide on how to overclock your Raspberry Pi. Even though this process can be pretty fun, make sure you observe the warning icons (Firmware warning icons) in case you go to the extreme limits.

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.