upower does not notice that I plugged in a different battery

Bug #1532713 reported by Antti Haapala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upower (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have a Lenovo T450 with hotswappable batteries, and upower and indicator-power are a complete mess on this model. Just 30 minutes ago I got a new larger capacity secondary battery, plugged it in, and upower never seems to notice that it was changed!

% cat /sys/class/power_supply/BAT1/energy_full_design
71280000
% cat /sys/class/power_supply/BAT1/energy_full
74800000
% cat /sys/class/power_supply/BAT1/energy_now
42060000

vs

Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: AC
  power supply: yes
  updated: Mon 11 Jan 2016 10:47:34 AM EET (1152 seconds ago)
  has history: no
  has statistics: no
  line-power
    warning-level: none
    online: yes
    icon-name: 'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: BAT0
  vendor: LGC
  model: 45N1113
  serial: 1210
  power supply: yes
  updated: Mon 11 Jan 2016 11:06:28 AM EET (18 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: fully-charged
    warning-level: none
    energy: 23.22 Wh
    energy-empty: 0 Wh
    energy-full: 23.42 Wh
    energy-full-design: 23.48 Wh
    energy-rate: 4.337 W
    voltage: 12.76 V
    percentage: 99%
    capacity: 99.7445%
    technology: lithium-ion
    icon-name: 'battery-full-charged-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: BAT1
  vendor: LGC
  model: 45N1127
  serial: 10284
  power supply: yes
  updated: Mon 11 Jan 2016 11:05:32 AM EET (74 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: charging
    warning-level: none
    energy: 41.69 Wh
    energy-empty: 0 Wh
    energy-full: 41.69 Wh
    energy-full-design: 23.48 Wh
    energy-rate: 21.879 W
    voltage: 11.632 V
    percentage: 55%
    capacity: 100%
    technology: lithium-ion
    icon-name: 'battery-good-charging-symbolic'
  History (charge):
    1452503132 55.000 charging
  History (rate):
    1452503132 21.879 charging

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply: yes
  updated: Mon 11 Jan 2016 11:05:32 AM EET (74 seconds ago)
  has history: no
  has statistics: no
  battery
    present: yes
    state: charging
    warning-level: none
    energy: 64.91 Wh
    energy-full: 65.11 Wh
    energy-rate: 26.216 W
    time to full: 27 seconds
    percentage: 99.6928%
    icon-name: 'battery-full-charging-symbolic'

Daemon:
  daemon-version: 0.99.3
  on-battery: no
  lid-is-closed: no
  lid-is-present: yes
  critical-action: PowerOff

Wouldn't it be equally consuming to read the `energy_full` and `energy_full_design` every now and then, and especially if a battery event occurs?! Now even if I unplug, replug the adapter, upower still does not realize that I have a completely different battery plugged in!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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