View Single Post
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#39
we already have control over the 6 kbd LEDs.
See
sudo gainroot;
sleep 5; stop mce; echo "disabled" >/sys/class/i2c-adapter/i2c-2/2-0032/engine3_mode; j=10; while [ ${j} -gt 0 ]; do j=$(( j-1 )); for i in $(seq 1 6); do echo "100" >/sys/class/leds/lp5523:kb${i}/brightness; sleep 2; echo "0" >/sys/class/leds/lp5523:kb${i}/brightness; done; done; start mce
(except of sudo gainroot, it's ONE line! Slide open kbd and then lock the screen immediately - during the initial "sleep 5" - after firing the line in xterm)

To understand what's this stuff about engines, try this instead:
sudo gainroot;
sleep 5; stop mce; j=10; while [ ${j} -gt 0 ]; do j=$(( j-1 )); for i in $(seq 1 6); do echo "100" >/sys/class/leds/lp5523:kb${i}/brightness; sleep 2; echo "0" >/sys/class/leds/lp5523:kb${i}/brightness; done; done; start mce
It's just missing the disabling of engine3 which we can't control as long as mce is running, so the kbd-dimming program you correctly spotted in mce is running all the time and dimming the LED in a fraction of one second after this shellscript turned it on. Even worse: mce is loading this program and starting it all the time (actually with every event like keypress etc)
That's what I called "abuse of a smart engine for stupid dimming" and suggested to rather let mce do it once in software than program engine3 to do it. Thus we could use all 3 engines for true rainbow color effects in indicator LED.

/j
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N
 

The Following 5 Users Say Thank You to joerg_rw For This Useful Post: