You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 17.10下联想X270双电池充电方式及电池损耗疑问

Fixing Dual Battery Charging Strategy for Lenovo X270 on Ubuntu 17.10

Hey there! I totally get your worry about how your X270's two batteries charge differently in Ubuntu compared to Windows. Let me break this down and help you get that optimized charging behavior back—no need to stress about battery damage right off the bat.

Why the Difference?

On Windows, Lenovo's built-in power management tools use a smart charging strategy designed to extend battery lifespan: it tops up one battery to 80%, switches to fill the second to 100%, then goes back to finish the first one. Ubuntu's default power manager doesn't have this custom logic baked in, so it just charges both batteries at the same time. While this default method won't instantly harm your batteries, it's not as kind to their long-term health as Lenovo's optimized approach.

How to Adjust the Charging Strategy

You have a couple of solid tools to replicate that Windows-style charging behavior. Let's start with the most targeted one for ThinkPads:

Option 1: Use tpacpi-bat (ThinkPad-Specific Tool)

tpacpi-bat is a dedicated utility for controlling ThinkPad battery thresholds and charging order. Here's how to set it up:

  1. Install the tool and dependencies:

    sudo apt-get install acpi-call-dkms tpacpi-bat
    
  2. Configure charging thresholds
    Open the configuration file with your favorite text editor (I'm using nano here):

    sudo nano /etc/tpacpi-bat.conf
    

    Add these lines to mimic the Windows charging logic:

    # Set battery 0 (internal) to stop at 80% initially
    START_CHARGE_THRESH_BAT0=40
    STOP_CHARGE_THRESH_BAT0=80
    # Set battery 1 (external) to charge fully to 100%
    START_CHARGE_THRESH_BAT1=40
    STOP_CHARGE_THRESH_BAT1=100
    

    Save and exit nano (press Ctrl+O, then Enter, then Ctrl+X).

    Once set, your X270 will charge the internal battery up to 80%, then switch to filling the external battery to 100%. After the external battery is full, most X270 models will automatically go back to top up the internal battery to 100%—if yours doesn't, you can temporarily adjust the internal battery's stop threshold to 100% using:

    sudo tpacpi-bat -s ST 0 100
    
  3. Verify your settings
    Check the current thresholds to make sure everything's applied:

    tpacpi-bat -g ST 0
    tpacpi-bat -g ST 1
    

    Or check the battery status directly:

    acpi -b
    

Option 2: Use TLP (General Power Management Tool)

If you prefer a more user-friendly, all-in-one power management tool, TLP works great for ThinkPads too:

  1. Install TLP:
    sudo apt-get install tlp tlp-rdw
    
  2. Edit the TLP configuration:
    sudo nano /etc/default/tlp
    
    Find the lines for battery charge thresholds and modify them to:
    STOP_CHARGE_THRESH_BAT0=80
    STOP_CHARGE_THRESH_BAT1=100
    
    Save and exit, then restart TLP to apply changes:
    sudo systemctl restart tlp
    

Quick Note on Battery Health

Remember that battery lifespan mostly depends on charge cycles. Keeping batteries between 40-80% charge as much as possible reduces cycle wear, which is exactly what Lenovo's Windows strategy is doing. Adjusting Ubuntu to match this will help keep your X270's great battery life going strong for longer.

内容的提问来源于stack exchange,提问作者Jurgen Celmeta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:08:55