Unix & Linux Asked on October 2, 2020
I’m trying to set some triggers for the LEDs on an embedded board (Rock960). They work with heartbeat
and mmc1
(main drive) and none
of course, but I haven’t been able to get any of the cpu<i>
triggers to work.
Is there a way of checking if anything is actually sending a trigger? Even under full load (e.g. a make -j6
job, nothing lights up).
# Disk activity works as does rfkill1 (wifi)
echo mmc1 >/sys/class/leds/rock960:green:user0/trigger
# None of these seem to do anything
echo cpu0 >/sys/class/leds/rock960:green:user1/trigger
echo cpu1 >/sys/class/leds/rock960:green:user2/trigger
echo cpu2 >/sys/class/leds/rock960:green:user3/trigger
According to my config, I have the modules compiled in:
# LED Triggers
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
Available triggers:
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 mmc0 [mmc1] timer oneshot heartbeat backlight gpio cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 default-on rfkill0 mmc2 rfkill1 rfkill2
I believe the most appropriate trigger for that case would be the activity
, that aims at showing the CPU activity system-wise. Here is the description of it:
This allows LEDs to be controlled by an immediate CPU usage. The flash frequency and duty cycle varies from faint flashes to intense brightness depending on the instant CPU load
For that you need to enable it at the kernel: CONFIG_LEDS_TRIGGER_ACTIVITY=y
but most modern distributions have it by default.
from https://cateee.net/lkddb/web-lkddb/LEDS_TRIGGER_ACTIVITY.html
Answered by tronic on October 2, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP