After some more digging I have to agree 100% with Matti Laakso. If I
launch g-p-m --debug --no-daemon I see this:

TI:10:58:48     TH:0x9c30640    FI:gpm-cell-unit.c      
FN:gpm_cell_unit_print,78
 - charge design  54521
[...]
TI:10:58:48     TH:0x9c30640    FI:gpm-profile.c        
FN:gpm_profile_set_config_id,783
 - config_id = 901-54521
TI:10:58:48     TH:0x9c30640    FI:gpm-profile.c        
FN:gpm_profile_load_data,734
 - loading battery data from 
'/home/coma/.gnome2/gnome-power-manager/profile-901-54521-discharging.csv'
*** WARNING ***
TI:10:58:48     TH:0x9c30640    FI:gpm-array.c  FN:gpm_array_load_from_file,265
 - cannot open file 
/home/coma/.gnome2/gnome-power-manager/profile-901-54521-discharging.csv
TI:10:58:48     TH:0x9c30640    FI:gpm-profile.c        
FN:gpm_profile_load_data,745
 - no data found, generating initial (poor) data
TI:10:58:48     TH:0x9c30640    FI:gpm-profile.c        
FN:gpm_profile_load_data,734
 - loading battery data from 
'/home/coma/.gnome2/gnome-power-manager/profile-901-54521-charging.csv'
*** WARNING ***
TI:10:58:48     TH:0x9c30640    FI:gpm-array.c  FN:gpm_array_load_from_file,265
 - cannot open file 
/home/coma/.gnome2/gnome-power-manager/profile-901-54521-charging.csv
TI:10:58:48     TH:0x9c30640    FI:gpm-profile.c        
FN:gpm_profile_load_data,745
 - no data found, generating initial (poor) data


So the assumption of Matti Laakso is correct. And I think this model is not the 
only one that reports a different battery.charge_level.design in each cycle, so 
far battery.reporting.design (6580 now) seems to be more correct. I don't known 
what should be the correct way to detect a different battery, but I think that 
most users only have one battery, so perhaps the default should be to assume 
that it is always the same battery and provide some way to disable the behavior 
for people with multiple batteries.

$ lshal |grep battery
udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0'
  battery.charge_level.current = 35000  (0x88b8)  (int)
  battery.charge_level.design = 50218  (0xc42a)  (int)
  battery.charge_level.last_full = 48791  (0xbe97)  (int)
  battery.charge_level.percentage = 71  (0x47)  (int)
  battery.charge_level.rate = 8005  (0x1f45)  (int)
  battery.is_rechargeable = true  (bool)
  battery.model = '901'  (string)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.remaining_time = 15740  (0x3d7c)  (int)
  battery.reporting.current = 4586  (0x11ea)  (int)
  battery.reporting.design = 6580  (0x19b4)  (int)
  battery.reporting.last_full = 6393  (0x18f9)  (int)
  battery.reporting.rate = 1049  (0x419)  (int)
  battery.reporting.technology = 'Li-ion'  (string)
  battery.reporting.unit = 'mAh'  (string)
  battery.serial = ''  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.vendor = 'ASUS'  (string)
  battery.voltage.current = 7632  (0x1dd0)  (int)
  battery.voltage.design = 8400  (0x20d0)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0'  
(string)

-- 
g-p-m doesn't save charge and discharge profiles
https://bugs.launchpad.net/bugs/302570
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to