While looking for something else, I found a reference to the
/boot/overlays/README file, wherein it is written:
act_led_trigger Choose which activity the LED tracks. Use "heartbeat" for a nice load indicator. (default "mmc") act_led_activelow Set to "on" to invert the sense of the LED (default "off") act_led_gpio Set which GPIO to use for the activity LED (in case you want to connect it to an external device) (default "16" on a non-Plus board, "47" on a Plus or Pi 2) ... snippage ... pwr_led_trigger pwr_led_activelow pwr_led_gpio As for act_led_*, but using the PWR LED. Not available on Model A/B boards.
Although the power LED isn’t (easily) visible through the Canakit cases I’m using (it’s under the barely visible hole in front of the small hole near the hacked RUN connector), turning it into a heartbeat pulse distinguishes the CPU’s “running” and “halted” states; whether it will also distinguish “crashed” is up for grabs.
It’s not at all clear what other choices you have.
To enable heartbeating, add this to
# turn power LED into heartbeat dtparam=pwr_led_trigger=heartbeat #
I expected a simple 50% duty cycle heartbeat, but it’s an annoying double blink: long off / on / off / on / long off. Fortunately, it still isn’t (easily) visible …
While you have that file open, reduce the GPU memory to the absolute minimum for headless operation:
# minimal GPU memory for headless operation gpu_mem=16 #
Some further ideas, including a way to turn off the HDMI interface.
2 thoughts on “Raspberry Pi Power Heartbeat LED”
If you want a heartbeat with a 50% duty cycle, try dtparam=act_led_trigger=timer
Now that I know what to look for, it turns out that you can list all the options:
none [mmc0] timer oneshot heartbeat backlight gpio cpu0 cpu1 cpu2 cpu3 default-on input rfkill0 phy0rx phy0tx phy0assoc phy0radio
none mmc0 [timer] oneshot heartbeat backlight gpio cpu0 cpu1 cpu2 cpu3 default-on input rfkill0 phy0rx phy0tx phy0assoc phy0radio
phy0txoptions show network activity.
Getting enough privilege to change settings on the fly requires:
echo timer | sudo tee /sys/class/leds/led1/trigger
Works great: thanks!
Comments are closed.