/boot/overlays/README has this text:

    act_led_trigger         Choose which activity the LED tracks.
                            Use "heartbeat" for a nice load indicator.
                            (default "mmc")

But are there other options? If I wanted to create my own (e.g. led constantly on until shutdown), where would I start? Is it recompiling a kernel module, or recompiling the entire kernel?

up vote 4 down vote accepted

I have tried describing the values mentioned.

none                No trigger
kbd-scrolllock      Keyboard scroll lock
kbd-numlock         Keyboard num lock
kbd-capslock        Keyboard caps lock
kbd-kanalock        Keyboard kana lock
kbd-shiftlock       Keyboard shift
kbd-altgrlock       Keyboard altgr
kbd-ctrllock        Keyboard ctrl
kbd-altlock         Keyboard alt
kbd-shiftllock      Keyboard left shift
kbd-shiftrlock      Keyboard right shift
kbd-ctrlllock       Keyboard left ctrl
kbd-ctrlrlock       Keyboard right ctrl
timer               Flash at 1 second intervals
oneshot             Flash only once
heartbeat           Flash like a heartbeat (1-0-1-00000)
backlight           Always on
gpio                Flash when a certain GPIO is high???
cpu0                Flash on cpu0 usage
cpu1                Flash on cpu1 usage
cpu2                Flash on cpu2 usage
cpu3                Flash on cpu3 usage
default-on          Always on
[input]             Default state
panic               Flash on kernel panic
mmc0                Flash on mmc0 (primary SD Card interface) activity
mmc1                Flash on mmc1 (secondary SD Card interface) activity
rfkill0             Flash on wifi activity
rfkill1             Flash on bluetooth activity
  • Does default-on turn off after shutdown, or only when power is removed? – Lucas W Jul 14 '17 at 15:00
  • default-on turns on only when Raspberry Pi is powered on. When the Pi shuts down, it turns off. – Ameer Jul 15 '17 at 9:00

Try any of the values in cat /sys/devices/platform/leds/leds/led0/trigger

  • Any documentation for those? Many look like they are tied to keyboard keys, but the others aren't as obvious: none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu0 cpu1 cpu2 cpu3 default-on [input] panic mmc0 mmc1 rfkill0 rfkill1 – Lucas W Jul 12 '17 at 0:45
  • Documentation? This is the Pi we are talking about; the Foundation seems to be even worse at documentation than the average Linux programmer. You may find comments in the kernel source. – Milliways Jul 12 '17 at 0:48
  • It looks like the implementation of the triggers are generic to the linux kernel, and not the pi (though the particular triggers available for a given led are pi specific?)- so the details can be found elsewhere if not just in the source (linuxkernel.stackexchange anybody?). drivers/leds/trigger has the source to many of the non kbd triggers. – Lucas W Jul 12 '17 at 18:29

I've tried and it works:

In /boot/config.txt:

dtparam=pwr_led_trigger=heartbeat

Enjoy.

  • 1
    surely you meant dtparam=act_led_trigger=heartbeat - to answer a question about the act_led_trigger – Jaromanda X Aug 15 at 2:32

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.