[MOD][KERNEL] Screen Dimmer - Nexus S Android Development

This tweak is no longer supported, use Touch Wake instead!
For notebook/netbook computers switching off the screen after a certain timeout is a simple yet effective way of saving battery life and such a feature is integrated into every OS. Android also has a screen timeout feature, however this suspend function also disables the touchscreen controls (and touchkey buttons) and you have to press the power button to re-enable the screen (plus, if you did not disable the lockscreen, you also have to unlock it again).
Since this is kinda annoying I tried to find an app which could disable the screen after a timeout and re-enable it on touch, however I could not find one. After some digging I found out that there is no way with the current Android API to disable the screen without simultaneously disabling the touchscreen controls.
So I took a look at the kernel source and after some trial and error it seems I have found a stable way to implement such a screen off feature.
To enable (disable) the screen dimmer pass 1 (0) to 'enabled' in /sys/class/misc/screendimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 15000 = 15s.
Changes to the source (based on kernel with BLD 3; apply patches in exactly this order):
http://www.pastie.org/2408247
http://www.pastie.org/2408254
http://www.pastie.org/2408257
http://www.pastie.org/2408259
http://www.pastie.org/2408260
BUGFIX:
I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688
BUGFIX #2:
Fixed the auto brightness not working anymore.
Bug fix: http://www.pastie.org/2418667
BUGFIX #3:
The user space access to the framebuffer is closed down before the screen is dimmed which makes sense and took care of one oddity I did notice. Also it should save some more battery.
Bug fix: http://www.pastie.org/2420744
BUG FIX #4:
Patch to avoid race conditions.
Bug fix: http://www.pastie.org/2441551
Get Jonathon Grigg's 'Spark Mod Manager' GUI for controlling Screen Dimmer: http://forum.xda-developers.com/showthread.php?p=17291034
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
This tweak is no longer supported, use Touch Wake instead!

good...thanks!!

You are the GOD ...
Amazing... can't wait one of the kernel dev have this on their kernel. So I can easly flash it.

I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688

Nice job, looks like a cool mod.
I'll release it under a experimental version of my kernel enabled by default to see how people like it.
One question, does the screen go off while I'm watching a video such as YouTube?
Sent from my Nexus S using XDA Premium App

Highly Appreciated.

reddv1 said:
Nice job, looks like a cool mod.
I'll release it under a experimental version of my kernel enabled by default to see how people like it.
One question, does the screen go off while I'm watching a video such as YouTube?
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Yes, unfortunately the screen always gets dimmed even if the app has the FLAG_KEEP_SCREEN_ON set. I took a look at the kernel source and it seems this flag is not passed on to the kernel and handled only by the Android OS; so the kernel does not know whether currently an app is open which has this flag set. Maybe I can think of something, but most likely this is a limitation which I cannot remove.

This will be amazing.
I have always wanted a way to wake up the phone without reaching over to the power button. I remapped my power button to the soft search key just so I didn't have to reach over to push the power button but it obviously didn't work to wake the phone. This is something I've dreamed of, to just touch the screen or the touch keys and it would wake.
Couple questions:
1) Is it possible that only touching the 4 soft keys will wake the screen (instead of the screen)?
2) How does this affect battery? Is a wake lock held? Does the phone sleep correctly to go into power saving? I'm assuming if the screen is touchable that the phone isn't sleeping and as such, this will be a battery drainer.

Enhanced said:
This will be amazing.
I have always wanted a way to wake up the phone without reaching over to the power button. I remapped my power button to the soft search key just so I didn't have to reach over to push the power button but it obviously didn't work to wake the phone. This is something I've dreamed of, to just touch the screen or the touch keys and it would wake.
Couple questions:
1) Is it possible that only touching the 4 soft keys will wake the screen (instead of the screen)?
2) How does this affect battery? Is a wake lock held? Does the phone sleep correctly to go into power saving? I'm assuming if the screen is touchable that the phone isn't sleeping and as such, this will be a battery drainer.
Click to expand...
Click to collapse
1) Currently the screen is re-enabled both when touching the screen and the touchkeys. I think that makes the most sense. However, one could easily modify the code to limit this to the touchkeys.
2) The phone is not put to sleep, only the screen is disabled. So compared to the normal screen lock this will drain the battery much quicker. This tweak is not intended as a replacement for the stock screen lock, but as an addition. You can set the screen lock to a value like one or two minutes, so it will properly lock the phone for example if put it in your pocket, while having the screen dimmer set to a lower timeout like 15sec, so the screen will be disabled and some battery saved if you just pause for some time for example because you wait for a download to finish or talk to somebody. So, if you use it right, you should save some amount of battery.

I found a bug after running this mod for about a couple hours. The screen would not turn on after leaving the phone for about half an hour. The touchkeys would light up and the when I clicked the volume keys I could hear the volume settings changing.
Sent from my Nexus S using XDA Premium App

Ezekeel said:
1) Currently the screen is re-enabled both when touching the screen and the touchkeys. I think that makes the most sense. However, one could easily modify the code to limit this to the touchkeys.
2) The phone is not put to sleep, only the screen is disabled. So compared to the normal screen lock this will drain the battery much quicker. This tweak is not intended as a replacement for the stock screen lock, but as an addition. You can set the screen lock to a value like one or two minutes, so it will properly lock the phone for example if put it in your pocket, while having the screen dimmer set to a lower timeout like 15sec, so the screen will be disabled and some battery saved if you just pause for some time for example because you wait for a download to finish or talk to somebody. So, if you use it right, you should save some amount of battery.
Click to expand...
Click to collapse
This is exactly what I'm lookin for. i will set 1 minute for screen dimmer and 2 minute for screen lock.

Ezekeel said:
For notebook/netbook computers switching off the screen after a certain timeout is a simple yet effective way of saving battery life and such a feature is integrated into every OS. Android also has a screen timeout feature, however this suspend function also disables the touchscreen controls (and touchkey buttons) and you have to press the power button to re-enable the screen (plus, if you did not disable the lockscreen, you also have to unlock it again).
Since this is kinda annoying I tried to find an app which could disable the screen after a timeout and re-enable it on touch, however I could not find one. After some digging I found out that there is no way with the current Android API to disable the screen without simultaneously disabling the touchscreen controls.
So I took a look at the kernel source and after some trial and error it seems I have found a stable way to implement such a screen off feature.
To enable (disable) the screen dimmer pass 1 (0) to 'enabled' in /sys/class/misc/screendimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 15000 = 15s.
Changes to the source (based on kernel with BLD 3; apply patches in exactly this order):
http://www.pastie.org/2408247
http://www.pastie.org/2408254
http://www.pastie.org/2408257
http://www.pastie.org/2408259
http://www.pastie.org/2408260
BUGFIX:
I already have the first bug fix for you. The kernel was not compiling anymore without the screen dimmer activated in the .config. Besides that nothing has changed, so if you already have a compiled kernel with the screen dimmer running this will not change anything.
Bug fix: http://www.pastie.org/2408688
wor
I have send Netarchy, reddv1 and mathkid a notice (could not reach morfic) about this update, so they aware of this change. As soon as the new version is implemented I will update the list below. Be patient.
Kernels including these modifications:
none yet
Click to expand...
Click to collapse
it works great in trinity with the cm7 nightlies.. thank you.

I don't understand the instruction. what I have to do?

reddv1 said:
I found a bug after running this mod for about a couple hours. The screen would not turn on after leaving the phone for about half an hour. The touchkeys would light up and the when I clicked the volume keys I could hear the volume settings changing.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Hmm. Yeah, that sounds like a bug. Did any error messages appear in the log? Could you reproduce the error?
simms22 said:
it works great in trinity with the cm7 nightlies.. thank you.
Click to expand...
Click to collapse
Great. If you run into any problems please let me know. I am glad we have such a thorough tester on board.
tonno16 said:
I don't understand the instruction. what I have to do?
Click to expand...
Click to collapse
Wait for the kernel devs to implement this tweak. Then follow their instructions to activate the dimmer; they probably will supply you with some init.d scripts for convenience.

simms22 said:
it works great in trinity with the cm7 nightlies.. thank you.
Click to expand...
Click to collapse
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.

rejanmanis said:
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.
Click to expand...
Click to collapse
Here lucid blue kernel with the screen dimmer: http://goo.gl/nBHir
The screen dimmer is enabled and set at 30 seconds. Post any issue you have here.
Sent from my Nexus S using XDA Premium App

rejanmanis said:
Can I have your kernel please.
Can't hardly wait till u released it for public. I will realy appreciate it.
If I could give a try for your kernel, would please send me by email at [email protected]
Many thx before.
Click to expand...
Click to collapse
it should be out soon, maybe today or tomorrow. you dont want the one im using, its really a raw test kernel.

Found another bug, the auto brightness doesn't work anymore.
Sent from my Nexus S using XDA Premium App

reddv1 said:
Found another bug, the auto brightness doesn't work anymore.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
i can confirm it

reddv1 said:
Here lucid blue kernel with the screen dimmer: http://goo.gl/nBHir
The screen dimmer is enabled and set at 30 seconds. Post any issue you have here.
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
grate thx men. i love u
it should be out soon, maybe today or tomorrow. you dont want the one im using, its really a raw test kernel.
Click to expand...
Click to collapse
okay mr simms. i can wait.

Related

Updated [16/11]: [App] [G-Sensor] [Brand New] The XSense v1.0

Credits:
Foremost, let us all acknowledge Koushik for his brilliant "Sensors" library upon which most if not all non-HTC apps that use the G-Sensor, Light-Sensor, and Navi-Sensor are built, simply ingenious. Moreover, I would like to recognize No2chem for the NeuLed2 library which is an equally exquisite peace of code that allows access to the Diamond/Pro Leds. Without those two guys, accessing these advance interfaces on the diamond/pro would be inapproachable at best.
Reason: Since I bought my Diamond, I constantly thought HTC gave it a lot of sensors but nearly no .."Sense".
......... X-Sense ...........
* Hopefully, an innovaton & integration of RANDOM but needful features...
Features:
1. Courtesy Settings:
- Select Volume Profiles to activate on Face-Down & Face-UP events. Choose from: None, Silent, Normal, and Vibrate. You can also choose to suspend the Phone when its facing down (duh!).
- Automatically activate/deactivate the Speakerphone during phone calls depending on the phone's posture. In other words, if you're not holding the phone up then it will automatically activate the Speakerphone.
2. Notifications-Sense:
- IF there is/are any outstanding notification(s), the device will vibrate whenever you move it at customizable intervals: Missed Call(s), Voice Mail, and SMS only.
3. Stylus-Sense:- When the Stylus is in/out: Will play faint sound + Blink the Back button's light +/Vibrate. Moreover, the device will vibrate whenever you move it at customizable intervals.
- When the Stylus is out and the device is moved: Device will vibrate twice on every posture change + blink the Back button's light to REMIND you that the Stylus has not been placed back in. This goes ON until the Stylus is placed where it should be.
* Uses "in.wav" & "out.wav" files in the \XSense\ Dir; you can use whatever wave files for this.
4. General Settings:
- Polling Interval: From 200 to 3000 Miliseconds. This determines the rate at which the G-Sensor is polled. Lower values give higher response times and fluid operation at the cost of battery life & CPU utilization.
- Flash Navi Lights: Will blink button lights to notify you of Profile changes and Stylus In/Out.
- Vibrate on Events: Will induce very subtle vibrations to notify you of Notifications and Profile changes.
- Suspend when UP-Side-Down: Your phone will suspend if you hold it up-side-down (duh!)
- Light Navi Button When Suspended: Will do just that. This is an independent setting that turns ON the Navi button's light at suspend time, and OFF at Resume time (this is Event Driven, so no polling is involved). This feature really helps if, like me, you want to see where the damn thing is in the dark - before you launch it against the floor.
6. Installs to "\Program Files\XSense", and Creates 2 shortcuts:
"Start Menu\Programs\XSense" and "Startup\XSenseSvc".
Program Settings are saved to the Registry at "HKCU\Software\XSense\".
Use of System Resources:
1. Diskspace: 162 KB RAM footprint: 374-535 KB Battery: NOT observed.
2. CPU Usage: %0.29 Average. Spikes for 2 seconds to %2.7 - %8.5.
* Indicated CPU usage occurs ONLY when there is an EVENT (posture changed, stylus in/out Sounds playing,
etc)
Logic:
- During phone calls, All features are suspended except the Speakerphone-specific code.
- Program will respond to posture changes only 2 seconds after they have occured, this is to
avoid unintended operation ( as much as possible ).
- Vibration: The way I like it is in waves of 200 miliseconds length! I generally hate vibrations, so if you want it at 201 ms. you're welcome to make your own program and enjoy the merits of your personal taste.
- This prgram Registers Event Handlers for: "G-Sensor", "Incoming Call", "Phone Call in Progress", "Stylus in/out", and Power Manager events. DO NOT move it to Internal Storage, you have been warned.
Requirements:
.NET 3.5 + Diamond or Raphael.
Restrictions:
Only for the Diamond/Raphael (vis-a-vis, it will crash on any other device!)
Bugs/Limitations:
Knock yourself out...
Disclaimer:
This program is provided strictly on "as is" basis. It is intended only as a proof-of-concept. Although fully functional, it must NOT be considered for daily use. This software is very likely to compromise the integrity of your data as well as invariabley cause your device to malfunction in any way, shape, or form. Therefore, the developer shall be absolved of all responsibility towards testers and/or their computers & devices. While using this software you agree to be solely liable for all and any damages you do to yourself, your device, or any damn thing you possess and care for!
Release Notes:
- Download & Install the CAB
- Run the XSense from your Start Menu\Programs, customize to taste, and enjoy!
- IF you want it, download it from the Diamond section.
NOTE: Further releases/upgrades will NOT work on the Raphael/Diamond PRO.
wheres the cab?
Cab?!?
This program sounds sweet.. Im willing to give it a go, but no cab.
This is like the april fool joke for the wireless charging app. It's a joke, the app is too good to be true
/Closed
klasital said:
This is like the april fool joke for the wireless charging app. It's a joke, the app is too good to be true
/Closed
Click to expand...
Click to collapse
I fell for that too man, it was NOT funny tho! Its October btw..
shirreer said:
I fell for that too man, it was NOT funny tho! Its October btw..
Click to expand...
Click to collapse
And you still haven't posted the app...
Roger
96cobra said:
And you still haven't posted the app...
Roger
Click to expand...
Click to collapse
Released: On first post.
Release: available on the first post. Tell me what you all think (compliments/complaints)...
shirreer said:
Release: available on the first post. Tell me what you all think (compliments/complaints)...
Click to expand...
Click to collapse
can i have your permission to review this app on a video? i have a youtube dedicated to the FUZE but also other stuff
looks promising and nice
Nice but . . .
OK first off I love this program it works very smoothly, except for one thing, and I am sure this is a simple fix. I unzipped and copied everything to the root folder of my device. Started the application and it starts working, very cleanly I might ad. However the stylus function isn't working for me. I am sure it just has to do with the file of the wav, should I put these in any specific folder?
XERO_Racer said:
can i have your permission to review this app on a video? i have a youtube dedicated to the FUZE but also other stuff
looks promising and nice
Click to expand...
Click to collapse
Go right on man, and thanks for the "cheer up". Enjoy
jewill00 said:
OK first off I love this program it works very smoothly, except for one thing, and I am sure this is a simple fix. I unzipped and copied everything to the root folder of my device. Started the application and it starts working, very cleanly I might ad. However the stylus function isn't working for me. I am sure it just has to do with the file of the wav, should I put these in any specific folder?
Click to expand...
Click to collapse
Tell me more:
- Did the stylus-out/in sound EVER play?
- Did you change the original wav files?
- Is the phone's system volume (not the Ringer) loud enough to be heard?
Notes:
- The wav files (in.wav and out.wav) are supposed to be in the same directory as the program.
- The original wav files are subtle, they are meant to merely "hint" at you.
Glad that this app really works. Maybe in the next release you could add some settings so we can customize it as we wish. The only small problem that I encountered is that the phone doesn't turn back to loud mode when I flip it unless I push the wake button to turn the screen on. This can be annoying sometimes because I missed a call this way...
Good job on this app. It's really subtle but useful at the same time.
bedobela said:
Glad that this app really works. Maybe in the next release you could add some settings so we can customize it as we wish. The only small problem that I encountered is that the phone doesn't turn back to loud mode when I flip it unless I push the wake button to turn the screen on. This can be annoying sometimes because I missed a call this way...
Good job on this app. It's really subtle but useful at the same time.
Click to expand...
Click to collapse
Thank you mate. I intend to create a settings screen altough that would be both cumbersome and useless for the current feature-set except for the stylus sounds.
I am thinking of adding a launcher to the stylus events, perhaps a new note would open on stylus-out, then save+close on stylus-in.. who knows, eh?
As for the missed call......LOL... I think that's just the point ...Seriously though, WM devices cannot survive the battery strain if they don't sleep (suspend). So, we do with what we got
Cheers
only issue i am having is.. I would prefer not to have the navi lights on all the time... whether the phone is face up or down my navi lights are always on
Short Review
ok soo far i tested the app and i have to say is this is a real good app, only problems im encountering is the vibration is very very faint, but i guess thats ur deal of conserve battery life? theres no problem to it and besides...speaking of battery life, leaving the NavLight on and messing around with the app for 5 mins straight didnt even take a percent off of my battery, ill try for a more deeper battery challenge but anyways, heres a list of suggestions, pros and cons, btw this app makes my TouchPro look 5000 times more cooler too something ive been wanting on this phone
PROS:
-Courtesy Sense seems to be very effective
-doesnt kill my battery much(yet)
-not a CPU Heavy app, still can run TP flawless
-Stylus Sense is responsive
-not a memory heavy app
CONS:
-Response of every "sense" is very slow, takes like 2 seconds to switch
-Courtesy Sense can sometimes be out of control, can possibly switch the volume off and on since i have my TP in my vertical case(but that can be fixable i guess)
-Cant close the app(if user decides to) but theres a way to close it through task manager(not HTC TM though)
-Backlights dont light up anymore if app is in use
-Cant unmute unless you switch the device on
Suggestions:
-Make a settings menu where u can adjust the poll speed and sensitivity and what Senses you can turn Off or On
-Should make the Stylus notification light blink every 15-30 seconds or 1 min at the most
-Also to add on the Notifications Sense is the famous blinking LED Light whenever you shake the device
-Close/Exit option onto the app
-When the device's volume is set on silent or vibrate, the Common Sense should be turned off until the device volume is set back to normal
-and probably something crazy, the Party Light Mode, where you can make the lights blink with noise or fade different paterns or blink with some random pattern just for FUN lol
Overall Score 9/10 and thats my honest opinion...this is a great app especially in Alpha stage
Video Review coming up this weekend, ill be posting a link soon, thnx for the great app
Video Review
here ya go everyone, a review video courtesy of me feel free to subscribe if you like
http://www.youtube.com/watch?v=Ds2Brq8L_dY
XERO_Racer said:
here ya go everyone, a review video courtesy of me feel free to subscribe if you like
http://www.youtube.com/watch?v=Ds2Brq8L_dY
Click to expand...
Click to collapse
Bro, let me thank you for a VERY groovy flick, I enjoyed every bit of both your written and video reviews.
I must praise you further for a great job at a thorough & constructive critique. Your stylish review and suggestions are valuable and are noted with all due enthusiasm. I will try my utmost to reflect what I can on my next attempt - the Beta. Also, I will contemplate creating this "feast of lights" you're craving as a token of gratitude for your effort
Cheers
Here's v1.0 ... fully customizable.
This seems to be unneeded around here, So... for the few who want it, y'all can download it from the Diamond Section - In the meantime, I'll be contemplating ways of making new versions unusable on the Raphael for the obvious unpopularity of this device, and equally evident lack of enthusiasm from those who have it
Cheers

Help with options (touch button light and brightness)

I need some help with options in this phone. First off all I found it annoying that the bottom 4 touch button light turns off in like 5 seconds. I know it saves battery but I want to have the option to keep on longer. I'm pretty sure there isn't a built in option, but is it possible for anyone here to mod this? (I think you can do it because there is a mod to turn them always off).
Next I feel that the lowest screen brightness is still pretty high. Is there anyway that I can reduce it? Possibly through an app? I'm rooted and everything so no problem there. Thanks
Many would like the option to change the time out on the buttons. Unfortunately no fix yet.
As for the brightness, many of the widgets to adjust brightness from the market will allow lower settings
I use extended controls..I don't think it was free but is highly customizable

[Q] disable hardware buttons backlight

hi
is there any way to disable the led of the hardware buttons. i know where the buttons are. i dont need a light to find them. and it looks ugly when they light up. after i used them i always wait to touch the screen until they are off.
I think neldar knows the most about this since he has done the backlight notifications mod. It would be super to have an option in the recovery to disable backlight in the buttons. They are annoying at night when using Screen filter to dim the screen, buttons are very bright in contrast to the screen.
Agreed. I would love to be able to switch them off.
Yes this is true and really anoying!
At night they are much to bright. Would love a "disable" option, too.
Is it maybe possible to dimm the buttons, too?? This would really be awesome
ok, i'm not the only one who wants that leds switched off. but isn't there anyone who has an idea how to do that
Anyone figured this out yet?
i found an app in the market called“ leds hack“. it supports samsung vibrant, but it dont works on my phone. isnt it the us-name for the sgs? maybe the rom is the problem. i'm on darkys 9.3
i tryed to find the script that controls the backlight. here: stackoverflow.com/questions/4152053/android-turn-off-key-lights i found this info:
A: The keyboard backlight can be controlled via /sys/class/leds/ keyboard-backlight/brightness. It appears that it's a simple on-off control (echoing '0' turns it off, echoing '1' or higher turns it on). For some reason, the default system backlight control stuff seems to set this to "83", but I don't know why. I can't seem to see any difference between 83 and any other number. The file is readable by anyone, but only writable by root, so you'll need root access to the phone to manipulate it this way.
can anyone tell me where i can find the file on my phone...
Has anyone found the answer?
This is honestly something that I would even pay for if a dev wanted to create a little app or mod that could do this quickly and easily for those that are not confident to make these changes on their own.
No one? :/
magooo said:
/sys/class/leds/ keyboard-backlight/brightness
Click to expand...
Click to collapse
this doesnt exist on our android.
There is is /sys/devices/virtual/misc/melfas_touchkey/brightness
you can do
echo '1' > /sys/devices/virtual/misc/melfas_touchkey/brightness
to turn it on, but i have not found a way to turn it off permanently
Can some one bind this to light sensor? So that we can have it disabled during day and have it enabled at night??
how can i edit this files? i cant find an editor or something like that. i'd like to play around with this script?
joseph.carty said:
This is honestly something that I would even pay for if a dev wanted to create a little app or mod that could do this quickly and easily for those that are not confident to make these changes on their own.
Click to expand...
Click to collapse
I'd pay too
Please, It have to be so easy
magooo said:
A: The keyboard backlight can be controlled via /sys/class/leds/ keyboard-backlight/brightness
Click to expand...
Click to collapse
I don't have the folder /leds. What version of android do you have?
I found this. As a new user, I can't send links to the forum, I paste the important part:
Samsung GT-I9000
s3c-keypad
- scancode = 26 (confirmed with keylayout/s3c-keypad.kl)
/sys/class/backlight/s5p_bl/brightness
drivers/input/keyboard/s3c-keypad.c
drivers/video/backlight/backlight.c
- brightness and actual_brightness 's get/set method. (actual_brightness is read only)
drivers/video/samsung/s3cfb_tl2796.c
- Samsung's implementation. MIN_BL = 30. Lower than this == black out.
Could it be useful?
Thanks

Will someone please tell me why Google hasn't improved the rotation speed?!

I thought this was originally a product if poor sensors. But it wasn't. Then I thought it was a bug. Updates went by, then I saw that wasn't the case either. It just seems to be a "feature".
This feature is really beginning to annoy me! Can anyone tell me why it takes about two seconds before the screen rotates in stock Android. My G.Nex takes about the same time. I'm guessing any remedy involves rooting, which is annoying. I'm rooted, I just don't think this should be necessary for people to do (IF it's necessary).
Can anyone shed light on this?
Sent from my Nexus 7 using xda premium
Actually if it rotates in less than a second it'll be more annoying trust me. Like if you are typing and just tilt your device a little bit, it'll be a disaster right? I don't know however if you can modify this.
Sent from my Nexus 7
Aokp and others allow you to change this. Many roms have a shorter rotation speed. They actually did quicken it, 4.0 was really slow. Yes its a feature.
Sent from my Galaxy Nexus using xda premium
Quite fast considering what it has to do.
marsyeti said:
Actually if it rotates in less than a second it'll be more annoying trust me. Like if you are typing and just tilt your device a little bit, it'll be a disaster right? I don't know however if you can modify this.
Sent from my Nexus 7
Click to expand...
Click to collapse
I agree with this.. The feature is there to prevent you from rotating the screen by accident. Say using the cam in video chat while holding the device in your hand.. While typing and walking around..
Not sure why this is such a bother to you Not everything should be Instant.If it were instant you would also see the screen refresh as its turning the icons..
the ui . would have to turn resize screen background re position the icons and the notification/ now settings menu all in a fraction of a second. The delay helps with my first sentence as well as gives the Interface to make necessary changes for the new orientation.. Good things come to those who wait..
The rotation pause time is perfect for me.
erica_renee said:
I agree with this.. The feature is there to prevent you from rotating the screen by accident. Say using the cam in video chat while holding the device in your hand.. While typing and walking around..
Not sure why this is such a bother to you Not everything should be Instant.If it were instant you would also see the screen refresh as its turning the icons..
the ui . would have to turn resize screen background re position the icons and the notification/ now settings menu all in a fraction of a second. The delay helps with my first sentence as well as gives the Interface to make necessary changes for the new orientation.. Good things come to those who wait..
Click to expand...
Click to collapse
If anyone has used the iPad, other iDevice or some other non-stock Android devices, the rotation delay is only about half a second and smooth. There is no confusion or constant accidental rotations, it's responsive rather than intentionally slow. Plus, I really don't think too many people accidentally rotate their devices too many times.
Another example is that with my N7, JB 4.2, rooted but stock, It can take up to 4 seconds to rotate on the PIN secured lock screen. In what way is this useful?
Its less than one second on my stock 4.2...
The rotation speed seems much longer on 4.2 than it did on 4.1.2. I noticed the difference immediately after updating.
You can play with the 3 screen animation parameters - they are located in setup under the developers section about half way down the page.
-Window animation scale
-Transition animation scale
-Animation duration scale
These parameters affect the speed at which the display dims and brightens, rotates and transitions..
If you set the 3 parameters to zero, you get a binary effect on all animations - in other words, a single step from one position/brightness/orientation to the next.
I found that you may have to reboot the device (or restart the window manager?) for any changes to take effect.
Hope this helps.

Setting Screen Dim Amount When Inactive?

I would like to use my fire tablet as an alarm panel. Found a few apps that display full screen web pages, that works good. In the development options I turned on "stay awake" so the panel could always be on. After like 30 seconds of no using the screen just barley dims. I would like to dim the screen as much as possible after no use. Anyway to override this amount? I found several apps that can set the dim amount, but just by a schedule, not by inactivity. Or even a web browser app that can control the dimming when not in use?
Thanks a bunch!
Coods said:
I would like to use my fire tablet as an alarm panel. Found a few apps that display full screen web pages, that works good. In the development options I turned on "stay awake" so the panel could always be on. After like 30 seconds of no using the screen just barley dims. I would like to dim the screen as much as possible after no use. Anyway to override this amount? I found several apps that can set the dim amount, but just by a schedule, not by inactivity. Or even a web browser app that can control the dimming when not in use?
Thanks a bunch!
Click to expand...
Click to collapse
Unfortunately, not possible on this device. Minimum brightness level set in kernel (possibly a panel/controller limitation) with no known workarounds (via Xposed). To date this is the only device I own that exhibits this behavior.
Thanks for that info Davey. Maybe I'll see if I can create my own app with a webview that will dim when not touched for a period of time. Since it seems an app can control the dim level. Thanks again.
Coods said:
Thanks for that info Davey. Maybe I'll see if I can create my own app with a webview that will dim when not touched for a period of time. Since it seems an app can control the dim level. Thanks again.
Click to expand...
Click to collapse
Ah - so you are not experiencing any dimming vs dissatisfied with the minimum level. Couple thoughts:
- might be able to use an automation tool like Macrodroid or Edge (w/Xposed) to dim the screen on a particular action like last user action or time of day; Tasker (a fan favorite) can do this as well but is overkill for your needs IMO
- blue light filters can emulate deeper dimming levels but you won't realize the associated battery saving as backlight level remains untouched; the again you device is likely plugged in when used as an alarm clock
Unfortunately Macrodroid and Tasker can not listen for inactivity/idle events. Sounds like an Android limitation: http://macrodroid.freeforums.org/inactivity-period-as-trigger-t86.html
Not sure what Edge (w/Xposed) is, not finding that?
Thanks Davey!
Coods said:
Unfortunately Macrodroid and Tasker can not listen for inactivity/idle events. Sounds like an Android limitation: http://macrodroid.freeforums.org/inactivity-period-as-trigger-t86.html
Not sure what Edge (w/Xposed) is, not finding that?
Thanks Davey!
Click to expand...
Click to collapse
Edge is a module for Xposed Framework. You might also consider a different trigger sequence than inactivity/idle, eg: touch, activity atart or time of day. Might need to get a little creative with the thinking

Categories

Resources