Proximity sensor misbehaving
From thread: https://forum.pine64.org/showthread.php?tid=9016&pid=63732#pid63732
After booting and phosh loads, proximity sensor is triggered and screen fades to black. The user can unlock the phone and will only be greeted with a black screen. Video demonstration: https://gfycat.com/gargantuanbravebluemorphobutterfly
We tried removal of /etc/udev/rules.d/10-proximity.rules as a workaround first. This is done by mounting the SD card or exposing the eMMC via JumpDrive.
Then boot the system, and check the proximity sensor values in sysfs by holding hand at various distances away from screen while running "sudo cat /sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-0048/iio:device1/in_proximity_raw". My readings were:
distance | value |
---|---|
0cm: | over 3000 |
1cm: | 2500-2700 |
2cm: | ~2400-2450 |
3cm: | 2400 |
5cm: | ~2375-2380 |
10cm: | ~2360-2365 |
No hand, phone comfortable distance from my face (~30cm?) while looking at it: | 2360 |
Phone on flat surface, nothing near it: | 2300-2400 |
As for the other in_proximity_* files (dev said: "distance doesn't matter here, don't bother checking the values multiple times, once will be enough") the values in my system (sudo ls /sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-0048/iio:device1/in_proximity_* ; sudo cat /sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-0048/iio:device1/in_proximity_*) are:
variable | value |
---|---|
in_proximity_integration_time: | 0.000370 |
in_proximity_integration_time_available: | 0.000185 0.000370 0.000741 0.001480 0.002960 0.005920 0.011840 0.023680 0.047360 0.005920 0.011840 0.023680 0.047360 0.094720 0.189440 0.378880 0.757760 1.515520 3.031040 6.062080 |
in_proximity_raw: | 2308 |
in_proximity_scale: | 0.100000 |
in_proximity_scale_available: | 6.4 1.6 0.4 0.1 |