Raspberry Pi

Tips and Tricks to Optimize the Power Consumption of a Raspberry Pi

The Raspberry Pi is a low-cost computing device used to perform DIY projects efficiently. Besides providing some useful features like home automation, and a personal web server, the device has a disadvantage in that it gets heated up if used for a longer time and as a result, its performance degrades. There are several reasons for this, but excess power consumption is one of the main reasons that directly impact your device’s performance. Further, it also reduces your device usage in case you are powering your device through a power bank or UPS.

If you are looking to optimize your Raspberry Pi device performance, you should read this article, where you will find some tips and tricks to optimize the power consumption of your Raspberry Pi device.

Tips and Tricks to Optimize the Power Consumption of a Raspberry Pi

If your Raspberry Pi device is running slow due to excess power consumption, you are using a power bank or UPS for supplying power to your device, then follow the below guidelines to optimize the power consumption and perform your tasks at a quick pace.

1: Disable the USB Controller Option

If you are using your Raspberry Pi device remotely from your PC or laptop, you must disable the USB controller option on your device as this will optimize its power consumption. The reason is that the USB controller option remains powered even if you are not using the mouse and keyboard on your Raspberry Pi device. So, to disable this option, open your Raspberry Pi terminal and issue the below-given command:

$ echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/unbind

If in case you want to enable the USB controller option again, you can do so by executing the following command:

$ echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/bind

2: Turn off HDMI Output

Again, if you are using your Raspberry Pi remotely, then there is no use in utilizing the HDMI output option; in that case, you must power off your HDMI output to save the power consumption of your Raspberry Pi device.

To disable the HDMI output option, you can use the following command:

$ vcgencmd display_power 0

The above command will turn off the HDMI output and you confirm by looking at your Raspberry Pi monitor screen.

To turn it on again, you can execute the following command:

$ vcgencmd display_power 1

3: Disable Bluetooth Option

The Bluetooth service is already running on your Raspberry Pi device, so disabling them can optimize the power consumption of your Raspberry Pi device. To disable the Bluetooth option, open the boot configuration file by executing the below-mentioned command:

$ sudo nano /boot/config.txt

Add the following line in the configuration file at any place:

dtoverlay=disable-bt

Save the file using the “CTRL_X” key and to apply the changes, you must reboot your Raspberry Pi device.

In case, if you are using an Ethernet cable for internet connectivity, you can also disable the WIFI option using the same process as for Bluetooth as you have to add the following line inside the file:

dtoverlay=disable-wifi

4: Disable Onboard LEDs

You can also disable the on-board power and activity LEDs on your Raspberry Pi to save the power consumption. You can do this by opening the configuration file using the following command:

$ sudo nano /boot/config.txt

Paste the following lines at any place in the file:

# Power off Activity LED            
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off

#Turn off Power LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

After adding the lines, save the file using “CTRL+X” keys and then use the “reboot” command to restart your device. After the restart, the onboard LEDs will be turned off.

5: Throttle CPU

CPU throttling on Raspberry Pi is extremely helpful for users who want to optimize the power consumption of their Raspberry Pi, especially when they are powering their devices from a power bank. In this technology, the CPU processor limits the power consumption to save your battery and keep your device from overheating.

To do this method, open the boot configuration file using the following command:

$ sudo nano /boot/config.txt

And adds the following lines inside the boot configuration file:

arm_freq_min=200
core_freq_min=100
sdram_freq_min=50
over_voltage_min=0

Save the file and perform reboot to apply the changes. You can adjust these parameters on your own and see whether this optimizes the power consumption of your device.

Conclusion

Optimizing the power consumption of Raspberry Pi is important as this helps to increase your Raspberry Pi device’s performance. There are several ways through which you can optimize the power consumption of your Raspberry Pi device, which are discussed in the above guidelines. You must follow all the tips mentioned above as they will help you run your Raspberry Pi device up for a longer time, even if you are using a power bank to power up the device.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.