maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight (https://talk.maemo.org/showthread.php?t=83677)

kent_autistic 2012-04-16 11:10

[Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
There are times when I want to use the hwkb but often worried that it would use up battery power due to the backlight leds being lighted up for some time. So a status menu plugin to enable/disable it would be really helpful.

I want to pop out the hwkb and not have the backlight lit up, and when I need it to light up, I can easily enable it through the status-menu.

I hope it is possible. TIA! :)

joerg_rw 2012-04-16 12:14

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
the kbd backlight is controlled via mce process and lp5523 kernel driver in /sys/class/leds/lp5523:kb?/* and engine3.
Possible hooks are:
/etc/mce/mce.ini ([KeyPad] BacklightTimeout=30) problem: mce needs a restart to read in new values from mce.ini
/sys/class/leds/lp5523:kb?/led_current
/sys/class/leds/lp5523:kb?/brightness
/sys/class/i2c-adapter/i2c-2/2-0032/engine3_mode

see http://wiki.maemo.org/N900_Hardware_LED and http://wiki.maemo.org/LED_patterns#Low_Level for details.

Code:

for L in /sys/class/leds/lp5523:kb?; do echo 0 >$L/led_current; done
is accomplishing a shutdown of backlight. Alas mce will restore the default value 50 to all led_current nodes when kbd backlight gets re-enabled. This also might happen on random moments, I haven't done extensive tests.
Beware! Values >50 for led_current may instantly kill your LEDs!

Anyway I hope it helps you with some suggestions where to start.

/jOERG

[edit] ps.: please notice your kbd backlight will get turned off when ambient light is bright enough

kent_autistic 2012-04-16 12:16

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
thanks doc!

B-RUNO 2012-04-16 13:14

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
Hello to all I just have a question it would be possible just leave some of the keyboad lights on, for example; when we are using an emulator and we have the keyboard mapped just leave the mapped keys with lights on! do you guys think this possible??

Just an ideia.
Bruno

Estel 2012-04-16 13:43

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
MAG did a proof-of-concept program that turned certain diodes beneath keyboard on demand (there are 6 diodes total out there), so it's probably perfecdtly achievable.

Yet, You guys are overrating effect on battery life, generated by kb diodes - they're not like backlight of screen, so don't expect noticeable powersaving, even by disabling them totally.

OZr I just don't feel it using 3000 mAh battery, which seems to be much more effective way of extending runtime :p

/Estel

B-RUNO 2012-04-16 18:51

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
Quote:

Originally Posted by Estel (Post 1192777)
MAG did a proof-of-concept program that turned certain diodes beneath keyboard on demand (there are 6 diodes total out there), so it's probably perfecdtly achievable.

Yet, You guys are overrating effect on battery life, generated by kb diodes - they're not like backlight of screen, so don't expect noticeable powersaving, even by disabling them totally.

OZr I just don't feel it using 3000 mAh battery, which seems to be much more effective way of extending runtime :p

/Estel

Thanks Estel, I'm not bothered with the battery consumption, I'm just interested on this concept because some times it is hard to remember which key I assigned on the emulatos, on that way would look like a proper console remote!!!

Bruno

kent_autistic 2012-04-17 01:02

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
Quote:

Originally Posted by joerg_rw (Post 1192747)
[edit] ps.: please notice your kbd backlight will get turned off when ambient light is bright enough

thing is, i have ALS sensor disabled :)

joerg_rw 2012-04-17 18:22

Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight
 
with those 6 diodes you hardly can illuminate particular keys while keeping others dark.

For Mohammad's POC (actually iirc I posted him how to do it ;-D), you simply add a
Code:

sleep 1
to inside the for-loop of my code snippet above ;-)

regarding power consumption: 6 * 5mA * ~2V = ~60mW
screen backlight is using up to 15 times that, iirc and my math still works

/j


All times are GMT. The time now is 08:35.

vBulletin® Version 3.8.8