From be72c271ac0cd5c22de7a22f067cc99f05c3b447 Mon Sep 17 00:00:00 2001 From: Radar231 Date: Mon, 21 Nov 2022 22:49:00 -0500 Subject: [PATCH] initial checkin --- README.md | 12 ++++++++++++ rpi-led-act.service | 15 +++++++++++++++ rpi-led-pwr.service | 15 +++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 README.md create mode 100644 rpi-led-act.service create mode 100644 rpi-led-pwr.service diff --git a/README.md b/README.md new file mode 100644 index 0000000..0cdcd4c --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# rpi-led control files + +## Introduction + +A recent change to Debian on RPI4 seems to have affected the PWR and ACT LEDs. These files re-enable the LEDs. + +These files should be copied to /etc/systemd/system, and then activated as per commands in comments. + +## Links + +* https://wiki.debian.org/ThomasChung/RPI4#Control_Power_LED_for_RPI4 + diff --git a/rpi-led-act.service b/rpi-led-act.service new file mode 100644 index 0000000..b909eaf --- /dev/null +++ b/rpi-led-act.service @@ -0,0 +1,15 @@ +[Unit] +Description=Control Raspberry Pi ACT (activity) LED + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=sh -c "echo 1 > /sys/class/leds/ACT/brightness" +ExecStop=sh -c "echo 0 > /sys/class/leds/ACT/brightness" + +[Install] +WantedBy=multi-user.target + +# systemctl daemon-reload +# systemctl enable rpi-led-act.service +# systemctl start rpi-led-act.service diff --git a/rpi-led-pwr.service b/rpi-led-pwr.service new file mode 100644 index 0000000..d2da5bc --- /dev/null +++ b/rpi-led-pwr.service @@ -0,0 +1,15 @@ +[Unit] +Description=Control Raspberry Pi PWR (power) LED + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=sh -c "echo 1 > /sys/class/leds/PWR/brightness" +ExecStop=sh -c "echo 0 > /sys/class/leds/PWR/brightness" + +[Install] +WantedBy=multi-user.target + +# systemctl daemon-reload +# systemctl enable rpi-led-pwr.service +# systemctl start rpi-led-pwr.service