-
Notifications
You must be signed in to change notification settings - Fork 41
Disable LEDs
Aaron W Morris edited this page Jul 14, 2023
·
13 revisions
Create a script in /usr/local/bin
/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
Add the following parameters to /boot/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
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
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.
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.