The Raspberry Pi 400 is the first offering from the Raspberry Pi lineup that is meant to approach desktop level performance. The official raspberrypi.org site lists the Pi 400 kit as the “Raspberry Pi 400 Personal Computer Kit”. It comes in the very interesting form factor of a keyboard with all the ports right in the back!
Although the performance on stock clock speeds and with a SD card is really exceptional, especially for a Raspberry Pi, I would not call it desktop class performance. Fortunately we *can* make it desktop class performance with a few tweaks! This guide will show how to overclock the Pi 400 as well as set it up with a NVMe SSD to get the maximum possible performance we can out of it!
The ICY BOX is basically a giant heatsink that you mount a high performance M.2 NVMe drive inside of. This enclosure is really fast but requires a powered USB hub. Not even the 3.5A adapter can reliably power it! The enclosure works well and will physically feel warm to the touch as it is pulling the heat off your NVMe drive!
The Samsung 970 EVO Plus is a fantastic drive and has fallen in price substantially. It’s widely available around the world. The smaller capacities (such as the 250GB version) of this drive are perfect for the Pi! This is the top performance option without going into the “Pro” series of the lineup which are much more expensive.
Links: AliExpress.com*, Amazon.ae*, Amazon.ca*, Amazon.com*, Amazon.com.au*, Amazon.com.mx*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.in*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.sa*, Amazon.se*, Amazon.sg*
The Sabrent powered USB hub delivers a whopping 2.5A of dedicated power for your USB attached devices. This is almost as much as the Pi adapter itself is rated for (3.0A). It will easily power the most thirsty of setups such as NVMe enclosures.
Note: Make sure Amazon doesn’t try to take you to the non-powered version and that it’s the one with the AC adapter that plugs in to provide extra power
The stock clock speed for the Pi 400 is 1.8 GHz out of the box. This is a big jump from the Pi 4’s 1.5 GHz right out of the box. It also has plenty of headroom for overclocking!
Exactly how much headroom your specific Pi 400 will have will depend on how lucky you got in the “silicon lottery” since each chip produced has a varying overclocking potential as well as having a stable high quality power source (both the adapter and at the wall).
The only other thing to consider is your power source “at the wall”. As long as you aren’t plugging it into a really dirty or unstable power source such as a building with known bad wiring / a failing overextend power strip you should be okay.
Attaching additional USB accessories also draws from the Pi’s available power so be careful attaching too many power drawing accessories. For high power drawing SSDs you may need a powered USB hub* but we’ll cover that later in the SSD section.
For initial configuration I recommend plugging in as few accessories as possible to keep the power drain on the Pi low while you make sure everything else is stable under normal conditions before attaching your power drawing devices. These can interact with your overclocks!
Effects on Warranty (Read this!)
Before you go any further you should understand the effect that overclocking can have on your Pi’s warranty. From the Raspberry Pi documentation on overclocking:
NOTE: Setting any overclocking parameters to values other than those used by raspi-config may set a permanent bit within the SoC, making it possible to detect that your Pi has been overclocked. The specific circumstances where the overclock bit is set are if force_turbo is set to 1 and any of the over_voltage_* options are set to a value > 0.
Basically using the option “force_turbo=1” combined with “over_voltage” > 0 will set the overclocking sticky bit. This could cause headaches if you were trying to get a warranty replacement from your reseller as an example.
So just don’t use “force_turbo=1” and you’re all set, right? Yes, except there’s a catch. Without the force_turbo option the maximum value you can use for over_voltage is 6. This means if you want to go to the absolute top limits your Pi could potentially hit you will need to trigger the sticky bit.
I personally did not void mine to write this guide and never went above 6 before I hit an overclock I was satisfied with (more on that later) but I wanted to clarify what is/isn’t allowed according to the Pi Foundation before we start changing things and your Pi gets “flagged” with the naughty “extreme” overclocker sticky bit.
Now would be a good time to make sure you don’t happen to have force_turbo=1 in your config.txt already before we set over_voltage in the next section if you want to make sure you don’t get flagged. It is the combination of the two together that triggers it!
Since every Pi 400 will have different overclocking potential it’s best to think of these steps as a process to narrow down the best values for your specific Pi. I will give the numbers I was able to achieve on mine as a guideline but yours will be slightly and may even be wildly different. The important part is if you follow the process and narrow it down you will find the right numbers for your Pi!
There are two important parameters in the Pi’s /boot/config.txt file we’ll be adding/editing to adjust our CPU overclock (with their default values for the Pi 400):
arm_freq is the Pi’s CPU frequency. The name of the parameter is due to the Pi having an ARM type processor and this parameter represents the frequency in MHz that the processor runs at. The second parameter is a little bit more self explanatory. It allows more voltage to flow the Pi than is normally allowed up to a maximum of 6 and is relatively safe to that point (theoretically higher voltage can reduce the life and wear on the device but 6 is not getting into dangerous territory yet and won’t even void the warranty/set the overclock bit).
As we discussed in the previous section to go higher than 6 you have to set the flag force_turbo=1 which will set the sticky bit that your Pi has been “overclocked” permanently. Definitely don’t do this and leave force_turbo out of your config for now. Remove it if it is in there already. If you want to go higher later you can but I recommend seeing what your board can do within the safe “approved” limits first.
Before we start understand that this is a trial and error process. Take a backup of your existing config.txt file before beginning. If we pick a bad set of overclock parameters your Pi will often not even boot until you correct it from another PC. The easiest way to fix this is to put your SD card into a different device and edit /boot/config.txt and set the parameters back to something more reasonable / restore a backup version / etc. I know some of you reading may not have a PC available despite having your Pi so if this is the case I would wait or make sure you have some way to restore config.txt back if we set an overclock that won’t boot!
For now let’s start with a 200 MHz overclock and try for a nice round 2.0 GHz. Let’s set the over_voltage to 6. On my Pi 400 I initially tried an over_voltage of 2 and it would not boot at all. I bumped it up to 4 in the config.txt file and was able to get a stable boot. I then adjusted it to 3 and was able to boot but got lockups a couple of times per hour (a working but unstable overclock). I would recommend just going straight to 6 for testing the overclockability of your board. Once you find the optimal frequencies with your board you can try stepping down the voltage afterward working from those.
We are going to edit config.txt. To edit it on the Pi open a terminal window and type:
sudo nano /boot/config.txt
This will open your Pi’s configuration file. If this is your first time editing the file arm_freq and over_voltage will typically be commented out/missing completely. This is fine, we are just going to add them ourselves with the rest of our parameters that aren’t commented out. Here’s what mine ended up looking like:
# Enable audio (loads snd_bcm2835) dtparam=audio=on over_voltage=6 arm_freq=2000 [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] dtoverlay=vc4-fkms-v3d
Note that I did not add the parameters in the [pi4] or [all] sections. Let’s add it with the rest of the global parameters like right after your audio is enabled as these are essentially applying hardware-level operational changes just like enabling/disabling the audio device is.
Now press Ctrl+X to save the file and answer “y” to the prompt asking whether to save the changes. The nano application will close and the Pi is ready to be restarted. You can do this with a “sudo reboot”. If all goes well you will boot up and the overclock will be applied! If it won’t boot edit your config.txt on another device and try upping the over_voltage parameter to 6 and see if it can boot with the maximum voltage at 2.0 GHz.
Most of you should be able to hit this speed unless you were particularly unlucky in the silicon lottery or are possibly having issues with your power setup either at the adapter or at the wall.
Finding Maximum Overclock (without invalidating warranty / tripping security bit)
Finding the maximum stable overclock is pretty simple to explain after everything we’ve covered so far. Make sure you have over_voltage set to 6, the maximum value allowed without enabling force_turbo and tripping the permanent “overclocked” security flag.
From there we will increase our overclock and then use the system for a little bit to watch for lockups or other signs of instability. Make sure you try things like browsing the internet or other activities that will work the SSD and the CPU to make sure that you are in fact on a stable overclock!
If you are getting random lockups or it won’t start up some of the time then reduce the overclock or increase the over_voltage.
Pi 400 SSD (NVMe or 2.5″ SATA) Setup
In order to reach desktop level performance we are going to need desktop class storage. The full Pi 400 kit gives you everything you need except for this. The included kit comes with a application class (A1) card. While this is a great card and feels great to use with the stock setup it is *not* desktop class performance and even the best SD card in the world is not a desktop class device and could never really compare to a NVME drive or even 2.5″ SATA SSD.
Fortunately the Pi 400 released with support for USB mass storage booting (MSB) support right from launch. This means that if you have a portable SSD or have old SSDs laying around you pretty much have everything you need (as long as you have a storage adapter or your portable drive is USB). You can see all the equipment I used in my setup to write this guide in the “Equipment Used” section.
Powering USB External Storage
Power considerations are extremely important when setting up a USB powered drive with a Pi 400. Unfortunately the Raspberry Pi foundation gave it the exact same 3.0A power supply that the Pi 4 takes. This really doesn’t give us very much to work with when it comes to powering externally powered devices attached to the Pi.
NVMe enclosures nearly always will require a powered USB hub. Symptoms of not having enough power for your storage will include not booting at all or only booting sometimes but then usually locking up soon afterward.
If you already have a image downloaded and are already ready to write it using your preferred method then you can go ahead and image your drive now the exact same way you would prepare a SD card and skip to the next section. With the new bootloader support that comes included with the Pi 400 we don’t need to do anything more than this.
If you don’t have an image yet or are just using the OS that came on the Pi’s SD card I highly recommend using the official Pi Imager tool available here. It’s available for every operating system and it catches and prevents a lot of really frustrating and hard to diagnose issues that can come up when preparing and imaging drives. It looks like this:
Once you’ve downloaded and ran the Pi Imager tool select the OS option you’d like to use. I recommend doing the 64 bit Raspberry Pi desktop option on the Pi 400 and taking adantage of the 64 bit capabilities. Other options like Ubuntu are also available (I recommend the newest version available for Ubuntu to avoid problems, 20.10 at time of writing works better than 20.04).
Next plug your USB external drive into the computer and it will show up as an available option when you click the “Choose SD card” option. Don’t worry about it saying the “SD card” part, every one of my external drives has shown up anyway. Finally go ahead and click third and final “Write” button.
If your drive doesn’t show you can always image it the old fashioned way using your favorite image writing utility but I have had nothing but great experiences with the official Pi Imager tool. Nevertheless, I have heard of issues like compatibility with Lint Minux in the past and other similar very specific configuration related / version issues breaking the utility. If you are having trouble with the utility the old fashioned way will still work whether that’s a utility like Etcher or dropping all the way down to the command line and using dd.
Once you’ve prepared the drive shut down your Pi 400 and remove the SD card from the slot. Leave only your SSD plugged in.
When you connect the power you may / may not see it resize your file system to the drive’s free space initially and then it will boot into your OS.
Give it at least a good 60 seconds before you assume it hasn’t worked as the first boot can take a bit longer due to the initial “first boot” steps.
A quick way to verify everything is working correctly and you’re getting proper performance is to run my quick Raspberry Pi Storage Benchmark. You can run it with this one liner:
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
This will run a few quick standard tests (DD write speed, iozone, fio) and give you a cumulative score. You can compare it with mine or you can compare it with others at https://storage.jamesachambers.com/. There are thousands of benchmarks already to compare with to give you an idea of whether you are getting the performance you should out of your drive!
Here were my results:
You can also view the result on my storage benchmark results site at https://storage.jamesachambers.com/benchmark/41663
If you are having trouble with your firmware or think your firmware may be causing an issue check out my firmware update / restore guide
For a lot more information about setting up USB booting as well as troubleshooting / which adapters work and don’t work check out my new Raspberry Pi USB boot guide here
If you are trying to USB boot Ubuntu (especially Ubuntu Server) you may want to check out my Ubuntu Native USB boot guide as well!