energy efficiency

Reducing Raspberry Pi 5's power consumption by 140x

Sorry to clickbait with that title... but it's actually true. I can help you improve power use by 140x—for power off power consumption, at least.

Dialog PMIC on Raspberry Pi 5

By default, the Raspberry Pi 5 (like the Pi 4 before it) leaves the SoC powered up (just in a shutdown state) when you shut down the Pi.

Because of this, a Pi 5 will still sit there consuming 1.2-1.6W when completely shut down, even without anything plugged in except power.

That's a lot—even compared to a modern desktop PC!

Why is this?

Apparently some HATs have trouble if the 3v3 power rail is off, but 5v is still active—which would be the case if you completely power off the SoC, but still have your 5V power supply plugged in.

Because of that, the Pi ships by default with the setting POWER_OFF_ON_HALT=0, and the Pi eats up precious watts all the time.

External display waking up? Disable notifications when your screen is off

Since a week or so ago, I noticed that even when my Mac's display was put to sleep, my external display would sometimes turn on and remain on for long periods of time if I had a calendar reminder or some other type of non-dismissible notification. It would even come on (and turn off shortly thereafter) for quick notifications.

This was highly annoying, especially when I'd come to my computer in the morning and realize the external monitor had been on displaying a notification all night!

Apparently macOS 10.12.2 includes a new feature called Enhanced notifications, and they can wake up internal or external displays to show notifications. Annoyingly, this new feature is enabled by default. To disable it, you need to go into the Notifications System Preference, and inside the 'Do Not Disturb' section, and check the "When the display is sleeping" option under "Do Not Disturb":

Figuring out why an external USB hard drive won't spin down on my Mac

I am using a 2011 Mac mini as a backup server for all the data I store on iCloud, and for the first few days while I was setting up the Mac, I noticed the 4 TB and 2 TB external USB drives I had plugged in would spin down after a few minutes, and I would have blissful silence as long as there wasn't an active operation on that Mac (which should be fairly rare; just hourly Time Machine backups and periodic SSD activity since the iCloud libraries are all on SSD).

However, after a few weeks, I noticed that at least one of the two hard drives runs continuously, 24x7. Something on the Mac mini must keep hitting the drive and preventing it from spinning down.

To see what was happening, I used sudo fs_usage | grep VOLUME (in my case, VOLUME is 4\ TB\ Utility) to monitor what processes were accessing the drive, and what files they were accessing. After a few minutes watching (and doing nothing else on the computer, to make sure I wasn't causing any extra filesystem seeks), there were a couple regular culprits:

Raspberry Pi Zero - Conserve power and reduce draw to 80mA

Update 2015-12-01: I bought a PowerJive USB power meter and re-tested everything, and came up with ~80 mA instead of the ~30 mA reported by the Charger Doctor that I was using prior. This seems to be more in line with the results others were measuring with much more expensive/accurate meters in the Raspberry Pi forums: Raspberry Pi Zero power consumption. I've updated the numbers in the post below to reflect this change. Seems the Pi Zero is only incrementally better than the A+—still excellent news, but not nearly as amazing as I originally thought :(

Update 2021-10-28: With the new Pi Zero 2 W, you can also disable some of the CPU cores to reduce power consumption for a heavily-utilized Pi if it doesn't need all the CPU cores running.

Controlling PWR and ACT LEDs on the Raspberry Pi

All Raspberry Pi models have a few built-in LEDs; the earlier models had PWR, ACT, and networking status LEDs all lined up on the board itself; for the B+ and model 2 B, the networking LEDs moved onto the network jack itself, leaving just two LEDs; PWR (a red LED) and ACT (a green LED).

Normally, whenever the Pi is powered on—except if the power supply dips below something like 4.5VDC—the red PWR LED remains lit no matter what. If you wanted to 'disable' the LED, you'd have to put a piece of tape or something else over the LED, or get out a soldering iron and modify the hardware a bit.

Raspberry Pi model 2 B, B+ and A+ (and beyond)

Luckily, with the Pi 2 model B, B+, A+, and Zero, you can control the LEDs in software, in a few different ways. The simplest way to change the way these LEDs work is to modify the trigger for each LED by setting it in /sys/class/leds/led[LED_ID]/trigger, where you replace [LED_ID] with 0 for the green ACT LED, and 1 for the red PWR LED.

For example:

Should I Sleep or Shut Down my Mac?

This topic is oft debated in many Mac forums, and does not really have a concrete answer; a lot depends on what you do with your Mac, and what Mac you use. Before deciding whether to shut down or sleep your Mac, you should know (a) what happens in each process, and (b) the pros and cons to both practices.

Sleeping

Many computer users (myself included) almost NEVER shut down their computers. There are many positive benefits to this (especially if you're a Mac user). When a Mac goes to sleep, almost every component inside the computer is turned off; what is not turned off is set in a 'low-power mode'. The contents of the RAM and Video RAM are saved, the network ports might still get a little power, and a few other subsystems stay on, but pretty much everything else is off.

How to Save 20 Watts while Running an iMac (or another Mac)

Something you don't think about every day, but something that could save you enough change to get a Big Gulp every now and then: You can take a few simple steps to drastically reduce the amount of power consumed by your computer. Especially when you're doing many things at the same time with multiple hard drives and the screen turned on at full brightness!

This article is written specifically for the 24" iMac (late 2008), but applies to pretty much any Mac that uses electricity (read: ALL of them). By following the steps in this article, you can save a bit of power, which translates into saving a small amount of change each month. And who wouldn't like a few extra nickels in this economy?

The Discovery

I recently purchased the APC Back-UPS NS 1250, and one of the most amazing features of the UPS is the ability to see how many watts are being actively consumed by a device plugged into it.

I found the results of my testing to be quite interesting. When I had the iMac running with the screen at full brightness, the computer was using the energy equivalence of an old 100 Watt tungsten (i.e. 'energy sucker') light bulb! I don't typically run the screen this bright, though, because the lighting in my computer room is typically subdued. So I turned the brightness down all the way (a comfortable level for my vision), and looked again. This time, the computer was using about 75 Watts. NICE!

iMac Power Chart (in Watts)
(Big bright chart for visual learners).