# Light Sensor Values Information (Updated 8/22/2011)



## DXC

This is for the *DROID X*

Hey guys, this isn't anything new, a lot of people have mentioned it here and there but I thought starting a thread about it would help some people. I'm on MIUI so i'll be talking from that perspective, but I think CM people will be in the same boat.

*Basics of the Light Sensor:*
So the light sensor works by detecting the brightness of the environment and changing the screen brightness based on that. You're able to edit these values and tell the phone what brightness to set the screen when it detects an environmental brightness within a certain range. Obviously, its a lot more complicated than that, but I will try to make it simple.

So MIUI has set some default values for us:

-From 0 - 19 environmental, it sets the screen to 16. Buttons have backlight on.
-From 20 - 99 environmental, it sets the screen to 50. Buttons have backlight on.
-From 100 - 1499 environmental, it sets the screen to 70. Buttons have backlight off.
-From 1500 - Infinity environmental, it sets the screen to 240. By the way, 255 is max screen brightness. Buttons have backlight off.

*Why these values aren't the best for the Droid X:*
Here's the issue.... the Droid X only has the ability to detect 4 different environmental values: 10, 100, 3600, and 8600. So the screen will essentially never go to 50. It will start at 16 and then jump to 70, and then it'll go to 240 for both 3600 and 8600. You'll want to go in and change this so that you can make use of all 4 of our detected values.

*Optimizing these values for the Droid X:*
Here's how to set these values: Go to Settings > Display Settings > make sure Auto Brightness is turned on > click Advanced Mode. This is where you see all the confusing options. I'm going to make it simple for you.

*Light Sensor Filter:*
Light sensor filter is used to detect an "average environmental brightness". This is pretty much useless to us, since our phone can only detect 4 values, so why would we need to take the average value of 100+100+100+100+100 etc. Having Light Sensor Filter turned on is only going to waste battery, processing time, and make it take longer for the phone to change brightness. Just turn it off.

Some people have pointed out that technically, since light sensor takes an average, having it on will allow you to hit values other than 10/100/3600/8600. Here's why you shouldn't bother:
-A reset threshold of anything other than "disabled" is going to make all of your extra levels (those not including 10, 100, 3600, or 8600) useless except for the ones between 10 and 100. Why? Think about it, if you go from 100 to 3600, the change is too great, and your reset threshhold (which has a minimum allowed value of 400lux) is going to reset your filter, meaning you won't average in those 100 readings. 
-Your extra levels are only going to be active for a maximum of your window length. They don't have the ability to be persistent because of the huge deviation between the Droid X's discrete detected values. Your filtered level is also going to drop drastically to a plateau in the first few seconds of the window length.
-You're going to change brightness much more slowly, and I don't even mean because of the extra brightness levels in between, I mean because the extra CPU usage will cause your phone to adjust slower.
-If you move to a different environment, you're going to be using a screen brightness based partially on where you were rather than entirely on where you are for a period of time equal to your window length. 
-You're going to drain more battery and use up processor allotment in real-time, meaning 100% of the time your screen is active.

*Light Levels:*
-Use custom: ON. We'll set these custom values in a sec.
-Light level to dim: 2. If you have your screen set to turn off after a certain amount of time (i.e. a minute) of not using it, this is the value that the screen dims to a few moments before turning off.
-Edit Other Levels: Skip it for now.
-Allow lights to decrease: ON. Of course, if we're going from a bright room to a dark room we'll want the screen to get darker as well right?
-Decrease hysteresis: 0%. This is useless unless you want option 2 (below).

Now go back to the one we skipped.

*Edit Other Levels:*
Here's what I was talking about before with the redundant default values. Now click the boxes and edit them to look like this:

Lower::::Upper:::::Screen:::Buttons
0............99............8............255
100........3599.......23..........255
3600......8599.......50..........0
8600......infinity.....255........0

Explanation:

0-99: This is just the brightness at an environment of 10, since like we mentioned, 10 is the only value our phone can detect within a range of 0-99. It's going to be what you're seeing when you're laying in bed, using your phone in a dimly lit restaurant or bar, or outside at night. Since web browsers often have white backgrounds, you'll want to use a brightness that doesn't strain your eyes from this. So I set my screen to 8, feel free to change it to your liking. Buttons is simple, if it's 0, then the backlight for your bottom 4 buttons is off. If it's anything else (i.e., anything from 1 to 255), then they're turned on. They have no brightness levels (none which we can adjust here anyway), just on or off.

100-3599: The brightness you set for 100 is probably going to be your most common screen brightness.

3600-8599: The brightness you set for 3600 will be what you get in a bright room or outside on nice days.

8600-Infinity: The brightness you set for 8600 will be what you get when you're standing outside on a really sunny day, at the beach, etc.

P.S., here's a cool trick I just found by accident... If you press settings + vol up, it will set your brightness to max. I guess this is a quick way to get there if you are in a bright area and dont want to wait for your phone to auto adjust.

I hope that helps. Good luck.

*8/18/2011 --New Comparison:*
I was asked to do a comparison to some previously suggested settings for CM people. Here is a thread that some have relied on for their settings: http://rootzwiki.com/showthread.php?t=913

*These are the settings they suggest:*

Lower::::Upper:::::Screen:::Buttons
0............10............2............0
11..........14...........25..........255
15..........49...........25..........255
65..........100.........50..........255
101........2999.......96..........0
3000......5999.......208........0
6000......7999.......246........0
8000......infinity.....255........0

And a few noticeable differences: the thread says set reset threshold to 1000lux, which also means to have filter turned on, and it wants you to set "Decrease hysteresis: 70%".

*Analysis:*
1) Ok, if you read and understood my little tutorial above, then you should already be able to spot a problem here. You've got reset threshold set to 1000lux, so it is now literally impossible to even hit the 5th or 7th levels. To explain - for level 5, if the sensor is going from (10 or 100) to (3600 or 8600) or vice versa, it would detect that the difference is greater than 1000lux, and would then reset the filter. For level 7, if the sensor is going from (10 or 100 or 3600) to (8600) or vice versa, it would again detect a difference greater than 1000lux and reset the filter. If the filter is reset, it wouldn't be averaging in the values from where you just were, and therefore you will not be able to hit a number within either of the two ranges in levels 5 or 7.

2) The rest of the levels that do not contain either 10, 100, 3600, or 8600 can be achieved BRIEFLY (for a time period equal to or less than your window length) by having light filter turned on, but having light filter on has many poor side affects (see above).

3) Buttons are turned off at an environmental level of 10, when it is darkest. In my opinion, this is when I want the those lights to be on the most. However, I'm going to assume that he has them off for this reason - they're even brighter than the screen at 2, and therefore can be distracting. I can't blame him here, I guess that is just up to preference.

4) He does something kind of cool with the "Decrease hysteresis: 70%" option. It can be hard to find a screen brightness for an environment of 10, since you may find yourself straining with too bright a screen in a dark room but wanting the screen brighter in a dimly lit room, both of which would probably be detecting an environment of 10. The thread's author suggests turning Decrese hyseresis to 70%. This allows the following: If you're at a screen brightness associated with your 100 level settings, you might find you prefer this setting in a dimly lit room where the phone would have otherwise set the brightness to the level associated with 10 environmental. Then if the environment gets darker and you want it to readjust to a lower brightness, you can simply turn off and back on the screen and it will set itself to that lower brightness corresponding to 10 environmental. This seems to also be the reason he has two levels with the same screen brightness, to make this solution functional. In my opinion, this is only good in rare conditions, but it is a cool concept that you might find you prefer.

Update 8/22/2011 -- Option 2

I thought a bit more about the above comparison, and the cool trick the guy did with decrease hysteresis, and I optimized it and labeled it "Option 2". Option 2 differs in this way: If you turn on your screen, your brightness levels will be 2/23/50/255 for environments of 10/100/3600/8600 respectively. As soon as your phone detects an environment of 100 or more, your brightness levels will become 8/23/50/255, meaning you will have the exact same settings as I suggested above. It will stay this way until your screen turns back off.

This is good for anyone who thinks that a brightness of 8 is too much for them in a pitch black room, but who doen't want to decrease it at risk of having it be too low for a dimly lit room. However, the option also has a distinct disadvantage: if you want your brightness level to be 8 in a dimly lit room, your phone must first detect an environment of 100 or higher, otherwise you will get a brightness level of 2 in that room. Put simply, if you turn on your screen in a dimly lit room, you'll get a brightness of 2, which is too dim. You'll have to go into an environment of 100 or higher, then back to the dimly lit room to get a brightness of 8. Additionally, if you travel into a pitch black room from an environment of 100 or higher, you will not get a brightness of 2 (it'll be at 8) unless you turn the screen off and then back on again.

If this sounds like what you want, then make "Decrease Hysteresis: 10%" and set your levels to look like this:

Lower::::Upper:::::Screen:::Buttons
0............10............2............255
11..........99............8............255
100........3599.......23..........255
3600......8599.......50..........0
8600......infinity.....255........0

Let me know if you have questions.


----------



## DRTMI

How did you find that the X only has 4 slots for adjustments? 
At the bottom of the setup, there is an option to select the number of slots, I am using 8. Are you saying that they are not all being used?
I never looked but I will tomorrow when its light out. Speaking of direct sunlight, I was setting the brightness up outside one day and in direct sunlight, while aiming the phone at the sun, the reading was only 3680, if that is correct then with your settings the phone would never reach full brightness with the the high setting being 8600.


----------



## OnMy2ndGP

Yes, set number of levels to 4. I always wondered about using 8 levels. I didn't think I was actually seeing the benefits.

Thanks for the write up. I'll verify it works more efficiently tomorrow.

Liquid v2.6 DX via RootzWiki App


----------



## DXC

DRTMI said:


> How did you find that the X only has 4 slots for adjustments?
> At the bottom of the setup, there is an option to select the number of slots, I am using 8. Are you saying that they are not all being used?
> I never looked but I will tomorrow when its light out. Speaking of direct sunlight, I was setting the brightness up outside one day and in direct sunlight, while aiming the phone at the sun, the reading was only 3680, if that is correct then with your settings the phone would never reach full brightness with the the high setting being 8600.


You can edit the number of slots, but that won't change the fact that the droid x's light sensor only reports 4 different readings. So you can have as many slots and as many ranges as you want, but only the ranges that contain 10, 100, 3600, and 8600 will be used.

It is impossible for your phone to read 3680 RAW sensor value. However, it can read 3680 FILTERED sensor value from a combination of 8600 and 3600 readings if you have light sensor filter turned on, but this is a waste of cpu and battery and is a farse since you would be in an area with mostly 3600 environmental light.

Try this. Find a lamp in your house stick the phone right near it, and see what the raw sensor data reads. It should be 8600.


----------



## DRTMI

OK, checked with a lamp and it does read 8600 raw. When I was seeing those other numbers from my last post it was indeed filtered from having the average on. Did not realize that, thank you. Will try this out tomorrow as I'm going in and out.


----------



## Money Mike

Excellent write up here. I've been messing with brightness since cm7 was first released on the x and this has helped a ton. Thanks!


----------



## SuperChargedJ

Thanks for posting this. I haven't been satisfied with how the Auto brightness settings have worked on MIUI so hopefully this will help.


----------



## dvader

1) you didn't answer the question - how did you find out the DX can only detect 4 levels?
2) you say that the hard buttons have no brightness level, only on and off. I know for a fact, that when we got .596 the hard buttons (when turned on) where so bright they bled through the cracks between buttons.
going back to something like froyo (cm7,miui) sets them back to "stock" where they don't bleed through.
can you explain that? perhaps they do have levels, just nothing that can be used? idk. just curious.
3) thanks for the write up!


----------



## DXC

dvader said:


> 1) you didn't answer the question - how did you find out the DX can only detect 4 levels?
> 2) you say that the hard buttons have no brightness level, only on and off. I know for a fact, that when we got .596 the hard buttons (when turned on) where so bright they bled through the cracks between buttons.
> going back to something like froyo (cm7,miui) sets them back to "stock" where they don't bleed through.
> can you explain that? perhaps they do have levels, just nothing that can be used? idk. just curious.
> 3) thanks for the write up!


Hey sorry you're right I didn't explain how you can see that it only detects 4 levels. You can test it yourself if you get different levels of light around your house, or bring the phone closer to and further from a lamp. Do this while on the "edit other levels" screen, and look at the number on the top, particularly the RAW sensor number. It will only ever be one of four values - 10, 100, 3600, or 8600. This has also been reported by others, these are called "discrete values" as they are the only ones available.

Regarding the button brightness. It is possible that there is a fixed brightness value set somewhere else in the phone, however, I know that in these menus here, setting a value of 0 will turn the buttons off, and setting any value between 1 and 255 will turn the buttons on to what may be this fixed brightness value somewhere else in the phone. I'll have to look more into that.

Again, you can verify for yourself that the buttons will not change brightness using these menus. Set the buttons to 1. Then set them to 255. You'll see no difference.


----------



## mikejr

I'm running CM4DX and have been a little scared of this screen. So many options and I haven't seen much explanation on what everything does. That was an awesome informative post. After following the steps I can see what everything is designed to do. Now I've customized it a bit. Looking forward for some better battery life. I felt like my screen was always on blast mode! Also, turning off the filtering probably will help some too. A big thanks!


----------



## dvader

droidxchat said:


> Hey sorry you're right I didn't explain how you can see that it only detects 4 levels. You can test it yourself if you get different levels of light around your house, or bring the phone closer to and further from a lamp. Do this while on the "edit other levels" screen, and look at the number on the top, particularly the RAW sensor number. It will only ever be one of four values - 10, 100, 3600, or 8600. This has also been reported by others, these are called "discrete values" as they are the only ones available.
> 
> Regarding the button brightness. It is possible that there is a fixed brightness value set somewhere else in the phone, however, I know that in these menus here, setting a value of 0 will turn the buttons off, and setting any value between 1 and 255 will turn the buttons on to what may be this fixed brightness value somewhere else in the phone. I'll have to look more into that.
> 
> Again, you can verify for yourself that the buttons will not change brightness using these menus. Set the buttons to 1. Then set them to 255. You'll see no difference.


thanks for the answers 
I dont want my buttons so bright they bleed through im just saying i know they go brighter


----------



## BrentBlend

Great info
Maybe a side-by-side analysis would help the community see the pros/cons of using these settings as opposed to what they have currently.

Edit: Just realized you did a side-by-side to stock MIUI
Would you mind doing a comparison to the cm7 auto-brightness settings found in the old thread.

I'll link when I find it


----------



## Money Mike

I'm noticing now that auto brightness is no longer adjusting itself unless I turn auto off and back on. An I the only one experiencing this?

Edit: I rebooted and it's working again.


----------



## salem

I'm using miui (8.12). There isn't an option to change the upper values; ie. no "box" around the numbers. They are set at 19, 99, 1499, and infinity. The other values can be changed.


----------



## cron912

"salem said:


> I'm using miui. There isn't an option to change the upper values; ie. no "box" around the numbers.


When you change a lower value, it automatically adjusts the upper value on the line above it.


----------



## salem

Thx... I'll try that.


----------



## mikejr

Is there a location that describes what each of these settings under light levels accomplishes?

I'm getting a weird issue where my screen goes between different levels at odd times. Tough to explain, but when I unlock it the screen starts out dim then gets brighter. Don't remember it doing that before. I would like to make some educated edits to those values.


----------



## SaurusX

I have to disagree about you saying that the screen will never get set to 50. When the filtered sensor reading is between 20 and 99 the screen *will* be set to 50. Of course, it's only transitioning between two different raw sensor readings when in that range, but you can make the changes in brightness progress more smoothly by having those extra intervals. That's why I feel it's useful to have my eight intervals.


----------



## DXC

If your screen changes brightness when youre in a area with constant light, try turning "decrease hysteresis" up.

When you turn your screen on, the first sensor value is 10 since it just started looking. This will cause the screen to use your lowest brightness setting and adjust itself after a moment. Its just the way the phone works and not anything we can change, but if you prefer, you can make your 10 brightness match your 100 brightness so there will be no noticeable change.


----------



## jbrock98

Just curious if you never have auto brightness on then these settings mean nothing right? I just use my power widget to turn brightness up when I need it but mostly I have it defaulted to the dim setting

Sent from my DROIDX


----------



## DXC

jbrock98 said:


> Just curious if you never have auto brightness on then these settings mean nothing right? I just use my power widget to turn brightness up when I need it but mostly I have it defaulted to the dim setting
> 
> Sent from my DROIDX


correct, if you have no need for auto brightness, then this thread won't be useful to you


----------



## mwaters33

Where are the default values for a given firmware called out? I am assuming these values can be set to better suit our device by default. All custom roms I've used had default values that stunk and I've never used auto brightness (until reading this thread that is).


----------



## DXC

These are probably somewhere in the classes.dex of the Settings.apk. We could change them so that they are incorporated by default, but it would be up to Rom developers to implement this change.


----------



## mwaters33

"droidxchat said:


> These are probably somewhere in the classes.dex of the Settings.apk. We could change them so that they are incorporated by default, but it would be up to Rom developers to implement this change.


That's what I'm saying. I'm trying to learn as much as possible about how the system works. If I ever build my own custom this will be included


----------



## BMc08GT

"SaurusX said:


> I have to disagree about you saying that the screen will never get set to 50. When the filtered sensor reading is between 20 and 99 the screen will be set to 50. Of course, it's only transitioning between two different raw sensor readings when in that range, but you can make the changes in brightness progress more smoothly by having those extra intervals. That's why I feel it's useful to have my eight intervals.


Exactly why I have my settings that I have posted


----------



## DXC

SaurusX said:


> I have to disagree about you saying that the screen will never get set to 50. When the filtered sensor reading is between 20 and 99 the screen *will* be set to 50. Of course, it's only transitioning between two different raw sensor readings when in that range, but you can make the changes in brightness progress more smoothly by having those extra intervals. That's why I feel it's useful to have my eight intervals.





BMc08GT said:


> Exactly why I have my settings that I have posted


OK two huge reasons you should reconsider. Let's consider a situation to use as an example: Say you're outside where its reading 3600. Then you move inside where its reading 100.

1) Even though your in an area where your phone is reading 100, since it's taking an average based on the past as well, it's going to be basing its value partly off of where you just were (outside) rather than basing the brightness entirely on where you are now. The deviation between our 4 descrete detected values is so great, that having the light sensor filter on will actually decrease the accurate correlation between environment and screen brightness.

2) Having the filter on can make you hit a point within a range as you said, but you need to realize it doesn't have the ability to last. Even if you set your window length to 60 seconds, your filtered brightness is going to quickly dive and then slowly plateau, finally hitting a flat 100 after 60 seconds has passed and that last 3600 reading is out of the picture.

And BMc08GT, I saw your settings... you have your Reset Threshold at 400lux. That right there means that your filter is only "good" for 2 values: 10 and 100 and only when they change between each other. If you go from 10 to any number beside 100, or from 100 to any number beside 10, your filter is going to instantly reset anyway. I'm only trying to help you when I tell you this, because its painful to see those settings in a thread dedicated to saving battery, having the filter on is a huge waste of cpu especially since you are only using it in 2 out of a possible 6 scenarios, and even then it only lasts for your window length of 30s, and even then it is causing you to have a reading that isn't entirely based on where you are. And anything that wastes cpu is wasting battery.


----------



## BMc08GT

"droidxchat said:


> OK two huge reasons you should reconsider. Let's consider a situation to use as an example: Say you're outside where its reading 3600. Then you move inside where its reading 100.
> 
> 1) Even though your in an area where your phone is reading 100, since it's taking an average based on the past as well, it's going to be basing its value partly off of where you just were (outside) rather than basing the brightness entirely on where you are now. The deviation between our 4 descrete detected values is so great, that having the light sensor filter on will actually decrease the accurate correlation between environment and screen brightness.
> 
> 2) Having the filter on can make you hit a point within a range as you said, but you need to realize it doesn't have the ability to last. Even if you set your window length to 60 seconds, your filtered brightness is going to quickly dive and then slowly plateau, finally hitting a flat 100 after 60 seconds has passed and that last 3600 reading is out of the picture.
> 
> And BMc08GT, I saw your settings... you have your Reset Threshold at 400lux. That right there means that your filter is only "good" for 2 values: 10 and 100 and only when they change between each other. If you go from 10 to any number beside 100, or from 100 to any number beside 10, your filter is going to instantly reset anyway. I'm only trying to help you when I tell you this, because its painful to see those settings in a thread dedicated to saving battery, having the filter on is a huge waste of cpu especially since you are only using it in 2 out of a possible 6 scenarios, and even then it only lasts for your window length of 30s, and even then it is causing you to have a reading that isn't entirely based on where you are. And anything that wastes cpu is wasting battery.


I was referring to the statement of the eight levels. I see the reasoning behind the light sensor and have thus set it to off. Thanks for the tip.


----------



## DXC

BMc08GT said:


> I was referring to the statement of the eight levels. I see the reasoning behind the light sensor and have thus set it to off. Thanks for the tip.


OK cool, but you know that having 8 levels is useless too right? You can have as many levels as you want but you will only ever use a maximum 4 of them.


----------



## Money Mike

"droidxchat said:


> OK cool, but you know that having 8 levels is useless too right? You can have as many levels as you want but you will only ever use a maximum 4 of them.


I tried 8 levels a while back and I can say from experience they don't work. They actually seemed to cause my phone not to adjust brightness correctly.


----------



## SaurusX

Money Mike said:


> I tried 8 levels a while back and I can say from experience they don't work. They actually seemed to cause my phone not to adjust brightness correctly.


I'm going to have to disagree with you. I have eight levels and they work just fine for me. Though I can see the logic of only having four... there are only four different reading of the light sensor. However, if you have the filter on, then it takes an average light sensor reading over the last 10 seconds (or whatever) and gets a filtered sensor score. I understand that the filtered score is only transitioning from one sensor reading to another, for example 100 to 3600, and will eventually settle at 3600. It's just a personal preference to include some ranges in between there with gradually increasing screen brightness. It looks "cooler" to me.


----------



## DXC

SaurusX said:


> I'm going to have to disagree with you. I have eight levels and they work just fine for me. Though I can see the logic of only having four... there are only four different reading of the light sensor. However, if you have the filter on, then it takes an average light sensor reading over the last 10 seconds (or whatever) and gets a filtered sensor score. I understand that the filtered score is only transitioning from one sensor reading to another, for example 100 to 3600, and will eventually settle at 3600. It's just a personal preference to include some ranges in between there with gradually increasing screen brightness. It looks "cooler" to me.


I just wanna point out one more time in case you didn't see what I said.

If you have light filter set to on:

-A reset threshold of anything other than "disabled" is going to make all of your extra levels (those not including 10, 100, 3600, or 8600) useless except for the ones between 10 and 100. 
-Your extra levels are only going to be active for a maximum of your window length (10s on your settings). They don't have the ability to be persistent because of the huge deviation between the Droid X's discrete detected values.
-You're going to change brightness much more slowly, and I don't even mean because of the extra brightness level in between, I mean because the extra CPU usage will cause your phone to adjust slower.
-If you move to a different environment, you're going to be using a screen brightness based partially on where you were rather than entirely on where you are for a period of time equal to your window length (10s for you). 
-You're going to drain more battery and use up processor allotment in real-time, meaning 100% of the time your screen is active.

If this is worth the "cool" look to you then you have nothing to worry about, just want to make sure you know the details.


----------



## BrentBlend

Running against older data now. Post results when in a day or two.


----------



## Money Mike

"droidxchat said:


> I just wanna point out one more time in case you didn't see what I said.
> 
> If you have light filter set to on:
> 
> -A reset threshold of anything other than "disabled" is going to make all of your extra levels (those not including 10, 100, 3600, or 8600) useless except for the ones between 10 and 100.
> -Your extra levels are only going to be active for a maximum of your window length (10s on your settings). They don't have the ability to be persistent because of the huge deviation between the Droid X's discrete detected values.
> -You're going to change brightness much more slowly, and I don't even mean because of the extra brightness level in between, I mean because the extra CPU usage will cause your phone to adjust slower.
> -If you move to a different environment, you're going to be using a screen brightness based partially on where you were rather than entirely on where you are for a period of time equal to your window length (10s for you).
> -You're going to drain more battery and use up processor allotment in real-time, meaning 100% of the time your screen is active.
> 
> If this is worth the "cool" look to you then you have nothing to worry about, just want to make sure you know the details.


+1 to this. I had the reset threshold enabled and it took forever for my phone to change brightness. It was most annoying in my truck in the dock. Now that I've disabled this my screen changes almost instantly when going from shade to direct sunlight.


----------



## cleancasey

I can't access or find the advanced levels...I've been there before but not known what to do...now they aren't there


----------



## BMc08GT

Settings->Personal tab->display settings->autobrightness and advanced should be there for ya


----------



## BrentBlend

Been running with these settings for a while, must say i love that the flicker between settings is gone. Haven't tested in a bright scenario yet. Dark rooms no longer leave me blind after looking at my phone though!


----------



## DXC

I've added option 2 to the OP, inspired by gpaulu's settings, which I analyzed in the OP.


----------



## BrentBlend

droidxchat said:


> I've added option 2 to the OP, inspired by gpaulu's settings, which I analyzed in the OP.


Great work


----------



## DXC

Here's a cool trick I just found by accident...

If you press settings + vol up, it will set your brightness to max. I guess this is a quick way to get there if you are in a bright area and dont want to wait for your phone to auto adjust.


----------



## Guest

droidxchat said:


> Here's a cool trick I just found by accident...
> 
> If you press settings + vol up, it will set your brightness to max. I guess this is a quick way to get there if you are in a bright area and dont want to wait for your phone to auto adjust.


Nice! The auto adjust doesn't take that long, but the settings + volume up is extremely useful when needing to check something fast.


----------



## Money Mike

"droidxchat said:


> Here's a cool trick I just found by accident...
> 
> If you press settings + vol up, it will set your brightness to max. I guess this is a quick way to get there if you are in a bright area and dont want to wait for your phone to auto adjust.


Doesn't seem to work with ssx2.1 but it was working with miui.


----------



## insuusvenerati

I'm not sure if I caused this or it was the script but all of sudden my sensor reads -1. It doesn't change the brightness anymore.

Sent from my DROIDX using Tapatalk


----------



## DXC

insuusvenerati said:


> I'm not sure if I caused this or it was the script but all of sudden my sensor reads -1. It doesn't change the brightness anymore.
> 
> Sent from my DROIDX using Tapatalk


what script did you installl?


----------



## Money Mike

"insuusvenerati said:


> I'm not sure if I caused this or it was the script but all of sudden my sensor reads -1. It doesn't change the brightness anymore.
> 
> Sent from my DROIDX using Tapatalk


I had this issue when I updated miui to the latest version. I had to wipe data/cache to fix it. I restored everything but system settings with miui backup.


----------



## insuusvenerati

@droidxchat All of them . I have the 3g booster and the hard to kill launcher.

Edit: oh my bad. These script were from a different thread. The data wipe worked.

Sent from my DROIDX using Tapatalk


----------



## BuRNiN_BoNeS

I don't know if anyone knows it, but if you hold menu and volume up it makes your screen brighter, it voids the auto levels until your screen shuts off again. does on my phone anyway.


----------



## Yar

droidxchat said:


> correct, if you have no need for auto brightness, then this thread won't be useful to you


This is not entirely true. The settings can still mean something valuable, and this thread can be useful.

AFAIK, the advanced auto brightness settings in CM74DX are the only way to consistently override the default minimum brightness value and the default dim value. There may be a settings file adjustment somewhere that lowers the minimum, but I don't know enough to find it and I've never found an app that could do it successfully.

So there are two benefits. 1) You use these settings to set the "dim" level, which is effective whether you have auto brightness turned on or not. More importantly, 2) read below...

In my setup, I use rather complex profiles, rules and conditions in the paid version of the Setting Profiles app. I have several profiles, many of which activate automatically based on location, docking state, time, etc. The homescreen widget allows me one- or two-click access to manually switch to a profile as needed, too.

As you've shown, there are only 4 levels of auto-brightness available on the DX, and for me, they aren't very useful. The sensor reads 10 everywhere from pitch black to soft shadows in a lighted room, and reads 100 in almost any other indoor light, including a brightly-lit room. So in practicality there are only 3 available brightness modes - dark/shadows, indoor light, and outdoor light. The profiles I have set up are actually better at auto-brightness than auto-brightness is! Like, I have a level set for when I'm at work, at home, in my car, etc. I have 5 or 6 different static brightness levels set in different profiles, and most of those profiles set themsleves automatically based on conditions that end up being more useful to me than the light sensor.

Anyway, here's the point: whenever I try to set a static brightness level below 20, even when creating a profile in the Setting Profiles app, it defaults back to 20. This is WAY too bright for one of my most important profiles - the one I use for bed and movie theaters. I need a screen as dark as possible, one that isn't even visible in lighted areas but that still allows me some quick, basic interfacing as needed. I'm guessing this is the point of some of the lower custom levels in your option 2. So, for me, this "bed" profile is the only one that I've set to turn on "automatic brightness" in the stock Android settings. This prompts my CM7 custom levels kick in.

Well, custom _level_, anyway. 2 levels, 0 - 3400 and 3401 - infinity, both of them 2, 0. No filter, no hysteresis, allow decrease. The custom levels won't let you set a brightness lower than your dim level (sort of makes sense, because then dim wouldn't be dim), so I had to set dim to 2 first before I could set it this way. But I don't want my dim at 2, because in any light I can't tell the difference between dim and off. So after setting the custom level, I go back and put dim at 4 or 5 or so.

Effectively, I'm not using any "auto" brightness at all. I'm enabling auto-brightness with a single custom level as a hack to enable a static brightness level of 2, because it's the only way I think I can do that. If there's an easier way, I'd like to know, but this works great. I just have to remember not to allow the screen to dim, becuase dim is actually brighter at this level. But even that is a big help, because occassionally I find the bed/theater profile still active after I'm in the light, and I can't see the screen at all. Waiting a few seconds for it to "dim" is my failsafe so I can see enough to switch the profile. Another option I've tried is setting 100 to also be 2 , 0, but then setting 3600 and 8600 to be 20 or 50 or so. But I feel better knowing that I've hard-set it to 2, so right now I'm on the one level.


----------



## DXC

BuRNiN_BoNeS said:


> I don't know if anyone knows it, but if you hold menu and volume up it makes your screen brighter, it voids the auto levels until your screen shuts off again. does on my phone anyway.


yup just pointed this out one page back, its a cool feature


----------



## irish

Thanks OP this is much snappier IMO on my X, auto-brightness lagged trying to find the "g-spot" for a stable light sensor haha. With this guide and values it is more responsive. Plus not to mention you really dumb ed it down so I could understand it. Still sorta new with this whole scene.


----------



## cpurick

Very useful.

I want to add that the CM7 Auto-Dim-40-100 toggle appears to be using fixed values of 26 (Dim - 10%), 102 (40%), and approximately 224 ("100%" -- maybe closer to 230, but definitely NOT 255.).

As it's been pointed out, the screen can't keep up with either 3600 or 8600, so there's almost no value in differentiating between them.

I used these values:

0-99 16 255
100-3599 80 255
3600-8599 224 0
8600+ 255 0

This way my dimmest auto is actually lower than "dim" on the widget.
I found the 100-3599 level often not bright enough to light the keys, so I left backlighting on.
Any kind of daylight goes to the widget's version of "max," but in direct sunlight it actually pushes the display to 255 ("true" 100%).
This way I know that auto is both the dimmest and brightest that I have, and the widget's only useful for overriding in conditions where it might actually make a difference.

For such a sophisticated device, this would seem to be a surprisingly primitive system. But the display's actually quite good in anything less than bright daylight.

EDIT:
I spent some time with this, and found that 16 was just too dim for many of the conditions below 100. Same with the second one -- it has to hold a long way to make it to 3600. So I changed the first two levels:

0-99 42 255
100-3599 96 255
3600-8599 224 0
8600+ 255 0

I figure 96 is the level it'll spend most time at, and that's not going to seem overly bright in office space. We'll see.


----------



## Wuffpack99

Anyone else have issues with a stuck sensor? Mine sticks at high settings, so if I'm outside in bright sunlight, it'll stay at 8600 when I come back in, and the only way to reset the sensor is to reboot.


----------



## cygnusloop

Wuffpack99 said:


> Anyone else have issues with a stuck sensor? Mine sticks at high settings, so if I'm outside in bright sunlight, it'll stay at 8600 when I come back in, and the only way to reset the sensor is to reboot.


Is "Allow light decrease" checked? If it is not, the result will be exactly as you describe.


----------



## Wuffpack99

cygnusloop said:


> Is "Allow light decrease" checked? If it is not, the result will be exactly as you describe.


Yes it is. It's an intermittent problem, so I know the settings are usually right. But there are times when it just sticks.


----------



## Money Mike

"Wuffpack99 said:


> Yes it is. It's an intermittent problem, so I know the settings are usually right. But there are times when it just sticks.


I've had this issue also. Never found a permanent fix but rather than rebooting you should be able to turn auto brightness off and back on to get it unstuck.


----------



## Iceman0803

Wuffpack99 said:


> Anyone else have issues with a stuck sensor? Mine sticks at high settings, so if I'm outside in bright sunlight, it'll stay at 8600 when I come back in, and the only way to reset the sensor is to reboot.


Mine sort of does the same. When indoors it stays stuck at 0 unless it's close to the light source. As a result my screen is almost always at 6 (changed it from 2 suggested in OP).

Edit: lol now it's stuck at 100 and wont adjust down. Sensor, at least on my device, doesn't seem to react well, if at all to changes in lighting conditions.


----------



## DXC

If your sensor ever gets stuck, you can hit settings + vol up. it will go to max brightness. then turn your screen off and then back on, from there it should be unstuck. let me know if this works.


----------



## Iceman0803

droidxchat said:


> If your sensor ever gets stuck, you can hit settings + vol up. it will go to max brightness. then turn your screen off and then back on, from there it should be unstuck. let me know if this works.


Settings??


----------



## DXC

left-most hardkey


----------



## ufish2

thanks DXC...your work on MIUI is gr8...glad to see you onboard as i know Framework is just to busy,with school and all the projects hes into..miui on my X is just awesome:grin3::tongue3::wink2:


----------



## sstockman

thx for info. definitely helped demystify this area of CM. would be interested in anything
on button levels, beside on/off.


----------



## gpaulu

droidxchat said:


> This is for the *DROID X*
> 
> *8/18/2011 --New Comparison:*
> I was asked to do a comparison to some previously suggested settings for CM people. Here is a thread that some have relied on for their settings: http://rootzwiki.com/showthread.php?t=913
> 
> *These are the settings they suggest:*
> 
> Lower::::Upper:::::Screen:::Buttons
> 0............10............2............0
> 11..........14...........25..........255
> 15..........49...........25..........255
> 65..........100.........50..........255
> 101........2999.......96..........0
> 3000......5999.......208........0
> 6000......7999.......246........0
> 8000......infinity.....255........0
> 
> And a few noticeable differences: the thread says set reset threshold to 1000lux, which also means to have filter turned on, and it wants you to set "Decrease hysteresis: 70%".
> 
> *Analysis:*
> 1) Ok, if you read and understood my little tutorial above, then you should already be able to spot a problem here. You've got reset threshold set to 1000lux, so it is now literally impossible to even hit the 5th or 7th levels. To explain - for level 5, if the sensor is going from (10 or 100) to (3600 or 8600) or vice versa, it would detect that the difference is greater than 1000lux, and would then reset the filter. For level 7, if the sensor is going from (10 or 100 or 3600) to (8600) or vice versa, it would again detect a difference greater than 1000lux and reset the filter. If the filter is reset, it wouldn't be averaging in the values from where you just were, and therefore you will not be able to hit a number within either of the two ranges in levels 5 or 7.
> 
> 2) The rest of the levels that do not contain either 10, 100, 3600, or 8600 can be achieved BRIEFLY (for a time period equal to or less than your window length) by having light filter turned on, but having light filter on has many poor side affects (see above).
> 
> 3) Buttons are turned off at an environmental level of 10, when it is darkest. In my opinion, this is when I want the those lights to be on the most. However, I'm going to assume that he has them off for this reason - they're even brighter than the screen at 2, and therefore can be distracting. I can't blame him here, I guess that is just up to preference.
> 
> 4) He does something kind of cool with the "Decrease hysteresis: 70%" option. It can be hard to find a screen brightness for an environment of 10, since you may find yourself straining with too bright a screen in a dark room but wanting the screen brighter in a dimly lit room, both of which would probably be detecting an environment of 10. The thread's author suggests turning Decrese hyseresis to 70%. This allows the following: If you're at a screen brightness associated with your 100 level settings, you might find you prefer this setting in a dimly lit room where the phone would have otherwise set the brightness to the level associated with 10 environmental. Then if the environment gets darker and you want it to readjust to a lower brightness, you can simply turn off and back on the screen and it will set itself to that lower brightness corresponding to 10 environmental. This seems to also be the reason he has two levels with the same screen brightness, to make this solution functional. In my opinion, this is only good in rare conditions, but it is a cool concept that you might find you prefer.
> 
> Update 8/22/2011 -- Option 2
> 
> I thought a bit more about the above comparison, and the cool trick the guy did with decrease hysteresis, and I optimized it and labeled it "Option 2". Option 2 differs in this way: If you turn on your screen, your brightness levels will be 2/23/50/255 for environments of 10/100/3600/8600 respectively. As soon as your phone detects an environment of 100 or more, your brightness levels will become 8/23/50/255, meaning you will have the exact same settings as I suggested above. It will stay this way until your screen turns back off.
> 
> This is good for anyone who thinks that a brightness of 8 is too much for them in a pitch black room, but who doen't want to decrease it at risk of having it be too low for a dimly lit room. However, the option also has a distinct disadvantage: if you want your brightness level to be 8 in a dimly lit room, your phone must first detect an environment of 100 or higher, otherwise you will get a brightness level of 2 in that room. Put simply, if you turn on your screen in a dimly lit room, you'll get a brightness of 2, which is too dim. You'll have to go into an environment of 100 or higher, then back to the dimly lit room to get a brightness of 8. Additionally, if you travel into a pitch black room from an environment of 100 or higher, you will not get a brightness of 2 (it'll be at 8) unless you turn the screen off and then back on again.
> 
> If this sounds like what you want, then make "Decrease Hysteresis: 10%" and set your levels to look like this:
> 
> Lower::::Upper:::::Screen:::Buttons
> 0............10............2............255
> 11..........99............8............255
> 100........3599.......23..........255
> 3600......8599.......50..........0
> 8600......infinity.....255........0
> 
> Let me know if you have questions.


Hi, I'm the OP of the thread you did the comparison to. Thanks for doing that comparison. Good information.


----------



## Draexo

If I am using the four suggested levels in the OP should I have hystersis off??


----------



## Lopedog

Draexo said:


> If I am using the four suggested levels in the OP should I have hystersis off??


The answer to your question is yes. But you should read the OP it tells you.


----------



## destinydmm

HAs this been updated for the MIUI4DX w/ Defy base? B/C Now it will only let you select a min of 5 slots. How would we adjust the brightness for the new base? Or is it already set accordingly?


----------



## LVracerGT

I have 1.10.21 flashed and when I go to set custom values for the 4 slots the second number in each slot is greyed out and won't allow me to change them. Anyone know why or how to fix it?


----------



## mwaters33

LVracerGT said:


> I have 1.10.21 flashed and when I go to set custom values for the 4 slots the second number in each slot is greyed out and won't allow me to change them. Anyone know why or how to fix it?


It automatically changes based on what you enter into the other slots


----------



## ssethv

Also, I am having trouble setting the right rosie button to take you directly to sms... Everytime I try to do it and then press the button a just says error

Sent from my ADR6400L using Tapatalk


----------



## LVracerGT

Got it. Thanks.


----------



## Dshoe

I'm on CM7 1/28 and I can't get Option 2 working, which makes me mad because I had it working on an older build. I have everything set up right but when I go from an environment of 100 to a darker area, it should go to the second level instead of the first, yet it goes to the first. My decrease hythesis set at 10% I made sure. Any insight?


----------



## mr_brady

I'm using the "Option 2" on the latest RevNumbers/ImaComputa CM7 install. Is this still recommended?

Does this use more CPU/Battery because the light sensor is monitoring/adjusting?


----------



## radiok

mr_brady said:


> I'm using the "Option 2" on the latest RevNumbers/ImaComputa CM7 install. Is this still recommended?
> 
> Does this use more CPU/Battery because the light sensor is monitoring/adjusting?


Just for the sake of reviving this ancient thread, nothing has changed in the latest RevNumbers/ImaComputa CM7 builds (BTW, CM4DX-GB is a good overall name for this ROM) in regard to the light sensor, the Droid X has 4 levels and not much is ever going to change that. We could play with that information endlessly, but if you are happy with the settings than that's the way you should keep them. Regardless, I think the light sensor pays for itself battery-wise. If you were to manually toggle the light, more often than not you would probably forget to turn it down. With the light sensor handling this chore for you you'll get the best bang for your buck IMO.


----------

