How to Disable Lights on Raspberry Pi.
Under normal conditions the Red LED is on permanently. This can be a problem if the Raspberry Pi is located in a Bedroom.
Recently had the need to disable the bright LED on Raspberry Pi running in the bedroom. Rather then physically covering it up with black tape. An alternative solution is to disable the trigger in a file.
This was tested on the Raspberry Pi 4B Hardware running Raspbian, Raspberry Pi OS or even Ubuntu 20.10.
/sys/class/leds/led1 = Red Light
/sys/class/leds/led0 = Green Light
Disable the Red LED Temporarily
echo 0 >/sys/class/leds/led0/brightness #Turn off Green LED
echo 0 >/sys/class/leds/led1/brightness #Turn off Red LED
echo none > /sys/class/leds/led1/trigger
The Red light will instantly turn off. However upon a reboot it will be back.
Disable the Red Light Permanently
sudo su
crontab -e
#@reboot echo none > /sys/class/leds/led1/trigger
@reboot echo 0 >/sys/class/leds/led0/brightness #Turn off Green LED
@reboot echo 0 >/sys/class/leds/led1/brightness #Turn off Red LED
The above will re disable the Red & Green LED after every reboot.
Related
- Raspberry Pi Links
- Wireless Access Point Raspberry Pi Zero W
- Raspberry Pi Problems and Fixes
- Auto Update Raspberry Pi Using a Script and Cron
- Enable Two Factor Authentication on Raspberry Pi
- VNC Access to Raspberry Pi from Ubuntu
Links
- https://www.raspberrypi.org/