Wednesday, July 8, 2015

Turning off the Leds on the Cubietruck

Since the Cubietruck (running Linaro) has replaced my home server and has its place in my living room I figured out that the Leds are very annoying! So I deceided to turn them off - all of them! The easiest way is to set the brightness to 0:

# echo 0 > /sys/devices/platform/leds-sunxi/leds/white\:ph11\:led3/brightness

# echo 0 > /sys/devices/platform/leds-sunxi/leds/blue\:ph21\:led1/brightness
# echo 0 > /sys/devices/platform/leds-sunxi/leds/green\:ph07\:led4/brightness
# echo 0 > /sys/devices/platform/leds-sunxi/leds/orange\:ph20\:led2/brightness

A much more comfortable way is to use find and put into a simple script:

# vi /usr/local/sbin/
find /sys/devices/platform/leds-sunxi/ -name "brightness" | sed s'/:/\\:/g' | while read l; do echo 0 > "$l"; done

Don't forget to make the script executable before executing it:

# chmod 755 /usr/local/sbin/
# /usr/local/sbin/

I've put the script into /etc/rc.local to make sure it gets executed during booting:

# vi /etc/rc.local

exit 0

When the scripts works then the Leds turn off after the Cubietruck has booted.

No comments:

Post a Comment