Some Raspberry Pi 4s Can Now Overlock to 2.3 GHz. Here’s How.

2020-11-13

Leave no MHz behind. Where the previous high for the Pi 4 was 2.147 GHz, newer units, including the and some variations of the Compute Module 4 can now hit a full 2.3 GHz. All units, except the , operate a stock clock speed of 1.5 GHz so this is a 35 percent speed jump you get by tweaking a few settings and, hopefully, providing active cooling.

Overclocking a Raspberry Pi is deceptively simple. We edit the config.txt file found in the boot partition and, after a reboot, we see a performance boost, for free. We spent the time testing the limits of the Raspberry Pi 4 and the Compute Module 4, deploying multiple overclocks from 2.2 GHz to 2.3 GHz to give you the data that you need to overclock your Raspberry Pi 4 / Compute Module 4. 

Our tests involved the Raspberry Pi 4 4GB and 8GB, Compute Module 4 1GB and an 8GB Compute Module Lite connected to the official Compute Module 4 IO Board. For the Compute Module 4, we used its onboard eMMC flash storage as a boot device, and for the Raspberry Pi 4s and the Compute Module Lite we used a microSD card (see ) as our boot medium. All test machines ran the latest version of Raspberry Pi OS, updated with the latest software. Our stress tests were conducted using Stressberry which runs the CPU at 100% to generate temperature data and to ensure that the CPU can cope with heavy tasks at those speeds.

Before we conducted the test we needed to prepare our devices for use.

Flashing an Image: Raspberry Pi 4 and the Compute Module 4 Lite 

The Compute Module 4 Lite has no eMMC storage so we will need to write a micro SD card using the Raspberry Pi Imager. This is exactly the same process as if we were to write a card for other models of Raspberry Pi. See for the first time or for details. If you already have a microSD card set up, make sure you update your operating system by entering: 

sudo apt update  sudo apt upgrade

You may also want to update your firmware to the latest version by entering

Sudo rpi-update

Flashing an Image on Compute Module 4 with eMMC Storage 

There are 32 variants of the Compute Module 4, but at the most basic level there are two key models. The Compute Module 4 and the Lite version. The Compute Module 4 has onboard eMMC flash storage, while the lite version omits any form of flash storage.

For the Compute Module 4, to flash the onboard storage we need to download the contents of a to a machine running Linux, or another Raspberry Pi.

1.  Open a terminal and clone the repository.

$ git clone --depth=1 https://github.com/raspberrypi/usbboot

2.  Change directory to enter the download repository.

$ cd usbboot

3.  Install libusb, a developer tool to enable USB access in scripts. 

$ sudo apt install libusb-1.0-0-dev

4.  We then need to make the rpiboot application from the downloaded files. 

$ make

5.  Connect the Compute Module 4 to the Compute Module 4 io Board. Connect a micro USB cable to micro USB port and then connect the other end to a USB port on your Linux computer.

6. Locate pins J2 and fit a jumper to disable eMMC boot. If you do not have a jumper, then a female to female connector can be used. This will prevent the Compute Module 4 from booting and will instead enable us to mount the Compute module 4 as if it were a USB flash drive. 

(Image credit: Tom's Hardware)

In the Terminal, run the rpiboot command to mount the Compute Module. 

$ sudo ./rpiboot

After a few moments the drive will appear and be accessible.

7.  On your Linux computer, navigate to to download Raspberry Pi Imager. Install the application.

8. Open Raspberry Pi Imager and select Raspberry Pi OS (32-bit).

(Image credit: Tom's Hardware)

9.  Click on CHOOSE SD CARD and select your Compute Module 4.

10. Click on Write, to flash the OS to the eMMC storage.

With the OS written to the Compute Module 4, we can now close Raspberry Pi Imager. 

Extra Configuration Required for Compute Module 4 

Before we can use the Compute Module 4, we need to make a change to a config file in order to use the USB ports of the IO Board which are disabled by default.

1. Open the File Manager, locate the Boot partition of the Compute Module 4, or the micro SD card and open the config.txt file with a text editor.

2. At the bottom of the file add the following lines to enable the USB ports. The first line is a comment to remind ourselves as to the function of the command underneath it. 

#Enable USB ports on IO Board dtoverlay=dwc2,dr_mode=host

An optional step is to enable the use of an external antenna. The Compute Module 4 has a built in Wi-Fi antenna and a ufl connector for an official external antenna. To use this we need to add a further line to the config file, config.txt.

At the bottom of config.txt add these lines to enable the external antenna.

#Enable external antenna dtparam=ant2

Eject the boot and root partitions from your Linux machine before removing the USB cable / micro SD card.

Booting the Compute Module 4 

If you are using the Compute Module 4, remove the micro USB cable and the jumper from J2 of the IO Board. If you are using the Compute Module 4 Lite, insert the micro SD card.

For both versions, connect your keyboard, mouse, HDMI and external antenna (if you have chosen to use an external antenna). Then plug into power, which will trigger the Compute Module 4 to boot to the Raspberry Pi OS desktop.

Overclocking the Raspberry Pi 4 and the Compute Module 4 

(Image credit: Tom's Hardware)

The stock speed of the Raspberry Pi 4 and the Compute Module 4 is 1.5 GHz. As with any model of Raspberry Pi, they can be overclocked to provide a free performance boost.  

(Image credit: Tom's Hardware)

Before we even start the overclock process we will need to ensure that there is adequate cooling. For passive cooling you will need much more than some simple stick-on heatsinks. We chose to cool the Compute Module 4 with a , hacked to sit above the module and controlled from the GPIO. We also wrote a simple Python script to run on boot which started the fan at full speed. If you have access to, or a wish to use PC fans then the Compute Module 4 IO Board has a fan header at J17 which can be used with 12V PC fans. 

(Image credit: Tom's Hardware)

To cool our Raspberry Pi 4, we used a , an extreme cooling solution which looks and acts as heatsink and fan found inside a PC case. This cooling solution runs directly from the 5V pins of the GPIO. 

(Image credit: Tom's Hardware)

To overclock a Raspberry Pi we need to edit the config.txt file, the same file that we earlier edited to add USB and external antenna support.

1. Open the config.txt file for editing in a terminal window on your Pi. 

sudo nano /boot/config.txt

2. Using the keyboard, move to the bottom of the file and add a comment line to identify the overclock instructions.

#Overclock Instructions

3. Set the CPU speed by adding the arm_freq option and entering the desired speed in MHz. In this example we set the overclock to 2275MHz. Changing the value will set the maximum CPU speed, so use 2200, 2250 and 2275 etc. 

arm_freq=2275

4. Overclock the GPU to 750MHz by adding this line. 

gpu_freq=750

5. Overclocking requires extra voltage for the CPU. Add the over_voltage value of 8 to provide 1.4V of extra voltage.

over_voltage=8

6. Press CTRL + X and then press Y to save and exit the file.

7. Reboot the Raspberry Pi and once the reboot is complete open a Terminal and use the vcgencmd to show the current ARM CPU speed.

(Image credit: Tom's Hardware)
vcgencmd measure_clock arm

If your Raspberry Pi does not boot, it means that your particular CPU cannot handle the clock speed you configured it for. Stick your microSD card in another computer or mount your Compute Module 4 on another computer so you can change the values in config.txt to a lower MHz.

Overclocking the Raspberry Pi 4 and Compute Module 4 to 2.3 GHz

Before we start, we need to make this very obvious. Overclocking to this level will invalidate your warranty. You break it, you bought it!

We found success with a Raspberry Pi 4 8GB and a Compute Module 4 Lite with 8GB RAM. This overclock did not work with our Compute Module 4 1GB or our Raspberry Pi 4 4GB and the maximum speed we achieved with those boards was 2275 MHz.

To overclock the Raspberry Pi 4 8GB and the Compute Module 4 to 2.3 GHz, we need to edit the config.txt file and most of the configuration is the same as before, except for the CPU speed, 2300 and an extra line which forces turbo mode frequencies even when the ARM cores are not busy. Using “force_turbo” will invalidate your warranty.

Here is our config for 2.3 GHz.

#Overclock arm_freq=2300 gpu_freq=500 over_voltage=14 force_turbo=1

The Results: 2.3-GHz Raspberry Pi 4 

We ran four overclock tests for each Raspberry Pi 4 and Compute Module 4. Using 2200, 2250, 2275 and 2300 overclocks.

The Compute Module 4 and Raspberry Pi 4 4GB reached 2275 MHz and ran stable. Taking them to 2300 MHz and repeating our tests caused them to lock up and crash during the cooldown period of the Stressberry test. 

The same test on the 8GB Lite module and our 8GB Pi 4 ran perfectly on multiple occasions. Could RAM play a key factor in overclocking performance? Is there something about 8GB Raspberry Pi which makes them better for overclocking? We asked that question to Eben Upton, Chief Executive of Raspberry Pi Trading

“I think this is mostly a silicon lottery effect, possibly influenced by long-term process trends.

There certainly are boards out there that can do crazy speeds, and we've been very conservative in how hard we push (Broadcom) 2711: it's much more important to us that the product runs reliably at 1.5 GHz than that people can get good overclocks,” he said. “We've done a bit of attention-to-detail work on the power planes and decoupling on recent boards...but I would expect this to have a relatively marginal effect.”