ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 110 forks source link

FP3: Screen blinking during call #1902

Open nalysius opened 2 years ago

nalysius commented 2 years ago

Steps to reproduce

  1. Make a call
  2. Put the phone near of the ear

Expected behavior

The screen should turn off while the phone is near of the head.

Actual behavior

The screen blinks, it switches between on and off. It stops when the call is terminated, but sometimes with a delay between the end of the call and the end of the blinking.

Notes

  1. Blinking seems to be caused by the moves in front of the proximity sensor of phone. I tested to put the phone on a table and cover the phone with a notebook. If I don't move it at all the screen stay turned on (wrong behaviour) but when I move it the screen blinks until I stop moving it, still with a delay between the end of the moves and the end of the blinking.
  2. My impression is the delay between the end of the moves and the end of the blinking depends on the "number" of moves. If I move the notebook fast, even during a short time, the delay is way longer.
  3. I don't know if the problem exists on OTA-20 because I installed OTA-20 only some days ago, didn't make any calls, and then updated to OTA-21. But it worked on Android.
luksus42 commented 2 years ago

I know this issue, but I don't know the reason for it yet. It works (after reboot) for some time and some calls, and at some point it stops working and starts blinking.

It is not related with latest OTA.

Are you using waydroid?

nalysius commented 2 years ago

Ok, good if it is known. Let me know if I can help with testing. Yes I am using Waydroid.

luksus42 commented 2 years ago

So my theory is, maybe waydroid is confusing some sensors... for example the autobrightness also sometimes stops working, though it is the same sensor I guess.

Maybe you could observe, if there is a connection to waydroid or not.

nalysius commented 2 years ago

The Phone application is outside of Waydroid, why do you think it's related? I had this problem before installing Waydroid at first, so I guess it does not depends on Waydroid.

luksus42 commented 2 years ago

Because it is the proximity hardware sensor which is failing, not the phone app. And waydroid makes use of the same hardware directly.

But yes, it maybe unrelated. Maybe, the proximity sensor works for some time after the last reboot and occasionally starts to fail at some point, because of some other unknown reason.

nalysius commented 2 years ago

Ok, I understand. Does trying with another application using the proximity sensor reproduce the problem?

luksus42 commented 2 years ago

Does trying with another application using the proximity sensor reproduce the problem?

No idea, but you could try the "Messwerk" app from the OpenStore and compare the output of the proximity sensor. Maybe it also shows random values.

nalysius commented 2 years ago

MessWerk seems right about proximity. If I move something in front of the sensor as in the first comment of this issue it keeps telling "Proximity detected".

luksus42 commented 2 years ago

But on a phone call the display still keeps blinking? As I said, for me mostly it works, the issue only appears sometimes.

nalysius commented 2 years ago

Yes, it still blinks. I may be wrong, but it's as if there was a stack of proximity events and they were handled one after the other. If I put and remove my hand several times it blinks several times and then stops. Do you know where is the Dial app's source code ? I could try to debug it on my phone.

donbubu commented 2 years ago

Hi, my Fairphone 3+ has same problem. :( Edit: I dsiabled auto brighness and now it works. i test it and write it here next days. Edit2: Yes, thats the problem, "auto brigthness" off and no problems :)

luksus42 commented 2 years ago

@donbubu thanks for investigating this.

nalysius commented 2 years ago

I never enable auto brightness on my FP3 because it's very bad, so I doubt this caused my problem. But since I no longer have UT on this FP3 I cannot reproduce the issue anymore.