cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
michaeldjcox
Punch Card
Posts: 62
Registered: ‎01-08-2014
Location: United Kingdom
Views: 4,182
Message 1 of 7

linux battery detection during hot swap

I notice that if I hot swap in a different battery on my T440s.

 

(This is with linux mint 16 (based on ubuntu 13.10) with kernel 3.11.0-12-generic)

 

That the new battery is not detected.

 

That is until I plug in a power lead and then it detects it - which is pretty useless if I'm away form a power source.

 

(perhaps it will detect the battery if it decides to use it rather than the internal).

 

Does anyone have any experience on this?

 

 

 

 

____________________________

http://thinkpadmint.blogspot.co.uk/
michaeldjcox
Punch Card
Posts: 62
Registered: ‎01-08-2014
Location: United Kingdom
Views: 4,165
Message 2 of 7

Re: linux battery detection during hot swap

Furthermore I notice that:

 

Bat0 is the internal battery

Bat1 is the external battery

 

Under linux 16 the power in the external is drained down to 5% then the internal is drained down to zero.

 

It should work the other way right? Leave 5% on the internal?

____________________________

http://thinkpadmint.blogspot.co.uk/
michaeldjcox
Punch Card
Posts: 62
Registered: ‎01-08-2014
Location: United Kingdom
Views: 4,037
Message 3 of 7

Re: linux battery detection during hot swap

Does anybody now how to get linux to recognise a battery thats been replaced while the system is running without doing any of the following.

 

1. Shutdown/Restart  

2. Hibernate/thaw

3. Suspend/resume

 

(These all work but whats the point of hot-swap if I have to shutdown anyway...)

 

4. Plugging the AC adapter in

 

(This works but if there was somewhere to plug into I wouldn't need to insert a new battery)

 

I'd really love to know.

 

Prepared to pay for a solution to this!

 

£10 to your paypal account if it can be made to work on my laptop via a software or firmware solution (but no  solutions involving laptop surgery, soldering, voiding my warranty, or carrying a generator, other power source, or additional hardware!)

 

Offer available until I post here again to say it solved. 

 

Michael

____________________________

http://thinkpadmint.blogspot.co.uk/
michaeldjcox
Punch Card
Posts: 62
Registered: ‎01-08-2014
Location: United Kingdom
Views: 3,911
Message 4 of 7

Re: linux battery detection during hot swap

I raised a kernel bug report for this

 

Though it is most likly to be a T440s firmware bug from what I hear. 

____________________________

http://thinkpadmint.blogspot.co.uk/
michaeldjcox
Punch Card
Posts: 62
Registered: ‎01-08-2014
Location: United Kingdom
Views: 3,775
Message 5 of 7

Re: linux battery detection during hot swap

It turned out that catch number 1 that clicks out and back into to place when the external battery is slotted in must have an issue.

 

It seems it does not always travel far enough to trigger the ACPI event.

 

If I manually open and close the catch with my finger I can generate undock and dock ACPI events for the battery.

 

I guess I can live with that

 

Michael

 

 

____________________________

http://thinkpadmint.blogspot.co.uk/
hussong
Paper Tape
Posts: 2
Registered: ‎11-10-2017
Location: DE
Views: 1,325
Message 6 of 7

Re: linux battery detection during hot swap

Thanks for sharing, this just made my day!

Am in the same boat with a T450s running Ubuntu 16.04.3 LTS (Xenial Xerus). The battery properties (capacity etc.) would never update after an external battery swap, even when I was suspending to swap. It was driving me nuts, and it would have never occurred to me that this is a hardware issue.

Opening the two latches (that lock the external battery in place) as far as it will go does trigger the ACPI event and the battery properties update accordingly, great!
hussong
Paper Tape
Posts: 2
Registered: ‎11-10-2017
Location: DE
Views: 1,303
Message 7 of 7

Re: linux battery detection during hot swap

Addendum: Can confirm that it is latch number 1 (on the left when the battery is facing up, on the right when the keyboard is facing up) that triggers the ACPI event.

Check out current deals!


Shop current deals

Top Kudoed Authors