Ask / Submit
14

Any workaround for malfunctioning proximity sensor (XA2)?

Tracked by Jolla

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

Daniel.T gravatar image

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

JSE 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

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
1

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

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.

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

4 Answers

Sort by » oldest newest most voted
7

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

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 :)

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

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
1

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

JSE 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

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
-1

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

JSE gravatar image

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

edit flag offensive delete publish link more

Comments

4

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
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

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

Seen: 820 times

Last updated: Dec 05