Coder Social home page Coder Social logo

prajwalthakur / battery-charging-limiter-linux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sreejithag/battery-charging-limiter-linux

0.0 0.0 0.0 36 KB

Script to set battery charging threshold in Asus laptops running linux

License: MIT License

Shell 100.00%

battery-charging-limiter-linux's Introduction

Battery Charging limiter Linux (ASUS Laptops)

When the laptop is being constantly used with a charger plugged in it is better to limit the charging at 60% to 80% to improve the battery health. Many laptop vendors like Asus provide software utility to set the battery max charge threshold but it works only in windows.

With Linux kernel 5.4 added the ability to set a battery charge threshold for many Asus laptops this script uses it to set the limit.

Usage

Run the script limit.sh with max battery threshold as an argument

eg: ./limit.sh 60

prompt to enter the password since it needs sudo permission

Will set the battery threshold to 60% so even if the laptop is plugged in it won't charge beyond 60% helps to protect the battery health.

Note: limit.sh set limit won't persist on system reboot

or

For operating systems with systemd use other script limitd.sh that will create a systemd service to apply the limit on system reboot.

eg: ./limitd.sh 60

limitd.sh set limit will persist on system reboot

Reboot the system and check if limit works

Renable full capacity

Run the limit.sh script with 100%

./limit.sh 100

or

./limitd.sh 100

This will persist the change on reboot if sytemd is available

Note: make the script executable before running by executing chmod +x limit.sh

More info


Tested in Asus vivobook 15 with AMD Ryzen 3500U running Linux mint 20 Kernal 5.8.0-25-generic

battery-charging-limiter-linux's People

Contributors

sreejithag avatar battle420 avatar

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.