LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 08-19-2022, 11:32 AM   #1
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Rep: Reputation: Disabled
Set Limit to Battery Charge


Mint 20.1 on Lenovo P15s.

I'm looking for a program which will limit battery charge to, say, 85%. Lots of power management/battery condition apps available, like 'upower', but I want to stop charging before 100%.

Suggestions
 
Old 08-19-2022, 01:05 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
I found this link that shows how to do it on Lenovo laptops:
https://askubuntu.com/questions/3445...to-80-capacity
 
1 members found this post helpful.
Old 08-21-2022, 06:07 PM   #3
dave67
Member
 
Registered: Apr 2007
Posts: 419

Rep: Reputation: 67
I suggest TLP read about it below. its in the repositories most of the time. Though messing with charge capacity can damage batteries I have done it. In most cases TLP will stop the battery from charging to 100% after install. Or it did on my thinkpad. Once its installed
sudo tlp-stat to view settings


https://linrunner.de/tlp/index.html
 
1 members found this post helpful.
Old 08-22-2022, 12:37 PM   #4
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Installed tlp; config'd to 80% charge limit. Charging stops at 71% however. I'm clueless about why this happens. I guess I could up the set point to 85% or 90% to come closer to a halt at 80%.
 
Old 08-22-2022, 12:44 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by notadoc View Post
Installed tlp; config'd to 80% charge limit. Charging stops at 71% however. I'm clueless about why this happens. I guess I could up the set point to 85% or 90% to come closer to a halt at 80%.
What is measuring the percentages? Do you get only one value, or maybe also a second one in brackets?
 
Old 08-22-2022, 01:02 PM   #6
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Target levels are set by me in the /etc/tlp.conf config file. The charge level at which charging stops are reported by the OS, and also by running 'upower.' No bracketed level are reported.
 
Old 08-23-2022, 08:09 AM   #7
dave67
Member
 
Registered: Apr 2007
Posts: 419

Rep: Reputation: 67
How old is the battery? If the battery is older that could be why the charge limit is reduced.

There are two add on packages


acpi-call-dkms

And

tp-smapi-dkms

Not all thinkpads support both of these. Use sudo tlp-stat look for theses to options to see if both are compatible. I forgot to add this info for these will be in the battery section of the tlp-stat

Last edited by dave67; 08-23-2022 at 07:33 PM.
 
Old 08-24-2022, 12:40 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by notadoc View Post
Target levels are set by me in the /etc/tlp.conf config file. The charge level at which charging stops are reported by the OS, and also by running 'upower.' No bracketed level are reported.
I guess you misunderstood. What is providing the information about the presumed incorrect percentages?
 
Old 08-25-2022, 11:57 AM   #9
dave67
Member
 
Registered: Apr 2007
Posts: 419

Rep: Reputation: 67
Did you restart TLP service after editing the config file?
 
Old 08-25-2022, 12:25 PM   #10
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
First, thanks to everyone for all the input. TLP was unsatisfactory because it caused conflicts with settings from 'powertop.' It was also too 'black boxy' for my taste. It DID point me to a simple solution to my particular problem. I just write my target power limits to
/sys/class/power_supply/BAT0/charge_start_threshold and /sys/class/power_supply/BAT0/charge_stop_threshold at boot, and everything seems to be OK.

Thanks again.
 
Old 08-26-2022, 07:07 PM   #11
dave67
Member
 
Registered: Apr 2007
Posts: 419

Rep: Reputation: 67
Revelation if I had known about powertop.......
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Limit Battery Charging (Set A Charge Threshold) For ASUS Laptops On Linux LXer Syndicated Linux News 0 02-19-2021 12:45 AM
LXer: Wrong Person in Charge of the Linux Foundation (and in Charge of Linus Torvalds) LXer Syndicated Linux News 0 08-15-2019 01:31 PM
Battery doesn't keep charge after running BIOS Battery Discharge/Charge Utility dan.leonard Linux - Laptop and Netbook 0 09-28-2004 01:07 PM
The Battery Charge Monitor problem neozero62 Linux - Laptop and Netbook 3 11-30-2003 06:34 PM
Battery Charge Monitor on Laptop. WMCrazyOne Linux - General 2 11-28-2003 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration