3

when I ask tlp for my battery status via

sudo tlp stat -b

I get the following status:

+++ ThinkPad Extended Battery Functions
tp-smapi   = inactive (kernel module 'tp_smapi' not installed)
tpacpi-bat = active

I followed e.g. this tutorial http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html#installation and did all the steps described:

 apt-get install tlp tlp-rdw 
 apt-get install tp-smapi-dkms acpi-call-dkms 

I in fact was able to set my batteries' thresholds and everything seems to work. But following the faq of linrunner (http://linrunner.de/en/tlp/docs/tlp-faq.html) when trying to troubleshoot this problem, they only refer to the above posted installation guide which I closely followed.

If I try to load tp_smapi via

 sudo modprobe -v tp_smapi 

I see the following error message:

modprobe: FATAL: Module tp_smapi not found in directory /lib/modules/4.4.0-22-generic

Therefore I think this is somehow where the problem lies. I read a lot of q&a's regarding tp_smapi by now but I could not find a solution to it yet. Therefore please help me out! :(

aiac
  • 33
  • 1
  • 4

2 Answers2

4

The installation of tp-smapi-dkms failed at some point. As you have a T460s i reckon you're using a 4.6 kernel. tp-smapi-dkms 0.41-1 from the Xenial repos doesnt't compile with that kernel. Only 0.42-1 from Yakkety or Debian unstable will do.

BUT: tp-smapi won't work on the T460s anyway (and is not needed), so just remove it and you'll be fine:

sudo apt-get purge tp-smapi-dkms
linrunner
  • 1,347
  • 6
  • 10
  • Why is that? Thanks for the information but why do you say tp-smapi will a) not work on the T460s and b) is not needed anyway? Could you please explain this or provide me with a link to more info on this? – aiac Jun 09 '16 at 09:32
  • a) Beginning with the *30 generation tp-smapi doesn't load anymore. tp-smapi is no longer actively developed, so the situation won't change in future. See https://github.com/evgeni/tp_smapi/issues/14 – linrunner Jun 09 '16 at 16:57
  • b) TLP uses tpapci-bat for battery functions on newer ThinkPads. Refer to https://github.com/teleshoes/tpacpi-bat – linrunner Jun 09 '16 at 17:01
  • And before you ask: there is NO way within Linux to display cycle count, manufacture date and so on on ThinkPads >= *30. This was only possible with tp-smapi. hdapsd also doesn't work. – linrunner Jun 09 '16 at 17:04
  • Thanks a lot for the info and the hints. I set thresholds to 75 and 80 to prolong overall battery life time as described and advised e.g. on thinkwiki. Is this useless, too, then? Should I reset the thresholds to 96 and 100 again (default settings by the manufacturer)? – aiac Jun 11 '16 at 11:57
  • There is a section "How to choose good battery charge thresholds?" in the [FAQ](http://linrunner.de/en/tlp/docs/tlp-faq.html#battery). – linrunner Jun 11 '16 at 14:38
1

I actually can see count number (and tp-smapi is not loaded) on T580 and Debian 10:

    +++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = SMP
/sys/class/power_supply/BAT0/model_name                     = 00UR891
/sys/class/power_supply/BAT0/cycle_count                    =      8
  • Consider my above answers are from mid 2016! Actually starting with generation *80 `cycle_count` works for ThinkPads. I can confirm that for the X1C6 and i'm aware of other reports. – linrunner Jul 06 '19 at 07:58
  • Btw: the [FAQ](https://linrunner.de/en/tlp/docs/tlp-faq.html#cyclecount) already reflects this: "Cycle count is not available for all laptops. Positive exceptions are older ThinkPads supporting tp-smapi *and some newer hardware*." – linrunner Jul 06 '19 at 08:02