How to disable Power LED

I am trying to disable the power LED on my Pi2. In openelec I was able to create a autostart.sh in the .config folder containing:

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

What would be the equivalent to disable the power LED in OSMC? Any help would be appreciated, thanks.

Did you try, if your solution works on osmc, too?

What folder would I put it in?

Ah. Just checked and there is /sys/class/led0/power/

There are some files but @sam_nazarko can answer which exact file you have to change I think.

Hi

you can disable the LEDs using this in config.txt :

Disable the ACT LED.

dtparam=act_led_trigger=none
dtparam=act_led_activelow=off

Disable the PWR LED.

dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

http://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi

1 Like

Would be great if this was an option in the Vero 2.

I guess @sam_nazarko is working on it based on this github entry

This solution only works for sd activity led (green one) on the Pi3.
The power led (red) remains always on…dosn’t work on the Pi3…

Any ideas?
Thanks

I created a python script and have a crontab turn the ACT and PWR LEDS turn off at night and on the morning.

Add this to your crontab adjust times however you like;

0 19 * * * python3 /home/osmc/scripts/write_brightness.py 0
0 07 * * * python3 /home/osmc/scripts/write_brightness.py 1

or if you want the LEDs off permanantly just run at the command line;

python3 /home/osmc/scripts/write_brightness.py 0

####### start script

#!/usr/bin/python3

import os
import sys
import argparse

arg1 = sys.argv[1]

def brightness(arg1):

	os.system("echo " + arg1 + "| sudo tee /sys/class/leds/led0/brightness")

	os.system("echo " + arg1 + "| sudo tee /sys/class/leds/led1/brightness")

if __name__ == "__main__":

	brightness(arg1)


###### end of script