MEANDER

My Raspberry Pi 400

Updated 15 December 2025

I bought my Raspberry Pi 400 in 2021, but I didn't start messing with it until 2022, after I bought a couple of portable solid-state drives and a portable computer monitor. I rarely use it now, making sure to power it up at least once a year and use the portable drives so they don't go bad.

The default desktop environment for Raspberry Pi OS is called "PIXEL", based on LXDE. I don't like it, and I always install Raspberry Pi OS Lite, and then the Cinnamon desktop environment on a portable solid-state drive (SSD).

This page at RaspberryTips is a good starting point if you've never done this before. My routines are simple, based on the many times I've done it.

Install the Imager on a Different Computer

Download and install the Raspberry Pi Imager from the repository. Either use it to install Raspberry Pi OS Lite on a portable SSD (which downloads and installs) or download Raspberry Pi OS Lite from here and select the file that was downloaded (it's actually faster this way).

Plug the SSD into the Raspberry Pi 400. Power on the computer, and it should boot up to the command line, where you have to log in.

Install Updates

Do the following:

    sudo apt update
    sudo apt full-upgrade
    sudo rpi-eeprom-update

If there's an update available:

    sudo rpi-eeprom-update -a
    reboot

Install the Cinnamon Desktop Environment

Use "tasksel" because it does everything you need:

    sudo install tasksel
    sudo tasksel

Select "Cinnamon" and let it install. Don't reboot yet.

    sudo raspi-config

Select "System Options" and then "Boot". Select the desktop. Select "System Options" again and then "Auto Login". Make sure it's off for both the console and the desktop. Now reboot. You should boot up to a graphical environment. Make sure you select the top option, which is the regular Cinnamon logon, before you enter your name and password.

At the terminal, edit the display manager, then find and change the user session to Cinnamon (make sure it isn't commented out):

    sudo nano /etc/lightdm/lightdm.conf
    user-session=cinnamon

Go to "System Settings" and then "Login Settings". Go to the "Users" tab and make sure that "Hide the user list" is disabled. Reboot and your user name should be selected with the default cinnamon session.

Enabling Trim on a Portable SSD

Some newer, more expensive drives do not require trim to be set up this way (the drive firmware takes care of wear-leveling). It's not even applicable to a hard disk drive (HDD). If you have an older or less expensive SSD, like me, you need to enable it. It's not automatic for an SSD connected to any Raspberry Pi model. The operating system executes "fstrim" once per week, by default.

The "fstrim" command will fail if the SSD provisioning mode is anything other than "unmap".

At the terminal:

    cat /sys/block/sda/device/scsi_disk/*/provisioning_mode

If it doesn't say "unmap", do this:

    sudo -s
    echo unmap | tee /sys/block/sda/device/scsi_disk/*/provisioning_mode

Put this script in your home directory:

#!/bin/bash
if [ "cat /sys/block/sda/device/scsi_disk/*/provisioning_mode" != "unmap" ] ; then
    echo unmap | tee /sys/block/sda/device/scsi_disk/*/provisioning_mode
fi

Use an hourly cron job (sudo crontab -e), @hourly /home/username/unmapit.sh (your username instead of "username"), to keep it up-to-date. You can run it manually like this:

    sudo fstrim -v /

When I boot up, the provisioning mode reads as "full", regardless of what it was when it was shut down or rebooted. When I run "fstrim" manually, the provisioning mode changes to "disabled". This is why the cron job needs to be hourly. There's no way to know exactly when the operating system is going to execute "fstrim". The script does nothing if it reads "unmap".

Overclocking

Overclocking isn't necessary for everyday use. It simply increases the turbo speed.

    sudo nano /boot/firmware/config.txt

Add over_voltage=6 and arm_freq=2147 at the end of the file, on separate lines. If you reboot after this change, the command lscpu will show the maximum MHz as 2200 instead of 1800.

Pi Apps

To install Pi Apps at the terminal:

    wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash

With Pi-Apps, you can install zram ("More RAM"), games, and other apps not available in the regular Raspberry Pi repository.