Dietpi: LED control revert back to original after reboot

Created on 30 Jun 2020  路  11Comments  路  Source: MichaIng/DietPi

Creating a bug report/issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=6 G_DIETPI_VERSION_SUB=30 G_DIETPI_VERSION_RC=0 G_GITBRANCH='master' G_GITOWNER='MichaIng'
  • Distro version | buster
  • Kernel version | Linux Pi4 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
  • SBC model | RPi 4 Model B (armv7l)
  • Power supply used | original stronger one
  • SDcard used | USB SSD Verbatim store 'n' go portable 120GB

Additional Information (if applicable)

  • Can this issue be replicated on a fresh installation of DietPi? I think yes with USB boot.

    Steps to reproduce

  1. Clean install, change both LED for different behavior, I like green heartbeat and red panic, but after reboot it鈥檚 get back to default. Change again, works, after reboot default.

Expected behaviour


-it will stay the same after reboot. Before with SD card it鈥檚 working. When I switch back SD card where I have same system it鈥檚 working. Manually set it after reboot it鈥檚 change immediately, but after reboot jump back to default.

Actual behaviour

  • jump back to default settings

Extra details

  • maybe some problem with USB boot?
Bug Solution available

All 11 comments

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:

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

Here is all you want. Hope it help to you. And many thanks for your time!
I search only here on GitHub, so next time I鈥檒l try forum as well!


root@Pi4:~# cat /etc/udev/rules.d/dietpi-led_control.rules
cat: /etc/udev/rules.d/dietpi-led_control.rules: No such file or directory

root@Pi4:~# cat /sys/class/leds/led{0,1}/trigger
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic [mmc0] 
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 [default-on] input panic mmc0 

root@Pi4:~# udevadm trigger -c add /sys/class/leds/led0

root@Pi4:~# udevadm trigger -c add /sys/class/leds/led1

root@Pi4:~# cat /sys/class/leds/led{0,1}/trigger
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic [mmc0] 
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 [default-on] input panic mmc0

root@Pi4:~# cat /etc/udev/rules.d/dietpi-led_control.rules
cat: /etc/udev/rules.d/dietpi-led_control.rules: No such file or directory

That is strange, the script should create this file. Can you please run dietpi-led_control, select your desired LED triggers, exit and paste the result of what has been printed to console, especially if there is any error message?

@FrostyMisa
It's fine to use GitHub. no problem on this. Basically both channels are worked on. 馃槈

Yes, no problem. But I often change LED with launcher - config - display - LED.

Here is what I see behind when I scroll up:


root@Pi4:~# dietpi-launcher
[ INFO ] DietPi-LED_Control | Applying trigger panic to LED led1
[FAILED] DietPi-LED_Control | /etc/udev/rules.d/dietpi-led_control.rules
[ INFO ] DietPi-LED_Control | Applying trigger heartbeat to LED led0
[FAILED] DietPi-LED_Control | /etc/udev/rules.d/dietpi-led_control.rules

And cat give me same answer:


cat: /etc/udev/rules.d/dietpi-led_control.rules: No such file or directory

And I don鈥檛 want to open another ticket with same hardware and system settings, but before I think I saw what memory split is set, now I can鈥檛 see it but I think it鈥檚 working, because I set 320 for Kodi and I think default is 16 and with this Kodi won鈥檛 run.
Here is picture what I see:
image

Thank you very much for help! Looking forward for Dietpi 6.31 and any other future version, I love your work! Best is backup, because I can experiment with everything and if something get broken, I can restore and try again! No longer copy whole SD card.
Thanks again for help!
Do I have to open new issue for the ram split problem?

Ah good second find. We check that current memory split with a method that does not work anymore on a >1GiB RAM model: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-config#L2045
I'll fix it for RPi4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pgferr picture pgferr  路  3Comments

Fourdee picture Fourdee  路  3Comments

Fourdee picture Fourdee  路  3Comments

mok-liee picture mok-liee  路  3Comments

bhaveshgohel picture bhaveshgohel  路  3Comments