RT Cunningham

Close Close

My Raspberry Pi 400 Desktop Computer

Posted in Computers on July 25, 2022

Raspberry PiThis is a complete rewrite of the article I originally wrote in April 2022 about my Raspberry Pi 400. I intentionally set it up with the default operating system for a second time on one of several solid-state drives I have at my disposal.

The Raspberry Pi 400 Keyboard and the Kit

The Raspberry Pi 400 is a personal computer, with the computer inside the keyboard itself, just like the early Apple and Commodore computers of the 1980s. Instead of an x86 or x64 (or x86_64, AMD64, Intel 64) microprocessor, it contains an AArch64 (or ARM64) low-power microprocessor. It’s designed to run a Linux operating system, but it can do other things as well.

You can buy the keyboard alone or as part of a kit. I recommend the kit unless you already have the accessories you need. I lifted the picture above from the website because it shows what it looks like with everything plugged in.

The wired optical mouse is plugged into the USB 2.0 port. You can’t see the Ethernet port to the left of it. There are two USB 3.0 ports between that port and the USB-C power port, with the power cable plugged in. The next two ports are micro HDMI ports, with only one cable plugged in. What you can barely see, and only if you look for it, is the micro SD card sticking slightly out of the micro SD card slot on the right.

The only thing that doesn’t come with the kit is a monitor, with or without speakers. I can confirm that only the micro HDMI port closest to the power port carries audio over the cable.

Replacing and Adding Accessories

The Raspberry Pi OS comes preinstalled on the micro SD card. You can use the Raspberry Pi Imager application to install it on a solid-state or hard disk drive. Unless you need a lot of storage space, I recommend a low-capacity solid-state drive.

To use any drive to boot up in a USB port, make sure the micro SD card slot is empty, or have a micro SD card in it without any operating system on it. The operating system will check that slot during the boot up sequence before checking any of the USB ports. The only thing that will happen if there isn’t an operating system on a micro SD card is that the boot up process will take a few seconds longer.

You can use a wireless mouse instead of the mouse that comes with the kit. Its receiver, or a hub of some kind, is probably the only thing that should occupy the USB 2.0 port. You can use an old VGA monitor, without an HDMI port, if you buy an HDMI to VGA adapter. Since most of those old monitors don’t include sound, your adapter should include a 3.5 mm audio jack, so you can connect inexpensive desktop computer speakers to it.

Booting up the Raspberry Pi 400

As soon as you plug in the power supply, the computer starts to boot up immediately. When you shut it down from the desktop environment, the power shuts off, and then you can turn it back on using the F10 function key.

Your power supply should be plugged into a surge protector at the very least, to protect it from the wrong voltage, and you can keep it turned off until you’re ready. A compatible power supply with an inline switch is another idea, and you can find one at in the United States or Lazada in the Philippines.

Some of the people who’ve reviewed the Raspberry Pi 400 like the desktop environment that comes with the operating system. I’m not one of them. Luckily, you can install an additional desktop environment without any issues.

Using an Additional Desktop Environment

Low-capacity solid-state drives are inexpensive enough to own more than one. After doing more testing than I care to remember, I settled on the Raspberry Pi OS with the Cinnamon desktop environment. This is how I did it in the terminal:

sudo tasksel

Select the option for “Cinnamon” only on the menu.

sudo update-alternatives --config x-session-manager

Select the number for “/usr/bin/cinnamon-session” on the menu.

sudo reboot

After the system rebooted, I was logged into the Cinnamon desktop environment automatically. Since this isn’t what I wanted, I had to edit this file:

sudo nano /etc/lightdm/lightdm.conf

The line that started with “autologin-user” (that wasn’t a comment) had to be changed to “autologin-user=false”.

Installing Cinnamon had disabled Wi-Fi. I had to edit this file:

sudo nano /etc/dhcpcd.conf

And add this line:

denyinterfaces wlan0

I also had to edit this file:

sudo nano /etc/NetworkManager/NetworkManager.conf

And change “managed=false” to “managed=true”.

If you connect using Ethernet instead of Wi-Fi, you obviously don’t have to worry about it. Anyway, everything worked properly the next time I rebooted.

The Solid-State Drive Trim Command

According to Crucial:

Trim works with Active Garbage Collection to clean up and organize your solid state drive. Trim is beneficial, but not mandatory. Because some operating systems do not support Trim, SSD manufacturers design, create, and test their drives assuming that Trim will not be used.

One should never assume anything. If you want to be absolutely sure your solid-state drive will last as long as it should, there are a few steps to take when it comes to the Raspberry Pi OS. No matter how you use it, in an external enclosure or connected by a simple adapter, you should make sure trim is enabled and functioning.

Install smartmontools and enter a single command (your solid-state drive might not be /dev/sda, so adjust accordingly):

sudo apt install smartmontools
sudo smartctl -i /dev/sda

If you see this line, your solid-state drive supports trim:

TRIM Command:     Available

While the operating system supports trim, and it works automatically with internal drives, it doesn’t work automatically with external drives. First, run this:


One of the lines will identify your solid-state drive. Mine reads:

Bus 002 Device 003: ID 1f75:0621 Innostor Technology Corporation IS621 SATA Storage Controller

The number pair following “ID” is what you want, without the colon. Next, create this file:

sudo nano /etc/udev/rules.d/50-usb-ssd-trim.rules

Add this line, replacing “1f75” with the first number and “0621” with the second number:

ACTION=="add|change", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0621", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap"

When you reboot, the operating system will execute the trim command once a week, if you’re using it often enough. If you want to test it, run:

sudo fstrim -v /

It should tell you how many bytes were trimmed. If you run it a second time immediately, it should show:

fstrim: /: the discard operation is not supported

If it shows the second result the first time, try it again after using the computer for a few hours. You can check when the operating system last executed the trim command (not you), and the result, with:

journalctl | grep fstrim.service

Overclock the CPU on the Raspberry Pi 400

I’ve watched more YouTube videos than I care to remember about overclocking the CPU. Despite what it says in the /boot/config.txt file, the default frequency isn’t 700. It’s 1800. If you’re satisfied with that, you don’t need to do anything. If you’re not, you can safely overclock it up to 2147 without voiding the warranty. Just replace “#arm_freq=800” with:

over voltage=6

After you reboot, the results of “lscpu” in the terminal will show 2200 as the maximum CPU Mhz. I’ve been running my Raspberry Pi 400 like this for three months and I haven’t experienced any issues with it.

Other Operating Systems

The “tasksel” command, which I wrote about earlier, will let you add alternate desktop environments. Using the Raspberry Pi Imager application, you can install another operating system altogether. I prefer the “Use custom” option, and I’ve downloaded and tested many of what’s available.

Manjaro, an Arch derivative, seems to have its act together. I’ve installed and worked with four editions for more than a day, each time. I can’t say the same about EndeavourOS, another Arch derivative. It simply requires too much work.

EndeavorOS uses one ISO file download for everything. I had to install the ISO file onto a USB flash drive and then boot it on my laptop computer to install the operating system on a solid-state drive. Then I had to do the real installation after booting up the solid-state drive on the Raspberry Pi 400. After that, I had to install some applications that I thought should have already been installed.

Ubuntu (with the GNOME desktop environment) worked okay, as did Ubuntu Mate. There are more distributions supporting the Raspberry Pi computers, but I don’t have the will to test them all. I don’t even have the desire to find them and download them.

I’m keeping one Manjaro edition on another solid-state drive for two reasons. First, I need a backup system in case I do something stupid. Second, there are some applications available on the Arch derivatives that aren’t available on the Debian derivatives. There are two that specifically come from the Arch User Repository (or AUR).

Image by Raspberry Pi Foundation

Other Posts That May Interest You:

Copyright © 2022