Skip to content

Instantly share code, notes, and snippets.

@prvn-pa
Created January 23, 2024 01:33
Show Gist options
  • Select an option

  • Save prvn-pa/9f753ffe37e6cb719be0918d636169a6 to your computer and use it in GitHub Desktop.

Select an option

Save prvn-pa/9f753ffe37e6cb719be0918d636169a6 to your computer and use it in GitHub Desktop.
limit-battery-charge-level

laptop - How can I limit battery charging to 80_ capacity - Ask Ubuntu

  • Install TLP:

    sudo add-apt-repository ppa:linrunner/tlp
    sudo apt update
    sudo apt install tlp
    
    <span class="hljs-comment"># Check what package needed for battery:</span>
    sudo tlp-stat -b
    
    <span class="hljs-comment"># If acpi_call is recommended</span>
    sudo apt install acpi-call-dkms
    
    <span class="hljs-comment"># If smapi is recommended</span>
    sudo apt install tp-smapi-dkms
    
  • Open config file of TLP

    sudo gedit /etc/tlp.conf
    
  • Find the lines regarding battery settings, remove the leading # for comment and maybe insert the value you want

    START_CHARGE_THRESH_BAT0=75
    STOP_CHARGE_THRESH_BAT0=80
    
  • Restart tlp

    sudo tlp start
    
  • Check the config status

    sudo tlp-stat -b
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment