Go Back   maemo.org - Talk > Software > Applications
 
Register FAQ Community Calendar Today's Posts Search

Notices

Reply
 
Thread Tools
  #1  
Old 2012-04-16, 11:10
kent_autistic kent_autistic is offline
 
Join Date: May 2010
Location: Manila
Posts: 304
Thanks!: 1,721
Thanked 235 Times in 76 Posts
Default [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!
Reply With Quote
The Following 2 Users Say Thank You to kent_autistic For This Useful Post:
  #2  
Old 2012-04-16, 12:14
joerg_rw's Avatar
joerg_rw joerg_rw is offline
 
Join Date: Mar 2010
Location: SOL 3
Posts: 2,222
Thanks!: 3,399
Thanked 12,651 Times in 1,970 Posts
Default 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
__________________
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

Last edited by joerg_rw; 2012-04-16 at 13:01.
Reply With Quote
The Following 4 Users Say Thank You to joerg_rw For This Useful Post:
  #3  
Old 2012-04-16, 12:16
kent_autistic kent_autistic is offline
 
Join Date: May 2010
Location: Manila
Posts: 304
Thanks!: 1,721
Thanked 235 Times in 76 Posts
Default Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight

thanks doc!
Reply With Quote
  #4  
Old 2012-04-16, 13:14
B-RUNO's Avatar
B-RUNO B-RUNO is offline
 
Join Date: Sep 2010
Posts: 124
Thanks!: 39
Thanked 125 Times in 48 Posts
Default 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
Reply With Quote
The Following User Says Thank You to B-RUNO For This Useful Post:
  #5  
Old 2012-04-16, 13:43
Estel's Avatar
Estel Estel is offline
 
Join Date: Mar 2011
Posts: 5,028
Thanks!: 18,894
Thanked 8,613 Times in 3,237 Posts
Default 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

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
Reply With Quote
The Following 3 Users Say Thank You to Estel For This Useful Post:
  #6  
Old 2012-04-16, 18:51
B-RUNO's Avatar
B-RUNO B-RUNO is offline
 
Join Date: Sep 2010
Posts: 124
Thanks!: 39
Thanked 125 Times in 48 Posts
Cool Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight

Quote:
Originally Posted by Estel View Post
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

/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
Reply With Quote
  #7  
Old 2012-04-17, 01:02
kent_autistic kent_autistic is offline
 
Join Date: May 2010
Location: Manila
Posts: 304
Thanks!: 1,721
Thanked 235 Times in 76 Posts
Default Re: [Request] Status-menu plugin to enable/disable the hardware keyboard's backlight

Quote:
Originally Posted by joerg_rw View Post
[edit] ps.: please notice your kbd backlight will get turned off when ambient light is bright enough
thing is, i have ALS sensor disabled
Reply With Quote
  #8  
Old 2012-04-17, 18:22
joerg_rw's Avatar
joerg_rw joerg_rw is offline
 
Join Date: Mar 2010
Location: SOL 3
Posts: 2,222
Thanks!: 3,399
Thanked 12,651 Times in 1,970 Posts
Default 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
__________________
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

Last edited by joerg_rw; 2012-04-17 at 18:28.
Reply With Quote
The Following 2 Users Say Thank You to joerg_rw For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:45.