1. 问题描述

    • 开机出现以下问题

      the ac power adapter type cannot be determined
    • 开机选择diagnose进行检查发现

      the battery is reaching the end of its life

      显示电池已经到达生命尽头

  2. 问题原因分析
    电池坏掉后cpu动不动就跑满了,因为此时cpu的工作模式被修改了

    • 安装cpufrequency工具

      sudo apt-get install cpufrequtils 
    • 查看cpu信息

      cpufreq-info

      image.png
      所有内核都变成了powersave的模式

  3. 修改模式

    sudo cpufreq-set -c 0 -g performance
    sudo cpufreq-set -c 1 -g performance
    sudo cpufreq-set -c 2 -g performance
    sudo cpufreq-set -c 3 -g performance
    
    modprobe msr
    wrmsr 0x1FC 2 //关闭BD PROCHOT
    
    watch -n 1 "cat /proc/cpuinfo | grep MHz"
  4. 再次查看 cpufreq-info ,此时模式已经修改过来,电脑不再卡顿
  5. systemctl stop ondemand
    systemctl disable ondemand
    
    vim /etc/sysfs.conf
    devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
    devices/system/cpu/cpu1/cpufreq/scaling_governor = performance
    devices/system/cpu/cpu2/cpufreq/scaling_governor = performance
    devices/system/cpu/cpu3/cpufreq/scaling_governor = performance
    reboot

frank
1 声望0 粉丝