MPSS异常引起系统无法休眠

1、遇到一个现象,手机待机17小时电量耗光了,从BatteryStats的Historian图表看,持续有Phone scanning,但实际上未插卡。

2、从电量估算来看,绝大部分都是Unaccounted,并非APP的CPU消耗:

  Estimated power use (mAh):
    Capacity: 4850, Computed drain: 139, actual drain: 3444-3492
    Unaccounted: 3305 ( ) Including smearing: 0 ( ) Excluded from smearing
    Cell standby: 54.8 ( radio=54.8 ) Excluded from smearing

3、从BatteryStats的log看整个信号都很差,有+phone_scanning但没有-phone_scanning配对出现:

     Cellular Rx signal strength (RSRP):
       very poor (less than -128dBm):  17h 41m 5s 538ms (100.0%) 

4、从代码流程看,+phone_scanning一直没等到-phone_scanning,原因是TelephonyRegistry.java没收到底层的状态改变广播broadcastServiceStateChanged。

private void updateAllPhoneStateLocked(int state, int simState, int strengthBin) {

        boolean scanning = false;

        if (simState == TelephonyManager.SIM_STATE_ABSENT) {   //不插卡
            // In this case we will always be STATE_OUT_OF_SERVICE, so need
            // to infer that we are scanning from other data.
            if (state == ServiceState.STATE_OUT_OF_SERVICE
                    && strengthBin > SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {   //信号强度
                state = ServiceState.STATE_IN_SERVICE;   //in service
            }
        }

        if (state == ServiceState.STATE_POWER_OFF) {
            strengthBin = -1;

        // If we are in service, make sure the correct signal string timer is running.
        } else if (state == ServiceState.STATE_IN_SERVICE) {
            // Bin will be changed below.

        // If we're out of service, we are in the lowest signal strength
        // bin and have the scanning bit set.
        } else if (state == ServiceState.STATE_OUT_OF_SERVICE) {
            scanning = true;
            strengthBin = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
            if (!mPhoneSignalScanningTimer.isRunningLocked()) {
                mHistoryCur.states |= HistoryItem.STATE_PHONE_SCANNING_FLAG;    //对应batterystats的+phone_scanning
                newHistory = true;
                if (DEBUG_HISTORY) Slog.v(TAG, "Phone started scanning to: "
                        + Integer.toHexString(mHistoryCur.states));
                mPhoneSignalScanningTimer.startRunningLocked(elapsedRealtime);
                StatsLog.write(StatsLog.PHONE_SERVICE_STATE_CHANGED, state, simState, strengthBin);
            }
        }

        if (!scanning) {
            // If we are no longer scanning, then stop the scanning timer.
            if (mPhoneSignalScanningTimer.isRunningLocked()) {
                mHistoryCur.states &= ~HistoryItem.STATE_PHONE_SCANNING_FLAG;     //对应batterystats的-phone_scanning
                if (DEBUG_HISTORY) Slog.v(TAG, "Phone stopped scanning to: "
                        + Integer.toHexString(mHistoryCur.states));
                newHistory = true;
                mPhoneSignalScanningTimer.stopRunningLocked(elapsedRealtime);
                StatsLog.write(StatsLog.PHONE_SERVICE_STATE_CHANGED, state, simState, strengthBin);
            }
        }

}

5、从kernel的log看,从msm_rpmh_master_stats_show埋点统计看,MPSS的Sleep Count一直都是0x0,一直无法休眠。

6、总结:高通的5G Modem在某种情况下一直无法完成搜网,即使不插卡的情况也会发生,导致MPSS系统无法休眠,电池电量很快消耗完毕,需要高通支持介入分析原因。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值