RPI - All lights off

I just thought it would be nice to share with you
how to get a lighthouse tower like the RPI to pretend being dead.

Unfortunately even the most current RPI operating systems 
doesn't offer such a trivial and nice tweak via user interface. 

That leaves us only one option: Commandline intervention!
 





Introduction



First of all watching at colored, sometimes neutron star like white and on top flashing 
LEDs in a dark or candle lit listening room while enjoying your favorite tracks on a Saturday 
night is not what I'd call a Feng-Shui compliant setting.

Beside that anything that is not contributing anything to the way a system is being
operated I'd consider superfluous anyhow

And putting our green hat on. Active LEDs are drawing power.  Why wasting energy and 
adding load the rails!?!?


Bottom line: There's no  way to skip this tweak.

The RPI comes with 4 LEDs. 

On the main board you find the PWR and ACT leds.
One the ethernet port you find Speed and ACT leds.

Since RPI 3, all 3 LEDs can be disabled. This has to be done
via editing the RPI BIOS (config.txt).

Let's go for it.

Configuration

You need to know how to ssh login to your RPI. And then you need 
admin "root" rights.

The tweak will be persistent until you restore your default settings.

I'll show you how to accomplish the tweak.  It's actually quite simple. 
By now it can be assumed you know how to login to the RPI via ssh.

Note: 
Pretty much all types of RPI require a different setup to get the LEDs turned off!

I'll concentrate on RPI 4 and 3B+. Make sure the devices run with latest 
kernels and firmware.


Here's what you have to do on e.g. a piCorePlayer installation.
Most commands, marked in blue,  
you can simply copy/paste.

##########################################################

###Login via ssh first

ssh tc@xxx.xxx.xxx.x

Password: piCore

###Become root

sudo su


###Mount the boot partition

mount /dev/mmcblk0p1 /mnt/mmcblk0p1


###Backup the original config file 

cd /mnt/mmcblk0p1
test -f config.txt.orig || cp config.txt config.txt.orig

###now we append the config lines
###copy/paste the entire block below into the terminal
################################################################
cat >/mnt/mmcblk0p1/config.txt <<EOF

###turn off onboard LEDs
dtoverlay=act-led

#disable the ACT LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off  

##disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

##turn off ethernet port LEDs
dtparam=eth_led0=4
dtparam=eth_led1=4
EOF
###############################################################

Now you can have a look at config.txt to see if above block/lines shows up in the file.

cat /mnt/mmcblk0p1/config.txt

Looks good? Great!

Now we write the data to disc and reboot the RPi.


sync; reboot


Done.

Wrap-Up


And that'll be it.

Don't forget to make a backup.


Enjoy the darkness.




1 comment: