Content:
If you have a Raspberry Pi in regular/constant use, you’re likely to have encountered the minor annoyance that is the brightness of the onboard LEDs. This is particularly true if using the Pi without a case, and have the Pi situated in a public area.
The LEDs can not only be a source of distraction, but also increase the power draw of the device. While disabling them will make very little difference to your wallet (even with the current sky-high energy prices), the lower power draw will make a noticeable difference to battery powered projects.
All of the changes below need to be made in the /boot/config.txt
file, assuming you’re using Raspberry Pi OS. This may differ slightly for other OS’s – for Ubuntu, for example, the file to use is /boot/usercfg.txt
.
Check your distribution’s documentation if you’re unsure which file to edit.
Power LED
To disable the power LED, add the following lines to your config file.
dtparam=pwr_led_activelow=off
This changes the behaviour of the LED from active-low, to active-high. This essentially inverts the behaviour of the LED.
The Older Way
The behaviour of the power LED in response to dtparam
settings changed with an update to the Raspberry Pi kernel. The change, introduced in August 2022, fixed a bug in the Pi’s handling of the GPIO line used to control the LED. There’s a great explanation of the bug over on GitHub should you be interested.
Fixing this issue breaks the configuration previously used to turn off the power LED.
If you have the following line(s) in your file, you’ll need to remove them.
dtoverlay=pwr-led
dtparam=pwr_led_trigger=none
pwr_led_trigger
defaults to default-on
, which is required now the Pi’s handling has been fixed.
Note that the old method should still work for Pi’s older than the Pi 4, but is not recommended. The method outlined above should be used instead.
Activity LED
Disabling the activity LED is similar to disabling the power LED.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
In this case, though, the led_trigger needs to be set to ‘none’. The Pi’s firmware sets the LED to respond to storage writes (mmc) – this needs to be overridden to keep the LED in a single (disabled) state.
Ethernet LEDs
If you use ethernet, you might also want to disable the LEDs on the ethernet jack. The parameters to add are slightly different, depending on whether you’re using a Pi 3B+ or a Pi 4.
Pi 4
To disable the ethernet LEDs on the Pi 4, add the following:
dtparam=eth_led0=4
dtparam=eth_led1=4
On the Pi 4, LED0 refers to the green LED, and LED1 is the amber LED. The available mode values are as follows:
Mode Number | Description |
---|---|
0 | Speed/Activity |
1 | Speed |
2 | Flash activity |
3 | FDX |
4 | Off |
5 | On |
6 | Alt |
7 | Speed/Flash |
8 | Link |
9 | Activity |
The default values are ‘0’ for LED0, and ‘8’ for LED1. Setting each LED to ‘4’ will turn them off.
Pi 3B+
To disable the ethernet LEDs on the Pi 3B+, add the following:
dtparam=eth_led0=14
dtparam=eth_led1=14
On the Pi 4, LED0 refers to the amber LED, and LED1 is the green LED. The available mode values are as follows:
Mode Number | Description |
---|---|
0 | link/activity |
1 | link1000/activity |
2 | link100/activity |
3 | link10/activity |
4 | link100/1000/activity |
5 | link10/1000/activity |
6 | link10/100/activity |
14 | off |
15 | on |