[SOLVED] Red light in front of the Pi doesn't shine

Hi,

using a Raspberry Pi 4 Model B with the official Raspberry Pi USB-C power supply 5,1 V / 3,0 A, EU, the red light on front of my Pi only shines while booting or shutting down. But it doesn’t shine during operation (the lights on the back burn). This only happens using the image of Freedombox but not with other images (for example OpenMediaVault or NextCloudPi). Well, the problem is not so important. I only would like to discuss this because normally it’s an indication that the power supply is too weak. But as I wrote before I’ve got the dedicated one.

The Raspberry Pi 4 images are based on these Debian images. They have an FAQ in which they write:

Yes, they are off by default, but are very easy to turn on via the /sys pseudo-filesystem. So, if you want to turn on the red (power) LED, do as root echo 1 > /sys/class/leds/PWR/brightness (and echo 0 > /sys/class/leds/PWR/brightness to turn it off). Likewise, you can control the green (activity) LED using /sys/class/leds/ACT/brightness in the same way.

Besides simply turn the LEDs on or of, you can also let the LEDs correspond to events. What those events are may differ from model to model and possibly also differ per kernel version. On my RPi 3B+ with arm64 kernel version 5.10.9-1 I have these:

 # cat /sys/class/leds/PWR/trigger 
[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 disk-activity disk-read
disk-write ide-disk mtd nand-disk cpu cpu0 cpu1 cpu2 cpu3 panic usb-gadget usb-host mmc0 mmc1
rfkill-any rfkill-none usb-001:005:01:link usb-001:005:01:1Gbps usb-001:005:01:100Mbps
usb-001:005:01:10Mbps rfkill0 bluetooth-power hci0-power rfkill1


The ones for the `ACT` LED are the same (for me at least).
If you want the `PWR` LED off, but on when a kernel panic happens, do as root: `echo "panic" > /sys/class/leds/PWR/trigger`.
The active trigger is shown with `[]` around it.
1 Like

sudo echo 1 > /sys/class/leds/led1/brightness’

-bash: /sys/class/leds/PWR/brightness: Permission denied

su
Password:
su: Authentication failure

sudo su works. Found it here: Becoming Super User. Problem solved. Thanks!

1 Like

Problem: After next reboot the red light will be off again. Solution:

  1. Login via ssh
  2. sudo su + password
  3. echo 1 > /sys/class/leds/PWR/brightness
  4. crontab -e
    System offers a new file if an existing one isn’t available.
  5. Choose for example “nano” editor.
  6. Write into: @reboot echo 1 > /sys/class/leds/PWR/brightness
  7. Save file via Strg + “o”
  8. Strg + “x” for exit
  9. sudo reboot.

After reboot the red light goes off for a moment but then on again.
freedombox_nano_red_light

2 Likes