-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handling of two/multiple batteries #25
Comments
Hi, What's the available battery information when there is more than one battery? Is there official documentation about it? Is that information consistent between all the different models, or are there different way of working? As an example: if I have 2 batteries available, the first one is at 80% and the second one at 20% (or the reverse), how do I know which one to take into account? what are the statuses in that case? One at status Discharging and the other in status Unknown, as yours? or other statuses are possible? If the second one is in the status Unknown, can I still reliably know if it is charged or not and up to which level? I would have to find clear documentation about all that before starting any change. As I'm not sure I'll be able to find documentation I guess I'll have to read source code of other existing battery icon tools and guess from there what's the standard behaviour, or to contact other devs and ask for info. In any case, I don't want to enter in a trial and error situation or to face this kind of problems: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/379599 ...and I also need to buy an second battery for testing then, because I will not release code that I cannot test. So, quite a lot of questions/constraints to get this done. |
Thanks for your reply and considering this feature! On my machine (Lenovo X250) it looks like it will use the 2nd battery (BAT1) until it's nearly empty and then falls back to the internal one (BAT0). I came across cbatticon via https://wiki.archlinux.org/index.php/Laptop#ACPI, but have had my own battery widget for AwesomeWM extended in this regard: https://gist.github.com/blueyed/dcc121cbcfcdc9a67019. |
Stupid question: can the external battery be connected/disconnected at any time? |
Yes. |
Supporting this would be great, I have a T460s, also with two internal, non exchangeable batteries |
Yeah, it's the next thing I would like to do. I already prepared the work by making the detection of power supplies dynamic (instead of at launch time). |
@valr Any progress on it till now? I have same situation with Thinkpad X260 and two batteries. |
I have another Lenovo model and I wanted to leave some more documentation of the battery interface (even though I guess you already know it):
My experience is consistent with what has been described above: DischargingOnly
I assume the And it automatically switches from
ChargingAfter charging it a few minutes, only
When both are fully charged, it turns into a double
Other stuffThe only differences between the two batteries I could find, was HotpluggingAfter hot-unplugging the |
@valr, it is the same for me. The difference between both batteries is serial_number, capacity, energy_full, energy_full_design and energy_now as they are dynamic values. BAT0 seems always the internal one and BAT1 the external one which can be removed on-the-fly. After hotplug BAT1 is removed from sysfs on my X260 too. |
I added some more information about charging into the post above. I might update the post in the future for the case that both are (almost) empty. @valr I am glad to hear that you are working on it. |
Seems there is no progress on this. Do you need someone to work on this? |
@hasufell , I'm busy reworking the code. In its current state it would not be possible to implement multiple batteries (or that would be super ugly). I should do some commits in the coming days with the reworked code. |
Any update on this? I have a Surface Book 2 and would love to see the status of the two batteries. Especially hot-unplugging and hot-plugging, since the screen is also a tablet and I tend to unplug/replug it often. |
In my Lenovo X250 I have two batteries: one "external" that can be removed (BAT1) and an internal one (BAT0).
The internal one gets used automatically when the external one is empty (at 5%), and the status of the external one (BAT1) is
battery status: 1 - Unknown
then (see also issue #16).It would be nice, if cbatticon could monitor both at the same time, preferring BAT1 and falling back to BAT0.
For this to be really useful it would be nice to have the information about the displayed battery in the tooltip (and maybe (optionally) in the icon).
The text was updated successfully, but these errors were encountered: