Disable LEDs - aaronwmorris/indi-allsky GitHub Wiki

General

Create a script in /usr/local/bin

Raspberry Pi

/usr/local/bin/disable_leds.sh

sudo tee /usr/local/bin/disable_leds.sh <<EOF
#!/bin/bash

# New names
echo 0 > /sys/class/leds/ACT/brightness
echo 0 > /sys/class/leds/PWR/brightness

# Old names
echo 0 > /sys/class/leds/led1/brightness
echo 0 > /sys/class/leds/led0/brightness
EOF

Make script executable

sudo chmod 755 /usr/local/bin/disable_leds.sh

Add script to crontab

sudo tee /etc/cron.d/disable_leds <<EOF
@reboot root /usr/local/bin/disable_leds.sh >/dev/null 2>&1
EOF

Alternative

Add the following parameters to /boot/firmware/config.txt

Disable the PWR LED

dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=on

Disable the Activity LED

dtparam=act_led_trigger=none
dtparam=act_led_activelow=off

Disable ethernet port LEDs

dtparam=eth_led0=4
dtparam=eth_led1=4

Orange Pi

sudo tee /usr/local/bin/disable_leds.sh <<EOF
#!/bin/bash

echo 0 > /sys/class/leds/green\:status/brightness
echo 0 > /sys/class/leds/red\:power/brightness
EOF

AML-S905X-CC (Le Potato)

sudo tee /usr/local/bin/disable_leds.sh <<EOF
#!/bin/bash

echo 0 > /sys/class/leds/librecomputer\:blue/brightness
echo 0 > /sys/class/leds/librecomputer\:system-status/brightness
EOF

  • Note: The red power LED cannot be disabled in software.

RockPi

sudo tee /usr/local/bin/disable_leds.sh <<EOF
#!/bin/bash

echo 0 > /sys/class/leds/status/brightness
EOF

Note: The green power LED cannot be disabled in software.