I noticed that the screen of my Librem 5 with Crimson does not switch of the screen when I hold the phone at my ear during a phone call. I forgot now if this is also the case in Byzantium.
Does the screen of the Librem 5 switch off when holding the Librem 5 at your ear during a phone call in Byzantium?
monitor-sensor gives a binary value as used by Phosh.
/sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060/iio:device0/in_proximity_raw gives the raw value from the sensor (which is compared to in_proximity_nearlevel to get the binary value).
Try monitor-sensor, and move your hand near the sensor (by the top speaker). You should see the proximity value change to 1 when something is near and 0 otherwise.
If this works, stop here, we need to walk up the software stack to see whatâs going on.
Otherwise, then try watch -n 0.2 cat /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060/iio:device0/in_proximity_raw and see if the value changes with your hand near the sensor.
My phone just now is pretty consistently >45 when very close, and less when farther. It drops off very quickly, the ânear levelâ is 7 which is about 2-3 cm away.
Next I did a reboot, and now the in_proximity_raw file is missing:
purism@crimson:~$ ls -sla /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060/iio:device0/in_proximity_raw
ls: cannot access '/sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060/iio:device0/in_proximity_raw': No such file or directory
So the problem is device specific. Note that initially there was a in_proximity_raw file (from the 5th of January, after reboot it disappeared).
Then I checked the /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060 directory:
purism@crimson:~$ ls -sla /sys/devices/platform/soc@0/30800000.bus/30a30000.i2c/i2c-1/1-0060
total 0
0 drwxr-xr-x 3 root root 0 Jan 9 08:28 .
0 drwxr-xr-x 9 root root 0 Jan 9 08:28 ..
0 -r--r--r-- 1 root root 4096 Jan 9 08:37 modalias
0 -r--r--r-- 1 root root 4096 Jan 9 08:29 name
0 lrwxrwxrwx 1 root root 0 Jan 9 08:37 of_node -> ../../../../../../../firmware/devicetree/base/soc@0/bus@30800000/i2c@30a30000/prox@60
0 drwxr-xr-x 2 root root 0 Jan 9 08:37 power
0 lrwxrwxrwx 1 root root 0 Jan 9 08:28 subsystem -> ../../../../../../../bus/i2c
0 lrwxrwxrwx 1 root root 0 Jan 9 08:37 supplier:platform:30220000.gpio -> ../../../../../../virtual/devlink/platform:30220000.gpio--i2c:1-0060
0 lrwxrwxrwx 1 root root 0 Jan 9 08:37 supplier:platform:30330000.pinctrl -> ../../../../../../virtual/devlink/platform:30330000.pinctrl--i2c:1-0060
0 -rw-r--r-- 1 root root 4096 Jan 9 08:28 uevent
0 -r--r--r-- 1 root root 4096 Jan 9 08:37 waiting_for_supplier
Note that there is no iio:device0 directory, but there is a waiting_for_supplier file. Also some other links or directories are missing compared to my working Librem 5 (driver, trigger0).
What do you think, is this a software or a hardware issue?