New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fingerprint identify loop leading to loss of CPU sleep #145
Comments
That ":1.1" private client name is likely to be = mce -> points towards fp wakeup handling. Getting such loop in case of errors is more or less expected. It should be throttled, but only to extent that a) cpu usage is limited b) the situation is expected to clear itself e.g. it is some temporary issue with sensor ownership between mce & device lock / similar. To gauge whether it is indeed mce + fpwakeup, one could try disabling/enabling fp wakeup altogether (while the situation is on) [Also, provided that the problem does not go away on mce restart, then running mce manually / adding -lmodules/fingerprint.c:* to mce.service Exec line and using journalctl -o short-precise might give more insight on timing etc] One should perhaps device some give-up-after-n-tries logic in mce anyway, but it would be nice to know what the underlying problem is first as it could be some interoperability issue between mce and community fpd too. |
Let's start from the bottom - I don't expect community fpd to be incompatible in the sense that it is leading to such problem. It is pretty straightforward implementation and is driven by DBus requests. It just replies to all requests and have no extra penalties, throttling on its side. As for the FP wakeup handling by mce, I wonder if it changed recently. On AOSP9 based port, I have
However here, for AOSP10, I have
To my understanding, on Tama, there is a wakeup handling on FP action provided by AOSP. For example, on AOSP9 (and expect same on AOSP10), while suspended, I can put finger on FP reader and will get in logcat
I wonder whether that causes the issue. I guess I should disable FP wakeup by MCE through overwriting Any tips on what should I set as a mode? =0? As this config is pulled from generic sparse-10, I guess I need to get overriding file with the name like /etc/mce/90-fingerprint-sensor-tama.conf |
PS: Adding file /etc/mce/90-fingerprint-sensor-tama.conf with |
That is correct. ... in general it goes something like:
|
Regarding mce fp-wakeup feature: For correct behavior it requires that underlying hw and android sw can keep the sensor powered on and in "authenticate" mode even if the device suspends. So that putting finger on sensor -> can wake device from suspend -> auth operation continues and successful match is communicated normally -> mce will wake up display. If some portion of this chain is not working as expected, it might be better to keep the feature disabled to avoid non-deterministic behavior / other kinds of hiccups. For example (IIRC etc) XperiaX does not wake up from finger-on-sensor -> auth does work if device happens to be out of suspend for other reasons -> sometimes it works, sometimes it does not -> not good ux-wise -> feature is disabled. |
Disabling FP wakeup fixed the issue (sailfishos-sony-tama/droid-config-sony-tama-pie@dd85d46) @spiiroin, reading your description it makes sense that Tama port enters such loop. In Tama, FP reader is on the back of the device. So, while lying on the back, it maybe is triggering FP reader and failing shortly in some conditions. For us, the wakeup feature is probably not needed anyway as we have pickup sensor. Sensor is hooked to wakeup the device when it is picked up and it will be ready to accept the fingerprint anyway. So, over here, I can close the issue by just disabling it. Thank you very much for your help. CC @piggz - see background on FP wakeup in SFOS. |
In SFOS 4.1.0.23, fingerprint sometimes fails to identify, especially after longer idle phone time. In addition, fingerprint identification can be requested by SFOS in a loop which can lead to inability to enter CPU sleep state for longer time (like 40mins). Logs are very similar in the both cases
The text was updated successfully, but these errors were encountered: