I need to disable all LEDs on my Raspberry Pi 3s otherwise they interfere with the operation of my camera setup. I use Raspbian Jessie.

I can successfully use the following code:

echo 0 >/sys/class/leds/led0/brightness
echo 0 >/sys/class/leds/led1/brightness

Both LED go dark - I am happy. However, if I put these commands in rc.local or in a script called by rc.local, most of the times (but not always) one of those LEDs (in particular the red one) will not turn off. If I ssh into the Pi and repeat the command it will correctly turn off.

When the LED is not turned off, the brightness value contains 255:

# cat /sys/class/leds/led1/brightness

like if some other program sets it back up after rc.local is executed.

I have also tried to add:

echo none >/sys/class/leds/led0/trigger
echo none >/sys/class/leds/led1/trigger

But it did not have any effect.

What entity/program might interfere with LED brightness at boot time?

Also note: I have tried to add a 5 to 15 seconds delay to the execution in rc.local but the problem did not disappear, in fact I did not see any difference

  • 1
    Have you considered the low tech approach - piece of tape over the LEDs? Aug 1 '17 at 22:04
  • 2
    No. The units I have deployed are thousands of km away, installed in stainless steel boxes at the top of mountains - it's expensive to get physical access. There is a 100% software solution that works very well, I only have a problem applying it automatically at boot. Aug 2 '17 at 7:35
  • 1
    @SteveRobillard Disabling them should also mean power savings. Just a tiny amount, but savings nonetheless.
    – Aloha
    Aug 2 '17 at 8:02
  • True; I value the power savings in form of less heat generated by the system. Aug 2 '17 at 18:20

For the Raspberry Pi 2 you can add the following lines to /etc/rc.local:

sudo sh -c 'echo none > /sys/class/leds/led0/trigger'
sudo sh -c 'echo none > /sys/class/leds/led1/trigger'
sudo sh -c 'echo 0 > /sys/class/leds/led0/brightness'
sudo sh -c 'echo 0 > /sys/class/leds/led1/brightness'

Maybe it works for RPi3 too?

  • 2
    This worked for me too. An FYI though, the lights still come for roughly 30 seconds at boot. This is fine by me though.
    – Ben
    Mar 9 '18 at 15:15
  • Worked for me on the raspberry pi 3 model b. The light does stay on for a little bit at boot, but then goes off.
    – jippyjoe4
    Dec 31 '19 at 6:44

Add the following lines to /boot/config.txt:

# Disable Activity LED

# Disable Power LED

Then reboot your Pi and both LEDs should be off permanently. Just tried it myself.

My source: https://buyzero.de/blogs/news/raspberry-pi-strom-sparen-tipps-tricks

UPDATE: This doesn't seem to work for the Power LED on the latest Raspbian (Buster). The image I was using at the time was a much older version (Stretch or possibly even older). If you're using Buster, for the power LED you need to the commands from MosEisley's answer.

  • I found this somewhere else so I think you have a typo in dtparam=pwr_led=activelow=off, this should be dtparam=pwr_led_activelow=off (at least for me it works only in this Version (with the underscore instead of the equals sign)
    – atticus
    Jul 6 '20 at 21:27
  • 1
    @atticus thanks, I corrected it in the answer Jul 7 '20 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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