[MTK] Power键不亮屏分析方法
文摘 MediaTek 2020-05-21 阅读:7750[DESCRIPTION]
Power键不亮屏log分析方法
[SOLUTION]
(1) 以下是列出的整个按键唤醒的log关键点,每条都有粗体字说明其含义以及该注意的关键字;
(2) 一条一条依次检查,直到如果发现某条log找不到,那问题就出在这个地方;
(3) 如果某个阶段的时间比较长,可能造成不亮屏的假象,可以分析亮屏时间长的原因
(4) 仅限于L之后的Android版本;
kernel-Check Point【1】:kernel 上报power key[kernel log]
[53:pmic_thread]kpd: Power Key generate, pressed=0
Check Point【2】:上层收到按键事件[eng版本上才有此log,main_log]
11-21 16:57:31.001050 1020 1262 D WindowManager: interceptKeyTq keycode=26 ...
Check Point【3】:PMS的wakeUp被调用[sys_log]
16:57:31.011153 1020 1262 I PowerManagerService: Waking up from sleep (uid 1000)...
Check Point【4】:准备绘制界面[sys_log]
11-21 16:57:31.022639 1020 1044 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
Check Point【5】:第一个wiating for drawn表示keyguard画完,开始画window[sys_log]
11-21 16:57:31.062667 1020 1041 I WindowManager: Waiting for drawn Window{6732b98 u0 com.android.settings/com.android.settings.SubSettings}:
check Point【6】:底层resume时间L版本 setAutoSuspend/M版本 setPowerMode【main_log】
注意:这个log出现的时间点不是固定的,要看底层resume的时间
16:57:31.436586 1020 1301 D SurfaceControl: Excessive delay in setPowerMode(): 403ms【M 版本】
15:41:07.827 911 2234 D PowerManagerService-JNI: Excessive delay in autosuspend_disable() while turning screen on: 424ms【L版本】
Check Point【7】:绘制界面完成及花费的时间[sys_log]
11-21 16:57:31.431161 1020 1044 I DisplayPowerController: Unblocked screen on after 409 ms
Check Point【8】:上层设置背光[sys_log]
11-21 16:57:31.443164 1020 1044 D DisplayPowerState: Requesting new screen state: state=ON, backlight=211
Check Point【9】:底层设置背光[sys_log,亮屏时间=power key到此处的时间,不一定每个版本都有此log,kernel log]
提示:如果出现此log表示屏幕已经点亮
<7>[ 553.658233] (3)1301:PhotonicModulat[LED]Set Backlight directly 211 at time 4294992661, mapping level is 211
Check Point【10】:亮屏操作完成[sys_log]
11-21 16:57:31.556750 1020 1044 D DisplayPowerController: Finished business...