teleshoes / tpacpi-bat

ThinkPad ACPI Battery Util
GNU General Public License v3.0
434 stars 43 forks source link

Can't set force discharge on T430s #12

Closed towo closed 11 years ago

towo commented 11 years ago

Hey there,

tried porting the ultrabay discharge leveling script... but I don't seem to be able to set force discharge:

[22:27] towo@loki:~/src/tpacpi-bat $ sudo /usr/local/sbin/tpacpi-bat -v -s --fd 1 1
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSS 0x101
Response: 0x0
[22:27] towo@loki:~/src/tpacpi-bat $ sudo /usr/local/sbin/tpacpi-bat -v -g --fd 1  
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSG 0x1
Response: 0x700
no
teleshoes commented 11 years ago

{ultrabay/slice are battery 2, main is battery 1}

ok the calls look right, so i can safely say its either a particular problem {like something else is setting force discharge elsewhere, or you dont have a main battery in and are setting slice, or something weird}, or, more likely, a problem with your BIOS.

the identical calls work for me on a w520.

wolke:~$ sudo tpacpi-bat -v -s --fd 1 0
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSS 0x100
Response: 0x0
wolke:~$ sudo tpacpi-bat -v -g --fd 1
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSG 0x1
Response: 0x700
no
wolke:~$ sudo tpacpi-bat -v -s --fd 1 1
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSS 0x101
Response: 0x0
wolke:~$ sudo tpacpi-bat -v -g --fd 1
Call    : \_SB.PCI0.LPC.EC.HKEY.BDSG 0x1
Response: 0x701
yes
towo commented 11 years ago

Weird stuff. Tried to see if tlp interfered, and tlp says I can't even force a discharge when not on AC? How did that old script every work? ;)

teleshoes commented 11 years ago

old script used smapi, i think, instead of the new acpi interface

towo commented 11 years ago

Yes, I'm currently porting it. But setting force discharge should work without being on AC, correct?

teleshoes commented 11 years ago

depends on what you mean by 'should'. of course it should, its stupid not to be able to balance your batteries.

however, the BIOS impl could easily explicitly forbid this because lenovo BIOS devs hate customers {im bitter about them suddenly killing support for faster RAM in my w520 simply because someone left it off a spec sheet. add all the nonsense bugs with cpu scaling that took a year to fix, and the explicit disabling of critical interfaces suddenly seems plausible.}

towo commented 11 years ago

I'll regard this is a hardware bug, then. Damnit. :|

teleshoes commented 11 years ago

wait wait, i just remembered when i had two bats. the workaround was to run 3 force-discharges

teleshoes commented 11 years ago

tpacpi-bat -v -s --fd 1 1 tpacpi-bat -v -s --fd 2 0 tpacpi-bat -v -s --fd 1 1 or something like that

teleshoes commented 11 years ago

give that a shot, i think it only worked for me because of a bug. it was months ago so my memory may be faulty ;)

linrunner commented 11 years ago

Hi,

if you have a problem with TLP, why do you file an issue here? ;-)

The difference between native tpacpi-bat -s FD and via tlp discharge is that TLP ensures that the power supply is connected before calling tpacpi-bat -s FD. TLP 0.3.7 and up uses tpacpi-bat seamlessly (contained in the tlp package).

teleshoes commented 11 years ago

{p.s.: linrunner, thats incorrect behaviour. --force-discharge is principally to switch batteries}

towo commented 11 years ago

No, doesn't seem to work.

On Sun, May 12, 2013 at 10:47 PM, Elliot Wolk notifications@github.comwrote:

tpacpi-bat -v -s --fd 1 1 tpacpi-bat -v -s --fd 2 0

tpacpi-bat -v -s --fd 1 1 or something like that

— Reply to this email directly or view it on GitHubhttps://github.com/teleshoes/tpacpi-bat/issues/12#issuecomment-17785035 .

teleshoes commented 11 years ago

ah well.

towo commented 11 years ago

Nah, @linrunner, I just checked if tlp was somehow stopping me from forcing a discharge, I didn't even consider that at first. Unless tlp is being very ninja atm, though, it isn't. :)

linrunner commented 11 years ago

TLP does not switch batteries, just discharge for recalibration.

Let's agree that Lenovo f***ed it up once again.

teleshoes commented 11 years ago

@linrunner right, sorry, i guess battery-balancing is an application-level feature from TLP's vantage point. {i prefer tools that expose all the underlying functionality at the cost of ease-of-use, rather than solutions that let users do the most essential tasks they need to with as few button-pushes as possible at the cost of being able to do everything that they might want to.}

yea lenovo ftw