How to reduce power consumption on Raspberry Pi 4

This post describes some configurations I did to reduce the power (energy) consumption of my Raspberry Pi.

For more articles about Raspberry Pi check: Raspberry Pi

Setup

I'm running three Raspberry Pi 4 (4 GB) 24/7 which are hosting various stuff like my git, jenkins and also some applications and databases.

They all are build from the same custom image which basically is based on Raspberry Pi OS 64 bit lite. I'm just login via ssh for maintenance reasons, network connection is established via LAN. Therefore a lot of components can be disabled.

Raspberry Pi in mini-rack

First of all I decided to not use active cooling (although the layer case provides them by default), just the passive heatsinks . I can deal with the fact that the pi throttles the cpu when it gets too hot.

I do not use any monitor,sound or usb devices and also no wifi or bluetooth. So i can disable all the necessary components.

Disable sound, wifi and bluetooth

In the config file /boot/config.txt some components can directly be disabled on startup. Run

sudo nano /boot/config.txt

First change the following line to

dtparam=audio=off

which will disable the sound module. Add the following lines to the file to disable wifi and bluetooth:

dtoverlay=disable-wifi
dtoverlay=disable-bt

Disable LEDs

Additionally I disabled the LEDs on the board with the following lines.

dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off

Please note that the pi needs a reboot to make the changes effective.

Disable Display output

To disable display output the following command is used

vcgencmd display_power 0

you can enable it again with command

vcgencmd display_power 1

Disable USB ports

At the end we can disable the usb ports. This is a little bit more complex because an additional tool is needed which is called uhubctl. It can power off also specific ports but in my case I completely power off usb.

Before installation we should make sure that the latest firmware is installed.

sudo rpi-eeprom-update

should give

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138a1
    LATEST: 000138a1

(to run an update execute sudo rpi-eeprom-update -d -a)

As I'm writing this post the version (2.3.X) which can be installed via apt is not capable to deal with the pi usb controller so I have installed it on my own (2.4.X). The steps to do so can be found on the github page of the project.

Afterwards both usb hubs have to be disabled separately:

sudo uhubctl -e -l 1 -a 0
sudo uhubctl -e -l 2 -a 0

The following command should give now

sudo uhubctl
Current status for hub 2 [1d6b:0003 Linux 5.15.32-v8+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports, ppps]
  Port 1: 0080 off
  Port 2: 0080 off
  Port 3: 0080 off
  Port 4: 0080 off
Current status for hub 1 [1d6b:0002 Linux 5.15.32-v8+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports, ppps]
  Port 1: 0000 off

If I get to know more ways to reduce power consumption this post will be updated.

2 Comments

Marty

I’m on a Raspberry Pi 2 Model B. Might you know which of the described power reduction options for the RPi 4 are usable on the RPi 2? Or where I could look up the available options for the RPi 2? (When I look on its PCB is see a BCM2836R1FB6 chip).

Reply
Benni

1. I guess wifi and bt are not built into the Pi2 so no need to disable
2. If you are using ethernet you should be careful with disabling the usb hubs as ethernet runs over usb on Pi2 and Pi3
3. I would expect that you can also disable some components in the /boot/config.txt like shown in the post. LEDs should maybe work like described, sound maybe also, but I have never used a Pi2 so no guarantee 😉

Leave a Reply

Your email address will not be published. Required fields are marked *