Post Reply

[FIX] Capacitive buttons NOT lighting up on AOKP with Auto-brightness off

OP litetaker

22nd April 2012, 02:29 AM   |  #1  
litetaker's Avatar
OP Senior Member
Flag Hyattsville, MD
Thanks Meter: 584
 
1,586 posts
Join Date:Joined: Dec 2011
More
This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 80 > /sys/class/leds/button-backlight-portrait/brightness
print 80 > /sys/class/leds/button-backlight-landscape/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
print 0 > /sys/class/leds/button-backlight-landscape/brightness
The value can be set from 0 to 255. I chose 80 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!
Attached Files
File Type: zip led_fix_v0.2.zip - [Click for QR Code] (376 Bytes, 37 views)
Last edited by litetaker; 22nd April 2012 at 03:36 AM.
The Following User Says Thank You to litetaker For This Useful Post: [ View ]
22nd April 2012, 03:16 AM   |  #2  
knipp21's Avatar
Senior Member
Flag FT Riley BIG RED ONE
Thanks Meter: 578
 
3,791 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by litetaker

This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 50 > /sys/class/leds/button-backlight-portrait/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
The value can be set from 0 to 255. I chose 50 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!

Awesome work. I'm not feeling so well tonight or I would look into it bro.

Sent from my Incredible 2 using xda premium
22nd April 2012, 03:18 AM   |  #3  
knipp21's Avatar
Senior Member
Flag FT Riley BIG RED ONE
Thanks Meter: 578
 
3,791 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by litetaker

This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 50 > /sys/class/leds/button-backlight-portrait/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
The value can be set from 0 to 255. I chose 50 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!

I see you have something for lights in portrait. Maybe also write it for landscape as the lights always go out in landscape.

Sent from my Incredible 2 using xda premium
22nd April 2012, 03:37 AM   |  #4  
litetaker's Avatar
OP Senior Member
Flag Hyattsville, MD
Thanks Meter: 584
 
1,586 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by knipp21

I see you have something for lights in portrait. Maybe also write it for landscape as the lights always go out in landscape.

Sent from my Incredible 2 using xda premium

Did that. This fix is a very hackey one! I wish I could make a more clean one later...
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes