battery status can't handle with multiple batteries simultaneously

Bug #585189 reported by Nikil Mehta
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Battery Status
Confirmed
High
Ivan Zorin

Bug Description

At some laptops with two batteries battery status can't correctly provide information about both batteries, if it's plugged in simultaneously: in such cases battery status displays information only about one battery.
Two batteries is a fairly common case for laptop users so Battery Status should handle such use cases.

Revision history for this message
Ivan Zorin (iaz) wrote :

Thank you for taking the time to report this bug and helping to make BatteryStatus better.
Could you try, please, new version 0.1.1 from PPA ( https://edge.launchpad.net/~iaz/+archive/battery-status ). This is how it should works now:
one (any) battery without AC - correctly;
one (any) battery with AC - correctly;
both batteries without AC - correctly, but will be reported status information about battery which has been plugged first;
both batteries with AC - the same thing: it should works correctly, but will be reported status information about battery which has been plugged first.
Let me know, if I'm right, and correct me, if I'm wrong. Then we can keep moving on :-)

Changed in battery-status:
assignee: nobody → Ivan Zorin (iaz)
importance: Undecided → Medium
status: New → Triaged
Ivan Zorin (iaz)
Changed in battery-status:
milestone: none → 0.2
Revision history for this message
Nikil Mehta (nikil.mehta) wrote :

Ok, installed 0.1.1, rebooted and tested. Unfortunately the applet is not working like you intend. Here's what it does:

One (any) battery without AC: Correct.
One (any) battery with AC: Correct.
Both batteries without or without AC: Icon is frozen and left clicking on the applet does absolutely nothing. Nothing pops up. Very strange?

Revision history for this message
Ivan Zorin (iaz) wrote :

How about this - try to run applet in window debug mode (from terminal):
$ /usr/lib/battery-status/battery-status --window
and paste here some logs/tracebacks/warnings/messages/etc if such appears.

Revision history for this message
Nikil Mehta (nikil.mehta) wrote :

Here's the output:

~ -> /usr/lib/battery-status/battery-status --window
Traceback (most recent call last):
  File "/usr/lib/battery-status/battery-status", line 3099, in <module>
    main(sys.argv)
  File "/usr/lib/battery-status/battery-status", line 3080, in main
    run_in_window()
  File "/usr/lib/battery-status/battery-status", line 3067, in run_in_window
    applet_factory(app, None)
  File "/usr/lib/battery-status/battery-status", line 3034, in applet_factory
    BatteryApplet(applet, iid)
  File "/usr/lib/battery-status/battery-status", line 1333, in __init__
    self.init_power_dbus()
  File "/usr/lib/battery-status/battery-status", line 2425, in init_power_dbus
    self.power_dbus_signal()
  File "/usr/lib/battery-status/battery-status", line 2577, in power_dbus_signal
    for battery_address in battery_devices:
NameError: global name 'battery_devices' is not defined

Looks like a typo. If I replace 'battery_devices' with 'power_battery_devices' it seems to work.

It would be nice if it tried to select the battery that it displays information for based on the one that is currently discharging. Of course, the ideal scenario would be to display information about both batteries, like the default battery status indicator that ships with Lucid :)

Revision history for this message
Ivan Zorin (iaz) wrote :

> Looks like a typo. If I replace 'battery_devices' with 'power_battery_devices' it seems to work.

Yep, that's it. So now, as I've supposed, with both batteries information available only for one battery, right?
Then the problem is: battery status just can't handle with multiple batteries simultaneously (so I'll change text of report a little bit) - I agree, that this feature should be implemented (as correctly as possible), but this requires some essential modifications of code, so I think that this bug will be fixed in a couple weeks, not earlier.

Ivan Zorin (iaz)
summary: - "No Battery" detected for laptops with multiple batteries
+ battery status can't handle with multiple batteries simultaneously
Ivan Zorin (iaz)
description: updated
Changed in battery-status:
importance: Medium → High
status: Triaged → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.