TLP battery thresholds no longer working (ThinkPad/acpi_call)

Hi all,

I recently reinstalled openSUSE Tumbleweed after a snapshot I made wouldn’t delete and ended up filling my / partition, leaving me with an unbootable system.

Before, I had acpi_call installed in order for TLP to handle battery thresholds on my ThinkPad, and it worked flawlessly for several months. But after reinstalling my system, I followed all the same steps, including using the same repository to install acpi_call, and using the exact same battery thresholds in /etc/default/tlp, but when I run

sudo tlp setcharge BAT0

I get

Error: ThinkPad battery features not available.

So I tried

sudo tlp stat

and the appropriate output was

+++ Suggestions
* Install acpi-call kernel module for ThinkPad battery features

So I decided to check whether acpi_call was on my system with mlocate and I found this

/usr/lib/modules-load.d/acpi_call.conf
/usr/share/doc/packages/acpi_call
/usr/share/doc/packages/acpi_call/README.md

When I try manually loading acpi_call using modprobe, I get this

modprobe: FATAL: Module acpi_call not found in directory /lib/modules/4.15.6-1-default

It’s entirely possible that the module hasn’t caught up to the kernel version, but since this never happened over the last few months, I’m a little concerned.

Any advice would be much appreciated.

Thanks!

Do you have acpi_call installed?

https://software.opensuse.org/package/acpi_call

OK, I feel kind of silly, but I just ran zypper dup. acpi_call was updated and battery thresholds work now. Sorry guys!

No worries! I’m glad to read that it is working as expected again. :slight_smile:

I have the same issue. I installed acpi_call from Base:System (as stated in the docs) and can’t recalibrate my battery.

$ sudo tlp-stat -b
--- TLP 1.3.1 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = active (data, thresholds)
tpacpi-bat = inactive (kernel module 'acpi_call' not installed)
tp-smapi   = inactive (ThinkPad not supported)

+++ ThinkPad Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = 01AV445
/sys/class/power_supply/BAT0/cycle_count                    =    250
/sys/class/power_supply/BAT0/energy_full_design             =  45000 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  38140 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  38140 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Full

/sys/class/power_supply/BAT0/charge_start_threshold         =     65 %]
/sys/class/power_supply/BAT0/charge_stop_threshold          =     65 %]

Charge                                                      =  100.0 %]
Capacity                                                    =   84.8 %]

+++ Recommendations
* Install acpi_call kernel module for ThinkPad battery recalibration
$ sudo tlp recalibrate BAT0
Setting temporary charge thresholds for BAT0:
start =  96 (Error: cannot set threshold)
stop  = 100
Error: battery discharge/recalibrate not available.
$ sudo modprobe acpi_call
modprobe: FATAL: Module acpi_call not found in directory /lib/modules/5.14.1-1-default
$ find / -iname "*acpi_call*"
/usr/libexec/modules-load.d/acpi_call.conf
/usr/share/doc/packages/acpi_call

Is acpi_call broken and I just need to wait until it’s get updated or do I need to do something?

Post:

zypper se -si acpi_call
uname -a
$ uname -a
Linux localhost.localdomain 5.14.1-1-default #1 SMP Sat Sep 4 08:22:51 UTC 2021 (67af907) x86_64 x86_64 x86_64 GNU/Linux
$ zypper se -si acpi_call
S  | Name      | Type    | Version     | Arch   | Repository
---+-----------+---------+-------------+--------+--------------------------------------------------------
i+ | acpi_call | package | 1.1.0-3.112 | x86_64 | Base:System Factory Devel Project (openSUSE_Tumbleweed)

I already figured it out, it was necessary to install the acpi_call-kmp-default package. But now I have But now I have a new problem: I get errors like “/usr/share/tlp/func.d/35-tlp-func-batt: line 25: xxxx Killed $TPACPIBAT -g FD 1 > /dev/null 2>&1”.

$ sudo tlp-stat -b
/usr/share/tlp/func.d/35-tlp-func-batt: line 25:  6070 Killed                  $TPACPIBAT -g FD 1 > /dev/null 2>&1
--- TLP 1.3.1 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = active (data, thresholds)
tpacpi-bat = unknown status
tp-smapi   = inactive (ThinkPad not supported)

/usr/share/tlp/func.d/35-tlp-func-batt: line 25:  6117 Killed                  $TPACPIBAT -g FD 1 > /dev/null 2>&1
/usr/share/tlp/func.d/35-tlp-func-batt: line 25:  6163 Killed                  $TPACPIBAT -g FD 1 > /dev/null 2>&1
+++ ThinkPad Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = 01AV445
/sys/class/power_supply/BAT0/cycle_count                    =    250
/sys/class/power_supply/BAT0/energy_full_design             =  45000 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  38140 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  37400 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Unknown

/sys/class/power_supply/BAT0/charge_start_threshold         =     65 %]
/sys/class/power_supply/BAT0/charge_stop_threshold          =     65 %]

Charge                                                      =   98.1 %]
Capacity                                                    =   84.8 %]

/usr/share/tlp/func.d/35-tlp-func-batt: line 25:  6263 Killed                  $TPACPIBAT -g FD 1 > /dev/null 2>&1

TLP developer says that “you need a recent version of acpi_call”, but I can’t figure out what to do next: build it from source or just wait for it to be update?