Question Incorrect operation of the light sensor - OnePlus 9RT

Hello! The light sensor works strangely for me. The display brightness is permanently low. I went to the engineering menu (*#899#) Manual test -> DEVICE DEBUGGING -> LightSensor in the `Parameter` field, the value is 1100. For all, this value is lower. I cannot change this value. I can't get into `FactoryMode` either.
Can someone help and tell me how to calibrate the light sensor?
Hard reset done. Android 12, OxygenOS 12.

Related

[Q] Ambient Light Sensor Limitations??

I haven't been able to find an answer so far to this, so here goes.
I've played around extensively with the Auto-Brightness settings, tweaking to my desires. However, I'm still having problems in lower light conditions. Not a dark environment, mind you, but simply indoors without a light shining directly on the light sensor.
From what I can tell by watching the Sensor readings (under Edit Light sensor levels...), the sensor jumps from a low limit reading of 10 all the way up to 160 without any steps in between. Above that and the level jumps are less of an issue (and in fact, there are more steps). But because of the 10/160 jump, I end up with an "all or nothing" type situation. I can either have a comfortable, dimmer brightness level when it's dark, but have a screen that's too dim under normal conditions; or I can have it comfortably bright under normal use, but overly so in darker situations.
My question, after all of that, is whether this is a hardware limitation or something that could be modified in the code for the sensor?
I am willing to put in some work on this issue if someone can provide some direction on what I need to look at.
Thanks
Do you have the filter option enabled?
nukedukem said:
Do you have the filter option enabled?
Click to expand...
Click to collapse
I do. That shouldn't affect the raw values, though, only the filtered ones to the left of the raw values.
kevinbear said:
I haven't been able to find an answer so far to this, so here goes.
I've played around extensively with the Auto-Brightness settings, tweaking to my desires. However, I'm still having problems in lower light conditions. Not a dark environment, mind you, but simply indoors without a light shining directly on the light sensor.
From what I can tell by watching the Sensor readings (under Edit Light sensor levels...), the sensor jumps from a low limit reading of 10 all the way up to 160 without any steps in between. Above that and the level jumps are less of an issue (and in fact, there are more steps). But because of the 10/160 jump, I end up with an "all or nothing" type situation. I can either have a comfortable, dimmer brightness level when it's dark, but have a screen that's too dim under normal conditions; or I can have it comfortably bright under normal use, but overly so in darker situations.
My question, after all of that, is whether this is a hardware limitation or something that could be modified in the code for the sensor?
I am willing to put in some work on this issue if someone can provide some direction on what I need to look at.
Thanks
Click to expand...
Click to collapse
Yeah, I had this same problem. In general, I just found things were too bright. I've had good luck with these settings:
Sensor Filter: Enabled
Window Length: 20s
Reset Threshold: 1000 lux (any lower and it seems to get triggered too much).
Sample Interval: 2s (Since it's on a 20 second window length, I didn't see the need for super frequent sensor reading)
Use Custom Light Levels: Enabled
Screen Dim Level: 20 (default)
Allow Light Decrease: Enabled
Decrease Hysteresis: 40%
My light levels:
Lo-Up Screen Buttons
0-10 40 255
11-40 50 255
41-90 60 255
91-160 75 255
151-225 85 0
226-320 95 0
321-640 110 0
641-1280 120 0
1281-2600 140 0
2601-3099 160 0
3100-4099 180 0
4100-5099 200 0
5100-6099 220 0
6100-7099 230 0
7100-inf 255 0
Thanks for the response! I will try your settings and see how it works for me.
So were you getting similar raw sensor readings, too?

No button lights

I just noticed my buttons aren't lighting up anymore :/
Mine stay on whenever charging and at all brightness levels... the only way they'll go off is if I put the phone to sleep (click power button).
Anyone know the setting location? I have Cyanogen & ADW launcher. I've seen it before but it's been so long I forgot where they were and can't find them.
Jodsfk421 said:
Anyone know the setting location? I have Cyanogen...
Click to expand...
Click to collapse
Menu > Settings > CM Settings > Display > Automatic Backlight > Edit other levels
Lower / Upper = readings from the light sensor
Screen = the screen brightness you want based on the lower/upper light sensor values
Buttons = whether or not you want the softkeys on. Unfortunately, they cannot be dimmed (hardware limitations, from what I've read), so 255=on and 0=off
In the default configuration, for example, if the sensor value is 0-199, the screen will be set to brightness 25 and the softkeys will be turned on. If the sensor value is >399, notice that the softkeys turn off (button value changes to 0). If you want the buttons on all the time, set all button values as 255. If you're like me, and you hate the softkey lights, set all button values to 0.
THANK YOU! Exactly what I was looking for and clearly explained!

[Q] Proximity sensor is always "On". Can I calibrate it?

Just got my Galaxy S3 a few days ago and today when I answered a call the screen immediately went blank and I could not turn it back on until the caller hung up. I've had other calls prior to today and cannot recall if the phone behaved the same way. I've been searching for a solution and everything points to a faulty proximity sensor. I've worked around the problem by disabling "Auto screen off during calls" under "Call settings". This works but it's not perfect since if I forget to manually turn off the screen I'm likely to press buttons with my face.
Under *#0*# -> Sensor -> Proximity Sensor: The PROXIMITY always reads 1.0. The ADC field increases as I get closer to the proximity sensor but never drops below 1 (should it?). Are PROXIMITY and ADC both readings from the same sensor?
Under *#7353# -> Proximity Sensor: It always says "Working" and vibrates. From the other tests in this menu I assume this is the "On" state and that the correct behavior would be to not vibrate and display a different message when the sensor is "Off" (ie: nothing is close to the sensor).
Several test apps (Android Sensor Box, Proximity Sensor, Sensor Test) also report 0cm or something similar indicating that something is close to the sensor.
Thanks in advance for any help :good:
machx0r said:
Just got my Galaxy S3 a few days ago and today when I answered a call the screen immediately went blank and I could not turn it back on until the caller hung up. I've had other calls prior to today and cannot recall if the phone behaved the same way. I've been searching for a solution and everything points to a faulty proximity sensor. I've worked around the problem by disabling "Auto screen off during calls" under "Call settings". This works but it's not perfect since if I forget to manually turn off the screen I'm likely to press buttons with my face.
Under *#0*# -> Sensor -> Proximity Sensor: The PROXIMITY always reads 1.0. The ADC field increases as I get closer to the proximity sensor but never drops below 1 (should it?). Are PROXIMITY and ADC both readings from the same sensor?
Under *#7353# -> Proximity Sensor: It always says "Working" and vibrates. From the other tests in this menu I assume this is the "On" state and that the correct behavior would be to not vibrate and display a different message when the sensor is "Off" (ie: nothing is close to the sensor).
Several test apps (Android Sensor Box, Proximity Sensor, Sensor Test) also report 0cm or something similar indicating that something is close to the sensor.
Thanks in advance for any help :good:
Click to expand...
Click to collapse
This may be a stupid question, but do you have a case that might be covering the proxy sensor? I'm also assuming you have cleaned the area where the sensor is. Other than that you might be able to take the phone into the Sprint store and get it replaced. If they won't take it back, call up Samsung customer service. If it's a faulty sensor, they might replace the phone free of charge (others have had good experiences with Samsung customer support)
Hope you get it fixed!
topherk said:
This may be a stupid question, but do you have a case that might be covering the proxy sensor? I'm also assuming you have cleaned the area where the sensor is. Other than that you might be able to take the phone into the Sprint store and get it replaced. If they won't take it back, call up Samsung customer service. If it's a faulty sensor, they might replace the phone free of charge (others have had good experiences with Samsung customer support)
Hope you get it fixed!
Click to expand...
Click to collapse
Thanks for the response. No screen protector or case. I did clean the entire screen this morning and the behavior didn't change. Was hoping I wouldn't have to take the phone back but then again if this was a common problem with a simple solution my searching this morning probably would have turned up an answer
machx0r said:
Thanks for the response. No screen protector or case. I did clean the entire screen this morning and the behavior didn't change. Was hoping I wouldn't have to take the phone back but then again if this was a common problem with a simple solution my searching this morning probably would have turned up an answer
Click to expand...
Click to collapse
Lol yeah, this is the first time I've seen anything about this, and I respond to literally almost every thread, or at least read through each one. But like topherk said, its probably a hardware issue. Would you be able to check to see if the "1.0" value is present on another S3? Maybe its a default of some kind (i would check myself, but my S3 took a 4 story dive recently and is out of service)
CNexus said:
Lol yeah, this is the first time I've seen anything about this, and I respond to literally almost every thread, or at least read through each one. But like topherk said, its probably a hardware issue. Would you be able to check to see if the "1.0" value is present on another S3? Maybe its a default of some kind (i would check myself, but my S3 took a 4 story dive recently and is out of service)
Click to expand...
Click to collapse
I don't know anyone else with an S3 but if anyone wants to check their *#0*# -> Sensor screen and tell me what the PROXIMITY and ADC values are when you aren't close to the sensor I'd appreciate it. Maybe I'll hit up the Sprint store and test it on a display model :laugh:
That said the page I discovered the *#0*# menu on has a screenshot and the PROXIMITY is showing 0.0 (I assume he's away from the sensor):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Where as this is mine when I'm away from the sensor:
After digging a little deeper it appears that the G3 uses the same IC (a GP2A from Sharp) for both the proximity and light sensor. From looking at the GP2A kernel module code it appears that the ADC values are from the light sensor output and the PROXIMITY value is from the proximity sensor output (0.0 = nothing within 5CM, 1.0 = something within 5CM). The ADC values definitely change and the interpreted light sensor lux values change when I cover it or shine a flashlight into it.
So now I'm not so sure if it's possible for it to be a hardware issue or if it's a software issue caused by some weird state. Think I'll try a factory reset and see if the situation changes...
machx0r said:
After digging a little deeper it appears that the G3 uses the same IC (a GP2A from Sharp) for both the proximity and light sensor. From looking at the GP2A kernel module code it appears that the ADC values are from the light sensor output and the PROXIMITY value is from the proximity sensor output (0.0 = nothing within 5CM, 1.0 = something within 5CM). The ADC values definitely change and the interpreted light sensor lux values change when I cover it or shine a flashlight into it.
So now I'm not so sure if it's possible for it to be a hardware issue or if it's a software issue caused by some weird state. Think I'll try a factory reset and see if the situation changes...
Click to expand...
Click to collapse
Have you ever installed a flip cover app?
Sent from my SPH-L710 using xda premium
xblackvalorx said:
Have you ever installed a flip cover app?
Click to expand...
Click to collapse
No, pretty standard apps installed and nothing specific to motion or proximity (aside from the handful of test apps I've installed to see what the proximity sensor readings are).
machx0r said:
After digging a little deeper it appears that the G3 uses the same IC (a GP2A from Sharp) for both the proximity and light sensor. From looking at the GP2A kernel module code it appears that the ADC values are from the light sensor output and the PROXIMITY value is from the proximity sensor output (0.0 = nothing within 5CM, 1.0 = something within 5CM). The ADC values definitely change and the interpreted light sensor lux values change when I cover it or shine a flashlight into it.
So now I'm not so sure if it's possible for it to be a hardware issue or if it's a software issue caused by some weird state. Think I'll try a factory reset and see if the situation changes...
Click to expand...
Click to collapse
Interesting...
Lol, i would recommend going to the Sprint store (if its not a hassle) and testing it out with their S3 on display, surefire way of knowing if something got borked with yours
I dont know whether they would charge for this or not, hopefully they dont, but you could also ask the reps to check it over for you and say you've been having some weird behavior with your incoming calls and the screen on/off events
machx0r said:
I don't know anyone else with an S3 but if anyone wants to check their *#0*# -> Sensor screen and tell me what the PROXIMITY and ADC values are when you aren't close to the sensor I'd appreciate it. Maybe I'll hit up the Sprint store and test it on a display model :laugh:
That said the page I discovered the *#0*# menu on has a screenshot and the PROXIMITY is showing 0.0 (I assume he's away from the sensor):
Where as this is mine when I'm away from the sensor:
Click to expand...
Click to collapse
Exactly what's been happening with my Samsung Galaxy Note 2 running stock firmware (rooted) with no screen protector. Been searching the internet for months and tried several proximity screen off apps to no avails. After countless tests and trials I am convinced that the proximity sensor when activated is stuck "near" (PROXIMIY = 1.0 at ADC level <= 12) unless there is bright enough ambient light. If some gurus could shade some lights on how to set the proximity threshold "prox_thresh" to be greater than 12 (say 30) (and that setting will stick after restart) that would be great!
I have the same problem with my brand new TMobile Galaxy Note 2 where proximity sensor does require a lot of ambient light in order to switch the screen on and off during the call. I noticed that the screen protector is part of the problem so I removed it and it helped a bit but not always. I was afraid the sensor is broken itself and requested for replacement phone however I tried the *#0*# combination to test the sensor and found that ADC (analog to digital converter) output changes as I approach the sensor. With no proximity ADC shows value of between 11 and 15 and it is increasing smoothly to 140 as I move closer and furthermore reaches 190 as I press my finger against the screen. So the proximity sensor hardware actually works just fine it is the software layer including driver that possibly creates a problem which results in Proximity value being always equal 1.0 despite of ADC output precisely following the actual proximity. Several applications available call play market follows the Proximity value therefore making sensor based ofperation difficult or useless. I hope that upcoming system update will address the flaw making sensor based functions to work finally as they should.
Sent from my SGH-T889 using Tapatalk 2
Galaxy S3 proximity sensor replacement
Same issue here. A few things that may be of interest. My issue did not start after an update, it just started happening out of the blue. It is not because of being dirty or a because of a case. When I get into the diagnostic screen, the proximity sensor reads 0 and then goes to 1 when you get in proximity. It then stays at 1 and won't go back to 0. The ADA changes values, apparently correctly. The one thing that I thought was interesting, if I flash a bright LED flashlight on it, it does go back to zero. It is almost like it is not as sensitive to light all the sudden. This light trick works no matter how far away the light is. I am thinking the sensor is going bad.
I see several options to replace it on eBay, I changed out the screen last year, so I know how to change out the front camera and sensor. The only OEM ones I see are used or from China. Has anyone ever tried any of these, OEM or otherwise? They are cheap, I think I will give it a shot.
SOLVED
Just a heads up, I fixed my problem with a new front facing camera and sensor off of ebay. It took less than 10 minutes to put it in and it works great now. It was $5.99 shipped.
try this
esdwa said:
I have the same problem with my brand new TMobile Galaxy Note 2 where proximity sensor does require a lot of ambient light in order to switch the screen on and off during the call. I noticed that the screen protector is part of the problem so I removed it and it helped a bit but not always. I was afraid the sensor is broken itself and requested for replacement phone however I tried the *#0*# combination to test the sensor and found that ADC (analog to digital converter) output changes as I approach the sensor. With no proximity ADC shows value of between 11 and 15 and it is increasing smoothly to 140 as I move closer and furthermore reaches 190 as I press my finger against the screen. So the proximity sensor hardware actually works just fine it is the software layer including driver that possibly creates a problem which results in Proximity value being always equal 1.0 despite of ADC output precisely following the actual proximity. Several applications available call play market follows the Proximity value therefore making sensor based ofperation difficult or useless. I hope that upcoming system update will address the flaw making sensor based functions to work finally as they should.
Sent from my SGH-T889 using Tapatalk 2
Click to expand...
Click to collapse
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissionsn Android Terminal App or adb shell do:Code:$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_calThe zero resets the actual calibration offset.The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).*The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.You can check the running config by:Code:$ cat /sys/class/sensors/proximity_sensor/stateThe first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.*
This work on the first try for me try it and c if it help u
I can now stop pulling out my hair...
Gryncc said:
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissionsn Android Terminal App or adb shell do:Code:$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_calThe zero resets the actual calibration offset.The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).*The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.You can check the running config by:Code:$ cat /sys/class/sensors/proximity_sensor/stateThe first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.*
This work on the first try for me try it and c if it help u
Click to expand...
Click to collapse
Worked like a charm! Original values were evidently not properly calibrated, but the above approach reset the values such that the display now switches off (in phone calls) at approximately 8 cm, and following hang up, immediately powers on.
Thank you
Gryncc said:
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissionsn Android Terminal App or adb shell do:Code:$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_calThe zero resets the actual calibration offset.The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).*The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.You can check the running config by:Code:$ cat /sys/class/sensors/proximity_sensor/stateThe first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.*
This work on the first try for me try it and c if it help u
Click to expand...
Click to collapse
sea2summit said:
Worked like a charm! Original values were evidently not properly calibrated, but the above approach reset the values such that the display now switches off (in phone calls) at approximately 8 cm, and following hang up, immediately powers on.
Thank you
Click to expand...
Click to collapse
God, i've been looking for that information for dozens of years (felt this way at least).
And i find it the day i put my phone back to stock for an RMA !
I went back to root, and tried those lines in the ROM Toolbox Pro's terminal, it says " can't create /sys/class etc. permission denied", what's wrong please guyz ?? I tried several ways to re root, root checker says "status : rooted, ID : uid=0(root) gid=0(root), SuperUser (can't find), BusyBox : /system/xbin/busybox, Su : /system/xbin/su => maybe that's the issue, am i badly rooted ?
Isn't there a no root solution, a very simple way to calibrate ? While looking for a solution, I heard about Als-Ps calibration, doesn't it exist on the N7100 ?
Any help would be very appreciated.
EDIT : OK, i typed "su" to get the terminal to get the SU request, and typed the command, rebooted the phone : the issue's still there.
I'm a noob to Android Terminal, so i tried putting
do:Code:$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
into it, but it didn't work, then i tried
"$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal"
and it didn't work, so i had to remove the first "$" to get it to work
(so it looks like "su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal")
Am I doing something wrong ?
Gryncc said:
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissionsn Android Terminal App or adb shell do:Code:$ su $ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal $ echo 1 > /sys/class/sensors/proximity_sensor/prox_calThe zero resets the actual calibration offset.The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).*The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.You can check the running config by:Code:$ cat /sys/class/sensors/proximity_sensor/stateThe first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.*
This work on the first try for me try it and c if it help u
Click to expand...
Click to collapse
Thank you Gryncc!!! it worked for me in im i9500. I did it with ADB Shell... the comands where...
su
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
the 0 did nothing, so I tried 1 and after reset, the sensor worked again!
Regards,
Julián
julianbl said:
Thank you Gryncc!!! it worked for me in im i9500. I did it with ADB Shell... the comands where...
su
echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
the 0 did nothing, so I tried 1 and after reset, the sensor worked again!
Regards,
Julián
Click to expand...
Click to collapse
can u post a screen shot for commands to be used.
a video will be most appreciable,,
This is how it looks like,
2 separate commands, echo 0 = reset, echo 1 = calibrate
For me it worked till i restarted device.
Gonna send it in for repair now.
Yes it works on note 2 even.but how to stop it going away after restart any thing permanent? ??

(Q) How to Check if Ambient Light Sensor is working?

Hi Guys I just wanted to know if Ambient Light Sensor is working or Not, As I have enabled Developer Options and in that when I press Manufacturer Tab then I see the Hardware Testing.
When I press Ambient Light Sensor it shows 0.0 , is it same for everyone or just me?
Also How can I test that Ambient Light Sensor is working or not?
Thanks and Regards
abbychauhan said:
Hi Guys I just wanted to know if Ambient Light Sensor is working or Not, As I have enabled Developer Options and in that when I press Manufacturer Tab then I see the Hardware Testing.
When I press Ambient Light Sensor it shows 0.0 , is it same for everyone or just me?
Also How can I test that Ambient Light Sensor is working or not?
Thanks and Regards
Click to expand...
Click to collapse
It's highly directional. If you're in a dim room, it will sit at zero until you aim it at a light. It's not very sensitive in low light, but past some threshold it will jump up. If you can't get it to change when you shine a light on it, I think you've got a problem.
Working for me in my office ...depending on whether I cover the light/lamp or not the ambient light sensor reading is changing...even when I just tilt the watch a bit....I am on 5.0.2...never checked before...

Broken touchscreen - change brightness?

Hello all,
My baby son managed to damage the flat cable going to touchscreen and ambient light sensor (don't ask how, watch was on my hand) and now touchscreen and light sensor are not working.
Brightness is on low setting and I can't change it.
Is there any way to change the brightness via phone?
I would like to set it to higher level to be able to see anything during the day, until I get a new screen.
I've tried "Watch Display Brightness" app but it's not working. I think that issue is that brightness is not set to manual mode and that's why this app gives no results.
Thanks!

Categories

Resources