You are not logged in.

#1 Yesterday 18:46:04

boarim
Member
From: France
Registered: 2022-05-28
Posts: 35
Website

Cannot recalibrate new battery with tp_smapi and tlp

I bought a new battery for my ThinkPad T400s. I want to recalibrate it because the power reported by the system is not accurate. I’m using tlp to manage the power settings. I installed tp_smapi-dkms from the AUR to have access to the recalibration feature. However, once installed and the laptop rebooted, tlp does not recognize tp_smapi:

# tlp-stat -b

--- TLP 1.10.2 --------------------------------------------

+++ Battery Care
Plugin: thinkpad
Supported features: charge thresholds
Driver usage:
* natacpi (thinkpad_acpi) = active (charge thresholds)
Parameter value ranges:
* START_CHARGE_THRESH_BAT0/1:  0(off)..96(default)..99
* STOP_CHARGE_THRESH_BAT0/1:   1..100(default)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = SANYO 
/sys/class/power_supply/BAT0/model_name                     = 42T4688
/sys/class/power_supply/BAT0/cycle_count                    =      0 (or not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  39960 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  38890 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  18720 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  34197 [mW]
/sys/class/power_supply/BAT0/status                         = Charging

/sys/class/power_supply/BAT0/charge_control_start_threshold =     85 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =     90 [%]

Charge                                                      =   48.1 [%]
Capacity                                                    =   97.3 [%]

The battery threshold feature is provided by natacpi natively (I already had it without tp_smapi installed). But no battery recalibration feature is reported. Which is confirmed by the following error:

# tlp recalibrate
Error: battery recalibrate is not supported.

What am I missing? Do I need another package?


Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)

Offline

#2 Yesterday 19:56:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,141

Re: Cannot recalibrate new battery with tp_smapi and tlp

dkms status
lsmod | grep -i smapi

Offline

#3 Today 05:55:31

boarim
Member
From: France
Registered: 2022-05-28
Posts: 35
Website

Re: Cannot recalibrate new battery with tp_smapi and tlp

Both commands print nothing. So I guess the module smapi is not loaded.

I use the default linux kernel by the way.

Last edited by boarim (Today 05:55:53)


Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)

Offline

#4 Today 06:42:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,141

Offline

#5 Today 13:14:42

boarim
Member
From: France
Registered: 2022-05-28
Posts: 35
Website

Re: Cannot recalibrate new battery with tp_smapi and tlp

Ok I installed linux-headers. There wasn’t any errorsfrom pacman during installation. Then I rebooted but still no change within tlp. Here’s the output of the previous commands:

# dkms status
tp_smapi-dkms/0.45, 7.2.9-arch1-1, x86_64: installed (Original modules exist)

and

$ lsmod | grep -i smapi

Nothing is printed so the module is not loaded.

Last edited by boarim (Today 13:15:01)


Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)

Offline

#6 Today 13:28:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,141

Re: Cannot recalibrate new battery with tp_smapi and tlp

Did you read https://github.com/linux-thinkpad/tp_smapi ?
There's apparently a conflict w/ hdaps - make sure the latter isn't loaded or is loaded in its patched form.
It could exist in the initramfs (did you regenerate that after installing the module)?

Then try to

modprobe -v tp_smapi

Offline

#7 Today 15:07:27

boarim
Member
From: France
Registered: 2022-05-28
Posts: 35
Website

Re: Cannot recalibrate new battery with tp_smapi and tlp

I checked whether hdaps is loaded or not with:

$ lsmod | grep -i hdaps

Nothing is printed so it’s not loaded.
I did a system upgrade while installing linux-headers and there was a new version of the kernel, so mkinitcpio was automatically triggered.

Here’s what I get in the end:

# modprobe -v tp_smapi
insmod /lib/modules/7.2.9-arch1-1/updates/dkms/tp_smapi.ko.zst 
modprobe: ERROR: could not insert 'tp_smapi': No such device or address

Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)

Offline

#8 Today 15:09:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,141

Re: Cannot recalibrate new battery with tp_smapi and tlp

Does thinkpad_ec load/work?

Offline

#9 Today 17:50:24

boarim
Member
From: France
Registered: 2022-05-28
Posts: 35
Website

Re: Cannot recalibrate new battery with tp_smapi and tlp

When I checked with lsmod, it’s loaded. I think it works since I can apply different battery thresholds with tlp that persist through reboots.


Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)

Offline

Board footer

Powered by FluxBB