We have moved to a new Sailfish OS Forum. Please start new discussions there.
48

Any workaround for malfunctioning proximity sensor (XA2)?

Tracked by Jolla (In release)

asked 2018-11-14 16:00:13 +0200

Daniel.T gravatar image

updated 2018-12-03 21:18:39 +0200

JSEHV gravatar image

Ok, in the release notes for Sailfish X Jolla wrote for XA2-specific issues: "Display blanking is unstable during phonecalls or alarms (due to proximity sensor)." Unfortunately, in my case that means: as soon as I initiate or answer a phone call, the display gets blanked and I can't interact in any way. No obvious way to hang up. Do you experience the same problem? Is there any way to hang up with a dark display? At the moment I can't make use of one of the core functions of a phone: making phone calls ;)

EDIT: CSD tool shows that the sensor itself is working correctly

edit retag flag offensive close delete

Comments

1

Display is unresponsive using Clock, one can´t swipe the snooze function. Anyone else has same issue? I´m using SFOS X on XA2.

MyShipMyRulez ( 2018-11-14 17:30:42 +0200 )edit

I have had once problem with proximity Sensor, I guess. I made a call and when I finished call and tried to end call, screen was black and phone call was still going on. When I pushed power button, flashed screen normal and went immediately black again. I had to forced to shutdown phone.

tomjooonas ( 2018-11-14 21:16:17 +0200 )edit
4

I have the exact opposite as a problem: CSD tool shows that my proximity sensor is uncovered all the time. Putting my finger on the sensor bar above the display does not change the state of the sensor at all. During calls the display does not turn off and I accidentally hold calls or call other people with my cheek touching the display.

Edit: Restarting the phone fixed the problem. Oh the wonders a restart can do...

laubblaeser ( 2018-11-15 15:09:17 +0200 )edit
1

I have indeed issues when calling on the Xperia XA2 Plus. During the call the screen goes black, but when I want to use the keypad or end the call, the screen won't return to the visible state. It stays black.

When trying to wake up the screen by pressing the power button, the screen flashes quickly, but goes as fast as it came back to black. The only way to end the call is when the other end hangs up or when I keep pressing the power button to power down the device.

I used the CSD tool (by dialling ##310##) and checked the proximity sensor. It passed perfectly.

JSEHV ( 2018-12-03 21:16:30 +0200 )edit
1

I have this problem too with my XA2 (3.0.8 and now 3.0.11). This seems to be worse if have the phone with me outside where there minus degrees (celsius) even if the phone is inside the pocket where the temperature still is propably about +-0 celsius. Could be timeing issue of course so I can try the MCE tool tip.

2kanaa ( 2019-01-19 15:39:48 +0200 )edit

9 Answers

Sort by » oldest newest most voted
28

answered 2018-12-05 01:08:09 +0200

lethe gravatar image

updated 2018-12-05 03:16:24 +0200

On my XA2 (H4113), the proximity sensor works ok on device startup, but fails after a couple of hours (stuck in uncovered state).

I figured out that restarting sensorfwd will save me the hassle of rebooting the phone to get the proximity sensor working again. You can do this on using the terminal (developer mode required for devel-su):

$ devel-su systemctl restart sensorfwd

On my XA2, I automated this task to run every hour using a systemd timer, this is a dirty hack, but will hopefully fix the issue.

To do so, create a new file /etc/systemd/system/proximity-fix.timer (root required)

[Unit]
Description=Restart sensorfwd to fix proximity sensor

[Timer]
OnActiveSec=1h
OnUnitActiveSec=1h 

[Install]
WantedBy=timers.target

Create another file /etc/systemd/system/proximity-fix.service

[Unit]
Description=Restart sensorfwd to fix proximity sensor

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart sensorfwd

And finally, enable the timer:

# systemctl enable proximity-fix.timer
# systemctl start proximity-fix.timer
edit flag offensive delete publish link more

Comments

That's a cool workaround @lethe. :-) I'll try this one out. Thanx

FrankSiebert ( 2018-12-05 02:17:25 +0200 )edit

Thank you very much! Seems like a nice workaround. I'll try it, as triple press is sometimes a little tricky and not always helpful...

I hope I'll remember to revert it once Jolla has fixed the problem...

Daniel.T ( 2018-12-10 07:19:18 +0200 )edit

I have tried it and unfortunately it doesn't work reliably. Is this run as root? If I issue the systemctl restart sensorfwd, I have to do it with devel-su. A manual restart solves the problem temporarily. Is there any way to check whether the systemd timer works as expected?

Daniel.T ( 2018-12-16 11:32:18 +0200 )edit
1

One option to look whether the timer is scheduled:

systemctl list-timers --all | less

Looked not too good when I checked on my phone. I added to the timer file a line

OnBootSec=1min

After Reboot the timer is now listed with datetime entry for NEXT run. No Idea whether this will now give a stable result.

FrankSiebert ( 2018-12-16 13:46:29 +0200 )edit

Unfortunately, it doesn't run, if I interpret the output of systemctl list-timers --all correctly:

[nemo@Sailfish ~]$ systemctl list-timers --all NEXT LEFT LAST PASSED
UNIT ACTIVATES n/a n/a n/a n/a
proximity-fix.timer proximity-fix.servic e

@lethe, is this the expected behaviour or am I doing something wrong?

Daniel.T ( 2018-12-16 20:33:02 +0200 )edit
13

answered 2019-04-11 08:56:13 +0200

jovirkku gravatar image

The upcoming OS release 3.0.3 has this issue fixed. This update should roll out to all of you in early May, at the latest.

While using OS version 3.0.2, press the Power key three (3) times in a quick sequence if the display of your XA2 turns black during a phone call.

edit flag offensive delete publish link more

Comments

@jovirkku Swell!

Kopekenscheich ( 2019-04-11 09:22:10 +0200 )edit

Very nice to see progress in this important field! Thank you very much for your work on this! Looking forward to the update :)

Daniel.T ( 2019-04-11 09:26:31 +0200 )edit
2

Are there any plans to release such patches as small hotfixes in the future? It's a crucial feature of modern phones and I think this would warrant the deployment of a hotfix.

laubblaeser ( 2019-04-11 12:01:06 +0200 )edit

I just installed SFOS on a brand new XA2 today. I tested the phone with Android 8 before installing SFOS. The proximity sensor was total garbage on Android. I was fumbling on the phone buttons all the time while making a test call.

So, it may well be that this is not a Jolla problem.

Pirkka ( 2019-05-05 22:25:50 +0200 )edit
1

@Pirkka This may be a problem with your specific phone. Remember to regularly clean the display area around the proximity sensor (left of front camera). The prox sensor of my XA2 is working flawlessly both on stock android 8 and 9 as well as on LineageOS 16. There have only ever been problems with it on SFOS which in my opinion directly points towards a software issue with SFOS.

laubblaeser ( 2019-05-06 13:26:23 +0200 )edit
10

answered 2018-11-14 22:18:38 +0200

spiiroin gravatar image

Occasionally misbehaving proximity sensor: Do triple power key press -> proximity sensor is ignored until it starts reporting changes again (e.g. when call starts ringing but display does not come up).

More or less permanently misbehaving proximity sensor: Tell mce service not to utilize it by executing from command line:

mcetool --set-ps-mode=disabled

For some more details, see: https://together.jolla.com/question/135055/screen-turns-black-unresponsive-when-calling/

edit flag offensive delete publish link more

Comments

I guess the triple power key press is the workaround I was asking for, but if the problem persists, I will try it the mce-way, thank you!

As the proximity sensor itself seems to be OK (according to CSD tool): is this problem something that can/will be solved in an upcoming update?

Daniel.T ( 2018-11-15 04:52:27 +0200 )edit
1

I hope indeed they will solve it with a future software update, as it doesn't look to me as a hardware malfunction when the CSD tool test passes for the proximity sensor.

And I certainly like this sensor, so I don't want to disable it permanently :)

JSEHV ( 2018-12-03 21:21:58 +0200 )edit

The triple power key is the workaround I use.
I was using it also on my old Jolla 1 with broken screen near the proximity sensor.

VincentB ( 2019-02-20 21:00:49 +0200 )edit

triple power push don't work with my xa2 plus

cemoi71 ( 2019-04-02 00:00:26 +0200 )edit
5

answered 2019-03-04 16:47:54 +0200

thewas gravatar image

updated 2019-03-04 17:10:30 +0200

I'm using my XA2 as bought (android 8.xxx) while waiting for a more stable SFOSX version to install. I'm having big issues with the XA2 proximity sensor (the issues you are describing here) without SF. May be a Sony issue?

Edit: from Sony forums actually looks like a firmware/software issue...

edit flag offensive delete publish link more

Comments

1

Maybe that is indeed a driver problem already on Sony'y side and would explain why it is hard to fix for Jolla

AkiBerlin ( 2019-03-04 17:27:23 +0200 )edit
3

answered 2018-12-04 14:56:30 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-12-04 20:30:59 +0200

JSEHV gravatar image

The below command sequence makes the proximity sensor work again.

I did not yet check whether the second line alone will do the trick as well. A workaround could be a time triggered service running above command lines once an hour or so.

mcetool --set-ps-mode=disabled
mcetool --set-ps-mode=enabled
edit flag offensive delete publish link more

Comments

You could comment on the already accepted answer by @spiiroin, instead of adding a new answer.

addydon ( 2018-12-04 17:11:02 +0200 )edit

I considered that option, especially since the information from @spiiroin was very helpful in the discovery of the alternative workaround. Thanx

FrankSiebert ( 2018-12-04 17:44:04 +0200 )edit
1

Actually, the fact that toggling mce's proximity sensor use off and back on does something useful is interesting.

Normally in sfos mce is the only thing that uses / tracks proximity sensor state -> sfos sensorfwd enables/disables the sensor based on mce's needs -> a "toggle off, toggle on" at mce causes sensorfwd to power cycle the sensor via android hal.

And android hal is not really designed with multiple concurrent users in mind, so... If there were some other process in addition to sfos sensorfwd controlling the sensors via hal, it could cause situation where sensorfwd thinks the sensor is powered on, but actually it is powered off -> As far as the sfos sensor stack is considered, the sensor would get stuck to whatever the last seen value would be.

spiiroin ( 2018-12-05 09:32:47 +0200 )edit

Hello @spiiroin I understand: Probably a malicious process powers the proximity sensor off, bypassing sensorfwd and mce. Sonsorfwd keeps then thinking that the sensor is still on. As you mention android-hal, it might be a helpful information that I use the free/trial version.

FrankSiebert ( 2018-12-05 10:27:55 +0200 )edit

@spiiroin interesting explanations, "multiple concurrent users in mind" "some other process in addition to sfos sensorfwd" or an not clean usage of it, or maybe an not clear interface usage and is not stable because not well understood...

cemoi71 ( 2019-04-02 00:10:52 +0200 )edit
1

answered 2019-02-19 16:26:42 +0200

kauzimaeki gravatar image

I have a XA2 with SFOS V. 3.0.1.14 and the behaviour of the proximity sensor is like above explained. I didn't use the discussed workarounds because its just a temporarily solution. I hope with the next update all will be fine again.

edit flag offensive delete publish link more

Comments

still a problem in 3.0.2.8

donni106 ( 2019-03-29 21:33:54 +0200 )edit

not an answer but an observation, please do as remark

cemoi71 ( 2019-04-02 00:05:15 +0200 )edit
1

answered 2019-04-11 11:27:03 +0200

ExPLIT gravatar image

The Problem is fixed in 3.0.3.x (Not out yet). So keep calm and pkcon refresh :)

edit flag offensive delete publish link more

Comments

Aha, nice. Then we wait for next update... ...and the next update... ... ;-)

011011010110101001100001 ( 2019-04-11 11:56:58 +0200 )edit
1

Well the proximity issue actually has not been fixed in SFOS 3.0.3.8 but just a workaround has been introduced:

https://together.jolla.com/question/204443/3038-glance-screen-low-power-mode-no-longer-activated-on-xperia-xa2/?answer=204460#post-id-204460

Alex ( 2019-04-25 10:55:14 +0200 )edit

@Alex correct from spiiroin told, the sensor interface is in blackbox in lower level. no good visibility on how it is used

cemoi71 ( 2019-04-25 12:38:55 +0200 )edit
0

answered 2020-02-22 14:01:15 +0200

mosen gravatar image

Looking for help to debug this proximity sensor issue on my Pro¹ running the community port with all packages updated to 3.2.1.20.

The strange thing is @Kabouik, a fellow user at Discord, reports no issue with the supposed same setup.

In one sentence, during a call it is not possible to switch the screen back on other than using the triple power button trick. Expected behaviour is to wake screen as soon as the proximity sensor is uncovered.

  1. Sensor is confirmed to be working in any state in CSD tool. I tried during active calls even.
  2. Tried to restart sensorfwd to no effect. Also tried during active call.
  3. Disabling the sensor via mce-tools sure works, but enabling it back leads to same behaviour.

Did i miss any of the suggested workarounds? Which packages are related and might be worth to try reinstalling/reinitializing (how to?) Anything i could compare with Kabouiks setup since all is working on his side?

Last resort would be to backup and try a fresh install but i want to push that option back as long as possible

edit flag offensive delete publish link more

Comments

1

You can try: mcetool --set-ps-on-demand=enabled

It will make the phone feel slower (when interacting with it.)

ApB ( 2020-02-22 18:13:26 +0200 )edit

Thanks for the suggestion! But sadly all that changes is that i can now sometimes activate the screen with only one click on Power button. Sometimes it still only flashes up and gets shut off like before tho.

mosen ( 2020-02-22 18:59:28 +0200 )edit

Ok, my bad. After finally rebooting my proximity sensor works now. My guess is your advice @ApB fixed it since i only tried without reboot afterwards. Thanks again!

mosen ( 2020-02-25 12:28:29 +0200 )edit

@mosen i don't remember it needing a reboot but anyways. And afai remember its persistent across reboots. Has its drawbacks but at least you can answer calls and stuff.

ApB ( 2020-02-25 22:05:57 +0200 )edit
-2

answered 2018-11-14 19:24:16 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-12-04 20:30:49 +0200

JSEHV gravatar image

with me the same, brightness sensor does not respond, but battery is better now.

edit flag offensive delete publish link more

Comments

8

thats no answer. Sorry, but its well known, that there is a problem. If you want to say "here too", than please upvote the question simply.

mettska ( 2018-11-14 22:53:36 +0200 )edit
1

i join mettska, that's an observation, then use it as remark please

cemoi71 ( 2019-04-02 00:04:24 +0200 )edit
Login/Signup to Answer

Question tools

Follow
20 followers

Stats

Asked: 2018-11-14 16:00:13 +0200

Seen: 7,369 times

Last updated: Feb 22 '20