本文主要是介绍解决android系统唤醒时间偏长------看log找可疑的地方,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
最近发现我们的手机的双击唤醒时间偏长,那么就需要去看是什么导致的。于是首先看唤醒的log
[ 252.830937] [ASDF] enter do_write_event_worker //这个是打印log的service
[ 252.838638] [SENSOR] : inv_ak09911_pm_suspend
[ 252.838647] CM32683: CM36283_suspend
[ 252.838656] [SENSOR] : inv_mpu_suspend
[ 252.839383] qpnp_vibrator_set off
[ 252.847927] PM: suspend of devices complete after 15.292 msecs
[ 252.848781] PM: late suspend of devices complete after 0.847 msecs
[ 252.850270] PM: noirq suspend of devices complete after 1.480 msecs
[ 252.850277] Disabling non-boot CPUs ...
[ 252.861659] CPU0:msm_cpu_pm_enter_sleep mode:3 during suspend
[ 252.861659] __qpnpint_handle_irq: 290 triggered [0x0, 0x08,0x0] qpnp_kpdpwr_status
[ 252.861659] [PM]IRQ: 200 triggered qcom,smd-rpm
[ 252.861659] [PM]IRQ: 203 triggered 601d0.qcom,mpm
[ 252.861659] [PM]IRQ: 222 triggered 200f000.qcom,spmi
[ 252.862720] Enabling non-boot CPUs ...
[ 252.864979] CPU1 is up
[ 252.867220] CPU2 is up
[ 252.869755] CPU3 is up
[ 252.870388] PM: noirq resume of devices complete after 0.620 msecs
[ 252.870969] qcom,qpnp-power-on qpnp-power-on-eddf2000: Power key down
[ 252.871110] wait_for_power_key_6s_work
[ 252.872421] PM: early resume of devices complete after 1.085 msecs
[ 252.877703] [Gpio_keys] gpio_keys_gpio_report_event:keycode=115 state=release
[ 252.877711] [Gpio_keys] gpio_keys_gpio_report_event:keycode=114 state=release
[ 252.877944] [SENSOR] : inv_mpu_resume
[ 252.877953] CM36283: CM32683_resume
[ 252.877960] [SENSOR] : inv_ak09911_pm_resume
[ 252.877997] <BATT>smb358_resume
[ 252.903258] process_resume_data:deviation(skip): 16850, hw ocv: 4131960, last ocv: 4115110
[ 252.903265] process_resume_data:reset count
[ 252.904432] PM: resume of devices complete after 32.000 msecs
[ 252.909391] fcc=2905 acc=2861 soc_final=79 soc_uuc=1 soc_acc=79 current_now=0 iavg_ma=11
[ 252.909396] soc_final=79 soc_ocv=79 soc_cutoff=2 ocv_uv=4115110 batt_temp=280
[ 252.912545] last_soc=79 calculated_soc=79 soc=79 time_since_last_change=2964
[ 252.915886] report_vm_bms_soc:[bms]Reported result_soc=79
[ 253.049828] qcom,qpnp-power-on qpnp-power-on-eddf2000: Power key on
[ 253.089852] [PM]unattended_timer: mod_timer
[ 253.094271] mmc0: Starting deferred resume
[ 253.097415] qpnp_vm_bms_power_set_property: last_ocv_uv = 4115107
[ 253.101989] Restarting tasks ... done.
[ 253.104300] fcc=2905 acc=2860 soc_final=79 soc_uuc=1 soc_acc=79 current_now=32 iavg_ma=16
[ 253.104305] soc_final=79 soc_ocv=79 soc_cutoff=2 ocv_uv=4115107 batt_temp=282
[ 253.108744] last_soc=79 calculated_soc=79 soc=79 time_since_last_change=2964
[ 253.121203] report_vm_bms_soc:[bms]Reported result_soc=79
[ 253.124944] [LS][CM36283] lightsensor_enable
[ 253.144400] PM: suspend exit 2016-01-01 18:48:32.882505816 UTC
[ 253.161091] <Display>mdss_dsi_panel_power_on
[ 253.203169] <Display>mdss_dsi_panel_reset
[ 253.230959] mmc0: Deferred resume completed
[ 253.265899] [ASDF] enter do_write_event_worker
[ 253.304219] CM36283--initial-After 1st devided by 20, report_lux is 0
[ 253.355759] <Display>mdss_dsi_panel_on
[ 253.355764] <Display>write cabc mode = 0x0
[ 253.362108] [Focal][Touch] focal_resume_work : Touch resume +++
[ 253.362115] [Focal][Touch] focal_resume_work : Touch resume from gesture mode
[ 253.362197] [Focal][Touch] interrupt suspend_resume in process skip !
[ 253.362909] <Display>mdss_dsi_panel_bklt_dcs: set level 38
[ 253.362914] <Display>enable backlight enable gpio
首先的办法是看kernel中跑了哪些流程,根据这里的log可以看到一些比如第一条的打印的service。
这些流程中有哪些可以优化的
还有就是看系统唤醒后的在跑的上层service
root@ASUS_Z00L_63B:/ # getprop |grep svc
[init.svc.VerifyVoucher]: [stopped]
[init.svc.adbd]: [running]
[init.svc.asus_audbg]: [stopped]
[init.svc.asus_checkaudbg]: [stopped]
[init.svc.asus_chk_asdf]: [stopped]
[init.svc.asus_monitor]: [stopped]
[init.svc.asus_prj_id]: [stopped]
[init.svc.atfwd]: [running]
[init.svc.audiod]: [running]
[init.svc.bms-sh]: [stopped]
[init.svc.bootanim]: [stopped]
[init.svc.check_last]: [stopped]
[init.svc.cnd]: [running]
root@ASUS_Z00L_63B:/ # stop healthd
这些runing的service未必全部都会在屏幕亮起前跑起来,所以只能尝试去看,关一些service之后看唤醒的时间是否缩短。其他的也没有太多可以优化的空间
这篇关于解决android系统唤醒时间偏长------看log找可疑的地方的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!