the onboard leds reset their function to default upon a reboot Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
adityakush
Posts: 9
Joined: Mon Nov 25, 2019 5:18 pm

the onboard leds reset their function to default upon a reboot

Post by adityakush »

Hi !
I have been using dietpi on orange pi zero for about 8 months now. Just yesterday, I installed a fresh image of armbian and then changed over to dietpi. I selected the green LED for showing CPU status and red one for MMC0 status which works fine. But as soon as I perform a reboot, both LEDs go to their default state. Is there a known workaround??
adityakush
Posts: 9
Joined: Mon Nov 25, 2019 5:18 pm

Re: the onboard leds reset their function to default upon a reboot

Post by adityakush »

For the time being, I added these lines to the postboot script. Works well.

Code: Select all

echo "cpu" | sudo tee /sys/class/leds/orangepi:green:pwr/trigger
echo "mmc0" | sudo tee /sys/class/leds/orangepi:red:status/trigger
User avatar
Joulinar
Posts: 2032
Joined: Sat Nov 16, 2019 12:49 am

Re: the onboard leds reset their function to default upon a reboot

Post by Joulinar »

Hi,

many thanks for sharing your solution. Unfortunately I'm not able to test/investigate as I don't have such a board at hand ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2279
Joined: Sat Nov 18, 2017 6:21 pm

Re: the onboard leds reset their function to default upon a reboot

Post by MichaIng »

Many thanks for your report. LED triggers should be applied via udev rules on early boot once those are recognised. Can you please do the following after a reboot with LEDs back to default:

Code: Select all

cat /etc/udev/rules.d/dietpi-led_control.rules
cat /sys/class/leds/led{0,1}/trigger
udevadm trigger -c add /sys/class/leds/led0
udevadm trigger -c add /sys/class/leds/led1
cat /sys/class/leds/led{0,1}/trigger
User avatar
Joulinar
Posts: 2032
Joined: Sat Nov 16, 2019 12:49 am

Re: the onboard leds reset their function to default upon a reboot

Post by Joulinar »

A fix will implemented with coming DietPi version v6.31

https://github.com/MichaIng/DietPi/issu ... -652509568
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply