[Oukitel (All phone models)] doublehp:
My phone turns on every 20mn by itself, and it's boring me for various reasons. Amongst other reasons, if it's close to me, and it recognises my face, it will unlock, and stay on (I have set screen timeout to 1h; but that's not the point). Turnong on even staying locked drains battery.

Model Oukitel F150 B2021

Android 11 , ASW1900AD_2021_T3050

not rooted

After very long digging, I have established that screen can turn at these times:

# cat /tmp/logcat-2022-11-09_19-31-38 | grep -e "notifyScreenOn"
11-09 19:48:41.439 1580 7590 D KeyguardViewMediator: notifyScreenOn
11-09 20:13:03.454 1580 1604 D KeyguardViewMediator: notifyScreenOn
11-09 20:28:42.145 1580 2286 D KeyguardViewMediator: notifyScreenOn
11-09 20:48:42.472 1580 1809 D KeyguardViewMediator: notifyScreenOn
11-09 20:58:42.715 1580 1809 D KeyguardViewMediator: notifyScreenOn
11-09 21:02:41.805 1580 1891 D KeyguardViewMediator: notifyScreenOn
11-09 21:08:42.981 1580 6150 D KeyguardViewMediator: notifyScreenOn
11-09 21:18:43.138 1580 5781 D KeyguardViewMediator: notifyScreenOn
11-09 21:38:43.461 1580 6142 D KeyguardViewMediator: notifyScreenOn
11-09 21:48:43.633 1580 1715 D KeyguardViewMediator: notifyScreenOn
11-09 21:52:31.598 1580 1809 D KeyguardViewMediator: notifyScreenOn

And these can be split on two categories. Either I have pressed the power button:

cat /tmp/logcat-2022-11-09_19-31-38 | grep -e "interceptKeyTq"
11-09 19:31:33.711 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 19:31:34.638 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 19:31:35.944 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 19:31:36.107 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 20:13:03.427 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=false keyguardActive=true policyFlags=2000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 0 useHapticFeedback = false isInjected = false
11-09 20:13:03.618 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=true policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 20:13:20.982 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 20:13:21.086 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=false policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 21:02:41.787 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=false keyguardActive=true policyFlags=2000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 0 useHapticFeedback = false isInjected = false
11-09 21:02:41.926 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=true policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false
11-09 21:52:31.570 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=false keyguardActive=true policyFlags=2000000 down =true canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 0 useHapticFeedback = false isInjected = false
11-09 21:52:31.766 1223 1391 D WindowManager: interceptKeyTq keycode=26 interactive=true keyguardActive=true policyFlags=22000000 down =false canceled = false isWakeKey=false mVolumeDownKeyTriggered =false mVolumeUpKeyTriggered =false result = 1 useHapticFeedback = false isInjected = false

(see the very nice soft bournce detector)

or it was turned after this event:

# cat /tmp/logcat-2022-11-09_19-31-38 | grep -e "enalbePerf"
11-09 19:48:41.422 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 20:28:42.130 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 20:48:42.453 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 20:58:42.696 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 21:08:42.962 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 21:18:43.123 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 21:38:43.441 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 21:48:43.619 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf

and if you compare, the 1st list is exactly the summ of the later two.

Here is a typical section, and I will higlight keywords that exactly match these times; words that won't appear anywhere else in the log:

11-09 21:38:43.224 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:38:43.239 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:38:43.239 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:38:43.239 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:38:43.239 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:38:43.306 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=0 trigger_count=12, detect time 56
11-09 21:38:43.306 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:38:43.355 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:38:43.355 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:38:43.369 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:38:43.369 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:38:43.369 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:38:43.369 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:38:43.397 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:38:43.397 879 998 D MICROARRAY: [cancel_cmd:220] start.
11-09 21:38:43.397 879 998 D MICROARRAY: [cancel_cmd:227] end.
11-09 21:38:43.397 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:38:43.441 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=1 trigger_count=13, detect time 60
11-09 21:38:43.441 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1002
11-09 21:38:43.441 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(2)
11-09 21:38:43.441 879 996 E android.hardware.biometrics.fingerprint@2.1-service: enalbePerf
11-09 21:38:43.441 879 996 E android.hardware.biometrics.fingerprint@2.1-service: already enabled, handle:0
11-09 21:38:43.442 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:38:43.442 879 996 D MICROARRAY: [verify:51] auth_start, timestamp = 1668026323442
11-09 21:38:43.442 879 996 D MICROARRAY: [verify:53] challenge=0
11-09 21:38:43.442 879 996 D MICROARRAY: [ma_tac_do_verify:514] chipid=128
11-09 21:38:43.241 1223 1223 I chatty : uid=1000 system_server identical 9 lines
11-09 21:38:43.371 1223 1223 V FingerprintService: Acquired: 6 1
11-09 21:38:43.443 1223 1223 V FingerprintService: Acquired: 6 2
11-09 21:38:43.450 1223 2871 I PowerManagerService: Waking up from Dozing (uid=10087, reason=WAKE_REASON_UNKNOWN, details=wakeUp)...
11-09 21:38:43.459 1223 1270 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
11-09 21:38:43.461 1580 6142 D KeyguardViewMediator: notifyScreenOn
11-09 21:38:43.461 1580 1580 D KeyguardViewMediator: handleMessage: msg.what=6
11-09 21:38:43.461 1580 1580 D KeyguardViewMediator: handleNotifyScreenTurningOn
11-09 21:38:43.493 1223 1259 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu4/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
11-09 21:38:43.494 1223 1259 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
11-09 21:38:43.496 438 446 E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup118: Permission denied
11-09 21:38:43.490 438 438 W Binder:438_2: type=1400 audit(0.0:81125): avc: denied { read } for name="wakeup118" dev="sysfs" ino=38923 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
11-09 21:38:43.504 608 715 I BufferQueueProducer: [NotificationShade#0](this:0xb40000715b8b4598,id:852,api:1,p:1580,c:608) queueBuffer: fps=0.01 dur=1190226.17 max=1189675.81 min=10.18
11-09 21:38:43.505 438 446 E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup0: Permission denied
11-09 21:38:43.502 438 438 W Binder:438_2: type=1400 audit(0.0:81126): avc: denied { read } for name="wakeup0" dev="sysfs" ino=16760 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
11-09 21:38:43.516 879 996 D MICROARRAY: [ma_tac_do_verify:529] fid=0, fid_count=5
11-09 21:38:43.516 879 996 D MICROARRAY: [verify:113] do_verify ret=0 fid=0
11-09 21:38:43.516 879 996 D MICROARRAY: [verify:116] authenticate cancelled
11-09 21:38:43.516 879 996 D MICROARRAY: [authenticate_work:364] authenticate cancelled
11-09 21:38:43.516 879 996 D MICROARRAY: [fingerprint_hal_main_thread:143] Command PROCESS_AUTHENTICATE execute end, start to fetch next.
11-09 21:38:43.516 879 996 D MICROARRAY: [fetch_cmd:75] fetch Command start

This list is a little bit funny:

# cat /tmp/logcat-2022-11-09_19-31-38 | grep -e "push_cmd_for_factory_test"
11-09 19:38:41.257 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 19:38:41.258 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 19:48:41.374 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 19:48:41.375 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 19:58:41.619 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 19:58:41.619 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:08:41.736 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:08:41.736 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:18:41.881 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:18:41.881 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:28:42.093 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:28:42.094 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:38:42.301 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:38:42.301 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:48:42.376 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:48:42.377 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 20:58:42.658 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 20:58:42.659 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:08:42.901 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:08:42.901 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:18:43.085 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:18:43.086 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:28:43.314 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:28:43.314 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:38:43.397 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:38:43.397 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:48:43.570 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:48:43.570 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:58:43.860 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:58:43.860 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.

and here I hold something: every 10mn, on minute 8 second 41, this test happens, and once every two times, the test will turn screen on.

Here is a similar section where the test is done without turbing screen on:

11-09 21:28:42.952 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:28:42.952 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:28:43.024 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=0 trigger_count=23, detect time 61
11-09 21:28:43.024 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:28:43.072 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:28:43.073 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.087 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:28:43.088 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:28:43.088 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:28:43.088 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:28:43.150 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=0 trigger_count=24, detect time 51
11-09 21:28:43.150 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:28:43.198 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:28:43.199 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.212 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:28:43.212 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:28:43.212 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:28:43.212 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:28:43.276 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=0 trigger_count=25, detect time 52
11-09 21:28:43.276 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:28:43.314 879 998 D MICROARRAY: [push_cmd_for_factory_test:184] start.
11-09 21:28:43.314 879 998 D MICROARRAY: [cancel_cmd:220] start.
11-09 21:28:43.314 879 998 D MICROARRAY: [cancel_cmd:227] end.
11-09 21:28:43.314 879 998 D MICROARRAY: [push_cmd_for_factory_test:211] end.
11-09 21:28:43.324 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:28:43.324 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.381 879 998 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.383 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:28:43.384 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:28:43.384 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:28:43.384 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:28:43.396 879 998 D MICROARRAY: [pop_cmd_leave_factory_test:156] start.
11-09 21:28:43.396 879 998 D MICROARRAY: [pop_cmd_leave_factory_test:173] end.
11-09 21:28:43.397 879 996 D MICROARRAY: [authenticate_work:282] command cancelled
11-09 21:28:43.397 879 996 D MICROARRAY: [fingerprint_hal_main_thread:143] Command PROCESS_AUTHENTICATE execute end, start to fetch next.
11-09 21:28:43.398 879 996 D MICROARRAY: [fetch_cmd:75] fetch Command start
11-09 21:28:43.398 879 996 D MICROARRAY: [fetch_cmd:102] fetch next Command PROCESS_AUTHENTICATE
11-09 21:28:43.398 879 996 D MICROARRAY: [fetch_cmd:112] fetch Command end
11-09 21:28:43.398 879 996 D MICROARRAY: [fingerprint_hal_main_thread:136] Command PROCESS_AUTHENTICATE is running
11-09 21:28:43.399 879 996 D MICROARRAY: [authenticate_work:251] authenticate start kaicheng
11-09 21:28:43.399 879 996 D MICROARRAY: [authenticate_work:255] calibrated=1 authCount=1
11-09 21:28:43.399 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:28:43.449 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:28:43.449 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.463 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:28:43.463 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:28:43.463 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)
11-09 21:28:43.464 879 996 D MICROARRAY: [acquired_event_notify:200] end
11-09 21:28:43.530 879 996 D MICROARRAY: [authenticate_work:291] detect touch r=0 trigger_count=26, detect time 55
11-09 21:28:43.531 879 996 D MICROARRAY: [authenticate_work:268] loopstart
11-09 21:28:43.578 879 996 D MICROARRAY: [authenticate_work:271] tac detect touch , r = 0
11-09 21:28:43.579 879 996 D MICROARRAY: [detect_to_sleep:606] type=1
11-09 21:28:43.593 879 996 D MICROARRAY: [authenticate_work:276] go to kernel
11-09 21:28:43.594 879 996 D MICROARRAY: [acquired_event_notify:193] start, event=1001
11-09 21:28:43.594 879 996 D android.hardware.biometrics.fingerprint@2.1-service: onAcquired(6) vendorCode(1)

What could cause that, and how to fix it ?

I will try to disable fingerprint service ...