I miss the RGB led of my X10 mini, and the charging LED notification
We can't override the LED color since it turned out that the LED is White and not RGB, but we can play with the triggers :
in /sys/class/leds/, we can find the following folders (that are symlinks):
For a start, let's play with /sys/class/leds/charging/:
Is that LED dimmable?
echo 255 /sys/class/leds/charging/brightness
- Using /sys/class/leds/charging/brightness this LED only takes two states: 0 and 255 (in fact 0 and != 0)
- Using /sys/class/leds/white/brightness the LED can be set to any value between 0 and 255 (but it is overridden if a notification comes and the value is set bat to 0...
What are the triggers available ?
catching values :
[none] bkl-trigger usb-online flash0_trigger torch_trigger mmc0 battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid bms-online
The ones we know the use :
- [none] (default, LED does nothing)
- blk-trigger (used by ./wled:backlight/trigger)
- usb-online (lights up when USB connected)
- flash0_trigger (used by ./led:flash_0/trigger)
- torch_trigger (used by ./led:flash_torch/trigger)
- mmc0 (I/O triggered, lights when mmc0 is in use)
- battery-charging-or-full (full time ON LED when charging or charged)
- battery-charging (full time ON LED when charging)
- battery-full (full time ON LED when charged)
- battery-charging-blink-full-solid (blinks until charged)
To get Blinking during charging :
echo battery-charging-blink-full-solid >/sys/class/leds/charging/trigger
making sure it worked:
none bkl-trigger usb-online flash0_trigger torch_trigger mmc0 battery-charging-or-full battery-charging battery-full [battery-charging-blink-full-solid] bms-online
Since */charging/brightness does not dimm LED, the LED stays at full power.
Some Strange behaviors :
- /sys/class/leds/charging/trigger → first LED, can be set to on/blinking while charging, although at full brightness.
- /sys/class/leds/white/trigger → second LED, can be dimmed, but the LED turns back off when a notification comes in.
For now, the best way is to set "first" LED (/sys/class/leds/charging/) for charging using dedicated trigger and keeping the "second" one to none (and used as notification LED as it is by default) and get both working together this way.
What we need is to find a way to dim the "first" LED
Got the idea to play with LED thanks to carock @XDA