Giter VIP home page Giter VIP logo

battery_swap_fix's Introduction

Battery Swap Fix (Linux) for Lenovo T470s

Not needed anymore!

Please use the latest firmware to fix the battery issue. See: https://gitlab.freedesktop.org/upower/upower/-/issues/62

Scripts to automatically set charge_start_threshold to reasonable values, so the batteries are charged and switched correctly.

Background

There is a bug either in the Linux kernel or the lenovo power management, that when not charging, only one battery is used and never the extra battery.

When the first battery is empty the laptop can simply crash, since the Linux kernel thinks there is still more power, but some battery controller simply kills the power to protect the battery.

By enabling charge_start_threshold, by using a number greater than 0, the battery is correctly switched when that threshold is reached. But when the battery capacity is higher, then the battery won't charge.

This project tries to mitigate this dilema, by automatically setting the charge_start_threshold values accordingly to the current AC power status.

Installation

To install run sudo ./install.sh.

To uninstall run sudo ./uninstall.sh.

In both cases your system could need a restart, so udev can reload the event monitoring rules correctly.

Tested Devices:

  • Lenovo T470s

battery_swap_fix's People

Contributors

holyshitman avatar mickare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

battery_swap_fix's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.