🔆 Turn off the LEDs on a Raspberry Pi
Here is a way to disable the power, activity and ethernet LEDs on a Raspberry Pi with just a few additional lines in the /boot/config.txt
file.
The config.txt
file can be ether edited via another computer by inserting the SD card, or directly on the Pi via SSH.
When using another computer there should appear a device called boot
which contains the config.txt
file.
When editing directly on the Pi, log in via SSH and executing sudo vim /boot/config.txt
(vim can be replaced by any other text editor like nano
).
Then add the following lines in the correct section of your Pi. For example when using a Pi 4 add the lines under the [pi4]
section in the config file. If there is no such section you can just add it by inserting the model identifier in a new line before the parameters. The model identifiers for your device can be found here: https://www.raspberrypi.com/documentation/computers/config_txt.html#model-filters
# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
# 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
After a reboot no more LEDs should be active. If you only want to disable the LEDs partially, just copy the config lines you need :)