PINE64
Proximity sensor is oversensitive (was "Screen blanks when making call") - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Proximity sensor is oversensitive (was "Screen blanks when making call") (/showthread.php?tid=17073)



Proximity sensor is oversensitive (was "Screen blanks when making call") - treebeard - 07-28-2022

After I place a call (by clicking the call button in the contacts list or in the recent calls list) the display blanks.  The only way to get the display back so I can press the speaker button or access the dial pad seems to be to press the power button twice - the first time to lock the phone and the second to get the unlock screen.  Still, the display will sometimes blank again after a couple seconds.  Another aspect to this is that when I'm dialing the Calls screen has a white background with white buttons and after unlocking the Calls screen has a black background and black buttons.

Using up-to-date Mobian Bookworm but this behavior has been going on for quite a while.  Does anyone else see this?


RE: Screen blanks when making a call - jsch - 07-29-2022

I had a similar issue, caused by the proximity sensor.
Can you please check what
Code:
grep . /sys/bus/iio/devices/iio\:device*/in_proximity_{nearlevel,raw}

provides.
In my case it helped to peel of the screen protector (before raw was always above 25, whereas 15 and above indicate "phone is placed near the ear -- blank screen").


RE: Screen blanks when making a call - treebeard - 07-29-2022

(07-29-2022, 02:02 AM)jsch Wrote: I had a similar issue, caused by the proximity sensor.
Can you please check what
Code:
grep . /sys/bus/iio/devices/iio\:device*/in_proximity_{nearlevel,raw}

provides.
In my case it helped to peel of the screen protector (before raw was always above 25, whereas 15 and above indicate "phone is placed near the ear -- blank screen").

I forgot about the proximity sensor!

$ grep . /sys/bus/iio/devices/iio\:device*/in_proximity_{nearlevel,raw}
/sys/bus/iio/devices/iio:device0/in_proximity_nearlevel:15
/sys/bus/iio/devices/iio:device0/in_proximity_raw:17

That's with the phone face-up on a desk and me a couple feet away.  If I put my hand over the phone at varying distances the raw value ranged from 19 to 408.  I hate to lose the screen protector.  I tried echoing a new value into in_proximity_nearlevel but kept getting "permssion denied" so I'm searching for info on tweaking that.


RE: Screen blanks when making a call - treebeard - 07-29-2022

(07-29-2022, 06:39 AM)treebeard Wrote: I tried echoing a new value into in_proximity_nearlevel but kept getting "permssion denied" so I'm searching for info on tweaking that.

No luck yet on tweaking proximity parameters but cleaning the fingerprints and gunk off my screen helped a lot!  Mobian apparently used to have a /etc/udev/rules.d/10-proximity.rules so if I find one of those it might provide some insight.

I did find that one can temporarily disable the proximity sensor (and ambient light level detection?) with "sudo rmmod stk3310" and do it permanently by adding that module to /etc/modprobe.d/proximity.conf.


RE: Screen blanks when making a call - treebeard - 07-30-2022

(07-29-2022, 08:27 AM)treebeard Wrote: No luck yet on tweaking proximity parameters but cleaning the fingerprints and gunk off my screen helped a lot!  Mobian apparently used to have a /etc/udev/rules.d/10-proximity.rules so if I find one of those it might provide some insight.

I did find that one can temporarily disable the proximity sensor (and ambient light level detection?) with "sudo rmmod stk3310" and do it permanently by adding that module to /etc/modprobe.d/proximity.conf.

I filed an issue with Mobian if anyone wants to follow it over there.


RE: Proximity sensor is oversensitive (was "Screen blanks when making call") - treebeard - 08-02-2022

I was apparently successful in finding a way to adjust the sensitivity and others have shown ways of determining a suitable configuration and testing its operation.  See Mobian issue 446.


RE: Proximity sensor is oversensitive (was "Screen blanks when making call") - baptx - 08-05-2024

Disabling the proximity sensor by adding "blacklist stk3310" (without quotes) to a file like /etc/modprobe.d/blacklist.conf fixed the issue. I will also have a look to change the sensitivity of the proximity sensor but I am not sure I need it since I always use the loudspeaker for phone calls and without loudspeaker the sound is very low (https://www.reddit.com/r/pinephone/comments/nkq2ox/call_quality/). If we don't use the proximity sensor, we can lock the screen manually during a call to save battery.
My previous smartphone (Jolla) had a screen protector with a hole for the proximity sensor, it would have been a good idea to have a screen protector like that for the PinePhone also.
I also had many other issues with voice calls: https://forum.pine64.org/showthread.php?tid=16930&pid=122436#pid122436