Raspberry Pi

About

Raspberry Pi is a series of small single-board computers (SBCs). I use Raspberry Pi 5 as a simple home server running Kubernetes (using K3S). On this page, you can find some notes about Raspberry Pi 5 configuration.

Configuring locale

If you change locale in Raspberry Pi Imager during the installation of Raspberry Pi OS, you might see the following warning message when logging in to the Raspberry Pi via SSH:

setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

To fix this issue, do the following:

  • Edit /etc/locale.gen file:
    sudo vi /etc/locale.gen
    
  • Uncomment the line containing en_US.UTF-8.
  • Update locale:
    sudo locale-gen en_US.UTF-8
    sudo update-locale en_US.UTF-8
    
  • Done, the issue should be resolved.

Turning off all LEDs

To turn off Raspberry Pi 5 LEDs, do the following:

  • Edit /boot/firmware/config.txt file:
    sudo vi /boot/firmware/config.txt
    
  • Add the following at the end of the file (in the [all] section):
    # ADDED: Turn off all LEDs
    dtparam=pwr_led_trigger=default-on
    dtparam=pwr_led_activelow=off
    dtparam=act_led_trigger=none
    dtparam=act_led_activelow=off
    dtparam=eth_led0=4
    dtparam=eth_led1=4
    
  • Reboot:
    sudo reboot
    
  • Done, LEDs should now be turned off.

It’s not possible to turn off the M.2 HAT+ and SSD LEDs, so I covered them with electrical tape.

Enabling “cgroup”

If you want to install Kubernetes (in my case, K3S), you should enable cgroup. Do the following:

  • Edit /boot/firmware/cmdline.txt file:
    sudo vi /boot/firmware/cmdline.txt
    
  • Add the following to the end of the line:
    cgroup_memory=1 cgroup_enable=memory
    
  • Reboot:
    sudo reboot
    
  • Done, check that cgroup is enabled:
    cat /proc/cmdline
    ... group_memory=1 cgroup_enable=memory
    
    mount | grep cgroup
    cgroup2 on /sys/fs/cgroup type cgroup2 ...