Anyone know how to turn of Power LED on Pi3B+?

I tried to follow the instructions here
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=220362

sudo sh -c 'echo 0 > /sys/class/leds/led1/brightness'
sudo sh -c 'echo none > /sys/class/leds/led1/trigger'

This doesn’t work. Something just writes the old values back into this file when I try. There must be a way to adjust the brightness. Why have the file if it can’t be adjusted?

I edit the file and change brightness to 0 and it just change back to 255 after I save.

Does anyone have a Pi3B+ and was able to disable the power LED?

I also have a RaspBee hat installed which has a RED LED that is super bright that I want to disable but I don’t think that one can be.

I might just have to switch to a solid case, can anyone suggest a good Pi3b+ case which has room for a HAT?

I was able to ssh into my pi3b+ and get this to work.

sudo bash
echo none > /sys/class/leds/led1/trigger
echo default-on > /sys/class/leds/led1/trigger

Weird, I wonder what could be making mine not work?
Are you running on hassbian ? I am
What version? 4.14 kernel (stretch lite)

pi@hassnuna:~$ uname -a
Linux hassnuna 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

pi@hassnuna:~$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

If you cat /sys/class/leds/led1/trigger after does it have the value you changed it to.
Mine doesn’t.

pi@hassnuna:~$ sudo bash
root@hassnuna:/home/pi# echo none > /sys/class/leds/led1/trigger
root@hassnuna:/home/pi# cat /sys/class/leds/led1/trigger
[none] rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic mmc1 mmc0 rfkill-any rfkill0 

My test was an interactive login, so it could be the translation to a single line command.

kernel version 4.14.73-v7
cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=raspbian
ID_LIKE=debian

Actually I not realize the value is sort of working. The system seems to take the value you change to and just select it in a list. Seen here

pi@hassnuna:~$ sudo bash
root@hassnuna:/home/pi# echo none > /sys/class/leds/led1/trigger
root@hassnuna:/home/pi# cat /sys/class/leds/led1/trigger
[none] rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic mmc1 mmc0 rfkill-any rfkill0 
root@hassnuna:/home/pi# echo default-on > /sys/class/leds/led1/trigger
root@hassnuna:/home/pi# cat /sys/class/leds/led1/trigger
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 [default-on] input panic mmc1 mmc0 rfkill-any rfkill0 

Notice how [none] is selected in first change and [default-on] is selected in second change.

However my bright RED LED stays on.

I am away from the pi right now so need to wait till I get home to test some more. I just tested and my script works same as command line interactive. It’s just not changing the LED on the device. I might have messed it up playing with other commands I tried which were setting gpio settings and I don’t know how to set them back.

Odd. Mine is staying put. Maybe it is something in hassbian vs raspbian. I also do a periodic rpi-update to make sure the firmware is current.

This particular pi is for my pi-hole server. I have HA running on hass.io/HassOS.

I never thought about firmware. That’s interesting. Never tried that. That could reset any changes I may have made by mistake.
Hassbian is just scripts on top of raspbian so I don’t think it is the cause. Maybe but not my top suspect.

Just tried rpi-update but still LED’s will not turn off. I must have a faulty board.

I’m running a newer kernel version ( 4.14.73 vs 4.14.34). You might running sudo apt upgrade.

1 Like

I just can’t get the LED to turn off.

My HA build has a RaspBee and an external SSD so I took it apart removed all devices including zwave stick, installed raspbian on a new SD card, upgraded raspbian kernel. (note: it won’t upgrade past 4.14.71 for some reason.)

Still the LED will not turn off.

I think I may have an early pi3b+ board which had issues with the RED led.
I swear I had this working but perhaps I never did.
I originally followed this thread
https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=208381
which led me here https://github.com/raspberrypi/linux/issues/1332#issuecomment-280087412 and I ran the command
./rpi3-gpiovirtbuf s 135 0
I was starting to worry this broke something but looking at the code I found you can use the g command to get the value of the gpio. So I connected to another pi3+ I own and did a get on 135 to discover it was set to 0 already. So I didn’t really do anything with this command.

So I have no clue why this board refuses to let me shut down the power LED.

The really annoying part is the LED doesn’t turn off even when I shutdown. So I don’t know when the device has finished shutting down. That part bothers me because I want to do safe shutdowns but I have to wait extra long to be sure it has finished.
EDIT: Just realized this point is kinda stupid. If I could get the leds to turn off I also wouldn’t know when the unit was shut down. So scratch that last thought :blush:

I decided to just leave them on and I will try to find a way to cover the unit so I can’t see the lights.

@dap35 BTW: Thanks for all your effort on this thread. I really appreciate your trying the commands on your device!

No Problem. Sorry it didn’t work out.

A bit of paint or dark nail varnish might fix the led :wink: