Skip to content

Instantly share code, notes, and snippets.

@waywardone
Last active November 4, 2019 04:51
Show Gist options
  • Save waywardone/81bf9ca671d3f45d22b9e245fff54d46 to your computer and use it in GitHub Desktop.
Save waywardone/81bf9ca671d3f45d22b9e245fff54d46 to your computer and use it in GitHub Desktop.

Turn off onboard LEDs on Raspberry Pi

Add the following to /etc/rc.local. This has been verified as working on a Raspberry Pi 3 with the caveat that on power up and reboot, the LEDs are on briefly before being disabled.

for led in /sys/class/leds/*
do
  printf "Disabling LED: $led\n"
  sudo sh -c "echo 0 > $led/brightness"
  sudo sh -c "echo none > $led/trigger"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment