Ask Your Question
4

How to setup charge thresholds for battery?

asked 2014-10-23 12:34:15 -0500

malmed gravatar image

Hello, I have Lenovo ThinkPad E440 with Fedora 20. I found that for battery lifetime is not optimal to be charged to 100 %, so I found in repository tlp package, which can setup start charge threshold and stop charge threshold. It works only for ThinkPad and it needs acpi_call. So, I found acpi_call here, but I don't know how to compile? And probably there is an error with new kernels (3.5 +).

In more detail, acpi_call is used by Tpacpi-bat (and Tp smapi doesn't work: "If you are installing on a recent Thinkpad that has an Ivy Bridge or newer processor (X230, T430, T530, etc.), tp_smapi will not work. You will be mostly limited to thinkpad-acpi capabilities. You can however set battery charge thresholds with tpacpi-bat.")

Is there some another way without tlp, or someone who know how to run acpi_call?

edit retag flag offensive close merge delete

Comments

Does the tlp package not work for you? I'm confused; you say that tlp works for thinkpads, and that you have a thinkpad, then go on to talk about tlp dependencies, which should be installed when the tlp package is installed. You should not need to install or compile anything from outside of the Fedora repos to get Fedora packages to work.

randomuser gravatar imagerandomuser ( 2014-11-02 13:52:44 -0500 )edit

randomuser: tlp works partially, another settings are fine except battery charging, which needs acpi_call to work. So, my question is how to install acpi_call, which is not in Fedora repos and I will appreciate help. (I will try suggested answer below.) Sorry for confusion.

malmed gravatar imagemalmed ( 2014-11-04 06:14:54 -0500 )edit
1

It seems acpi_call has been abandoned: "This module is to be considered a proof-of-concept and has been superseeded by projects like bbswitch. It allows you to tamper with your system and should be used with caution." The mentioned bbswitch tackles graphics-device switching, but not battery management, so it would seem that a new tool is needed?

dhardy gravatar imagedhardy ( 2015-02-22 05:15:23 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2014-11-02 09:08:24 -0500

till gravatar image

updated 2014-11-07 11:03:45 -0500

acpi_call is an external kernel module. To compile kernel modules you need the kernel-devel package and at least gcc and make. So you can try:

sudo yum install git kernel-devel gcc make
git clone https://github.com/mkottman/acpi_call
cd acpi_call
make
sudo make install load

If you update your kernel, you need to re-run these steps. Also you might ask RPM Fusion maintainer to create a package for the kernel module. In Fedora no extra kernel modules are allowed.

edit flag offensive delete link more

Comments

till: What does mean: "In Fedora no extra kernel modules are allowed." ? Is apci_call external ker. module? Thanks for a guide through the GitHub. It seems that it works. Now, I can set sudo tlp setcharge 50 85; Setting temporary charge thresholds for BAT0: stop = 85 start = 50 Done.

malmed gravatar imagemalmed ( 2014-11-04 06:17:41 -0500 )edit

And package git is needed too.

malmed gravatar imagemalmed ( 2014-11-04 11:23:31 -0500 )edit

yes, acpi_call is an external kernel module.

till gravatar imagetill ( 2014-11-07 11:03:30 -0500 )edit
1

Currently with kernel 3.17 there is an additional step necessary: Edit the file acpi_call.c and replace the line

#include <acpi/acpi.h>

with

#include <linux/acpi.h>
mightyflea gravatar imagemightyflea ( 2014-11-21 18:38:45 -0500 )edit

Apart from the problem with the current kernel 3.17, you can just install the acpi_call kernel module via yum:

yum install akmod-acpi_call
owa gravatar imageowa ( 2014-12-07 05:27:26 -0500 )edit
0

answered 2017-10-04 11:25:13 -0500

I need to set a battery threshold for my Asus Zenbook 3 im using Fedora 26. I have tied with tlp, and can not figure out how to edit it there, most instructions say "Think pad only" Also tied with powertop and found a site with instructions by installin tpacpi-bat however its not working.... I found this thread but not sure what this github kernal module will do

edit flag offensive delete link more
0

answered 2017-10-04 11:24:41 -0500

I need to set a battery threshold for my Asus Zenbook 3 im using Fedora 26. I have tied with tlp, and can not figure out how to edit it there, most instructions say "Think pad only" Also tied with powertop and found a site with instructions by installin tpacpi-bat however its not working.... I found this thread but not sure what this github kernal module will do

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2014-10-23 12:34:15 -0500

Seen: 4,880 times

Last updated: Nov 07 '14