I have an RPI 4 in my room. When I sleep the red light fills a big part of the room. I don't want to turn the pi off as I want 24/7 availability. Its ability to be quiet and always available is why I find it appealing to use.

I thought about ducktaping it, but I find hardware solutions to be brutal (+ I can always do it if I get too fed up with it).

Is there a script I can write to turn it off?


Should work by writing the appropriate value to /sys/class/leds/led1/trigger

To switch it off use none, e.g.:

sudo su
echo none > /sys/class/leds/led1/trigger
echo none | sudo tee /sys/class/leds/led1/trigger 

Use default-on to reverse it.

  • Thanks, this is exactly what I was looking for (and couldn't find via search engines, I'm still quite new to the Pi). May 6 '20 at 14:03
  • Clever! May I ask where you found the values (i.e. none and default-on) documented?
    – Seamus
    Jun 11 '21 at 5:59

There's a bunch of controls you can use in /boot/config.txt

    act_led_trigger         Choose which activity the LED tracks.
                            Use "heartbeat" for a nice load indicator.
                            (default "mmc")

    act_led_activelow       Set to "on" to invert the sense of the LED
                            (default "off")
                            N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led

    act_led_gpio            Set which GPIO to use for the activity LED
                            (in case you want to connect it to an external
                            (default "16" on a non-Plus board, "47" on a
                            Plus or Pi 2)
                            N.B. For Pi 3B, 3B+, 3A+ and 4B, use the act-led

                            As for act_led_*, but using the PWR LED.
                            Not available on Model A/B boards.


Name:   act-led
Info:   Pi 3B, 3B+, 3A+ and 4B use a GPIO expander to drive the LEDs which can
    only be accessed from the VPU. There is a special driver for this with a
    separate DT node, which has the unfortunate consequence of breaking the
    act_led_gpio and act_led_activelow dtparams.
    This overlay changes the GPIO controller back to the standard one and
    restores the dtparams.
Load:   dtoverlay=act-led,<param>=<val>
Params: activelow               Set to "on" to invert the sense of the LED
                            (default "off")

    gpio                    Set which GPIO to use for the activity LED
                            (in case you want to connect it to an external

For example my Zero has


so that the LED isn't a power LED, but works like a activity LED (on other RPis)

Take a look at /boot/overlays/README for details.

You probably want


to turn your RED LED off. I don't have a RPi4B, so I can't test that and confirm it does what you want. This does the same thing as @Dirk's answer but without needing a script run at boot time.

  • I've tried your answer, but it does not seem to work on my RPi 4B. I've tried from the command line (as you seem to suggest), and in /boot/config.txt using a dtparam line, and the dtoverlay as it suggests in /boot/overlays/README. It also seems that there is no dtoverlay for pwr-led as there is for act-led. It's fairly confusing in there - perhaps I've made a bodge of it?
    – Seamus
    Jun 12 '21 at 6:31

If you (like me) are using Ubuntu 20.04 server 64 bit, the file to edit is:


By adding the line:


In order to deactivate the LED permanently


I wanted to confirm and abbreviate Dougie's answer in that putting these lines in /boot/config.txt worked for me in accomplishing this goal:


Note that act_led_trigger/pwr_led_triger can be set to "none." There are various other options for these parameters, including "heartbeat." When you change this file, you will need to reboot the Pi in order to see the changes take effect; there might be a shortcut to avoid having to reboot that I'm not aware of.

  • Although it is derived from Dougie's answer, this is different enough to stand on it's own with a little editing.
    – goldilocks
    Sep 28 '21 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.