You are not logged in.

#1 2014-04-24 21:39:13

Tumi
Member
From: Czech Republic
Registered: 2010-04-07
Posts: 10

[SOLVED] Thinkpad T540p battery threshold - slow charging

Hi all,

has anyone successfully running tpacpi-bat on T540p?

I was trying to use tp_smapi at first, but dmesg says that this device is not supported, so I tried tpacpi-bat (git version from AUR). With this module I'm able to set the thresholds for battery but the charging is insanely slow. (That's making this similar to this topic. But I'm on different device, use different module and dmesg is not showing nothing helpful..)

For power management I use tlp. And when I run

# tlp fullcharge

everything works again. Charging fast as usual. Even with tpacpi-bat installed. That probably means tpacpi-bat is setting threshold correctly. But when it has different values then default it refuses to charge battery...

Any suggestions? Advices appreciated smile

Last edited by Tumi (2014-04-25 08:26:57)

Offline

#2 2014-04-24 22:30:17

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

Tumi wrote:

...
I tried tpacpi-bat (git version from AUR). With this module ...

The tpacpi-bat package does not provide any modules, it contains only a script. You can see this with: $ pacman -Ql tpacpi-bat
The kernel module you need is provided by acpi_call-git from AUR. Have you compiled the acpi_call module for the current kernel?

Offline

#3 2014-04-24 22:46:45

Tumi
Member
From: Czech Republic
Registered: 2010-04-07
Posts: 10

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

Yes I have. I have installed acpi_call-git and compiled on current kernel.

Offline

#4 2014-04-24 22:57:33

Tumi
Member
From: Czech Republic
Registered: 2010-04-07
Posts: 10

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

I just found that in  '# tlp-stat' output I have this when tpacpi-bat is enabled:

+++ ThinkPad Battery Status (Main)
/sys/class/power_supply/BAT0/manufacturer                   = SANYO
/sys/class/power_supply/BAT0/model_name                     = 45N1145
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  56160 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  56480 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  26100 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Unknown

tpacpi-bat.BAT0.startThreshold                              =     40 [%]
tpacpi-bat.BAT0.stopThreshold                               =     80 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

And this when it has the default settings:

+++ ThinkPad Battery Status (Main)
/sys/class/power_supply/BAT0/manufacturer                   = SANYO
/sys/class/power_supply/BAT0/model_name                     = 45N1145
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  56160 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  56480 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  26140 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  28389 [mW]
/sys/class/power_supply/BAT0/status                         = Charging

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Check the status and power_now value.. It's not detecting the battery correctly or what does it mean?

Last edited by Tumi (2014-04-24 22:58:42)

Offline

#5 2014-04-25 07:37:52

linrunner
Member
Registered: 2013-04-21
Posts: 52

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

I don't think your charging is "insanely slow". It's just that 26,1 of 56,2 Wh = 46% is above the lower charging threshold of 40%, so it doesn't charge at all (works as designed). See the explanations here -> http://linrunner.de/en/tlp/docs/tlp-con … thresholds

You may remove the tpacpi-bat package because TLP brings it's own tpacpi-bat; only the acpi-call package is needed -> https://wiki.archlinux.org/index.php/TLP

Thresholds are either set permanently in the configuration (see link above) or temporarily with tlp setcharge -> http://linrunner.de/en/tlp/docs/tlp-lin … thresholds

ps. "status  = Unknown" just means charging stopped because of thresholds (the kernel acpi code doesn't know about thresholds)

Last edited by linrunner (2014-04-25 07:42:39)

Offline

#6 2014-04-25 08:24:56

Tumi
Member
From: Czech Republic
Registered: 2010-04-07
Posts: 10

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

Oh! I removed tpacpi-bat now, set thresholds in tlp config and now everything seems fine. Thank you, I was really confused by that behavior...

Thanks a lot! I owe you a beer! big_smile

Regards, Tumi

Offline

#7 2014-04-25 08:33:31

linrunner
Member
Registered: 2013-04-21
Posts: 52

Re: [SOLVED] Thinkpad T540p battery threshold - slow charging

Fine.

Tumi wrote:

Thanks a lot! I owe you a beer! big_smile

You're welcome! big_smile

Offline

Board footer

Powered by FluxBB