Comment 3 for bug 393008

Revision history for this message
Scott Howard (showard314) wrote :

From Bug #386778 reported by Patrick (patrick-voegeli):

Using Karmic, gnome-power-manager doesn't work fine. It won't detect that the battery is discharging or even running on battery. Also, when pluging in the AC to charged, it acts flacky.

When running on battery:
atrick@patrick-laptop:~$ acpi -ab --details
Battery 0: Unknown, 34%
Battery 0: design capacity 5200 mAh, last full capacity 4587 mAh = 88%
Adapter 0: off-line

When running on ac:
patrick@patrick-laptop:~$ acpi -ab --details
Battery 0: Charging, 34%, 01:12:51 until charged
Battery 0: design capacity 5200 mAh, last full capacity 4587 mAh = 88%
Adapter 0: on-line

Running on battery and plugging the AC:
patrick@patrick-laptop:~$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
20:27:54.653: computer_power_supply_battery_BAT0 property battery.remaining_time = 1569 (0x621) (new)
20:27:54.659: computer_power_supply_battery_BAT0 property battery.charge_level.percentage = 33 (0x21)
20:27:54.662: computer_power_supply_battery_BAT0 property battery.charge_level.rate = 0 (0x0)
20:27:54.665: computer_power_supply_battery_BAT0 property battery.charge_level.design = 56976 (0xde90)
20:27:54.668: computer_power_supply_battery_BAT0 property battery.charge_level.last_full = 50259 (0xc453)
20:27:54.671: computer_power_supply_battery_BAT0 property battery.charge_level.current = 17060 (0x42a4)
20:27:54.688: computer_power_supply_battery_BAT0 property battery.reporting.current = 1557 (0x615)
20:27:54.689: computer_power_supply_battery_BAT0 property battery.rechargeable.is_discharging = true
20:27:54.690: computer_power_supply_battery_BAT0 property battery.reporting.rate = 0 (0x0)
20:27:54.691: computer_power_supply_battery_BAT0 property battery.voltage.current = 10957 (0x2acd)
20:27:54.770: computer_power_supply_ac_adapter_ADP1 property ac_adapter.present = true

Running on ac and unplugging:
patrick@patrick-laptop:~$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
20:28:26.272: computer_power_supply_battery_BAT0 property battery.remaining_time = 4357 (0x1105)
20:28:26.279: computer_power_supply_battery_BAT0 property battery.charge_level.current = 17504 (0x4460)
20:28:26.280: computer_power_supply_battery_BAT0 property battery.reporting.current = 1577 (0x629)
20:28:26.282: computer_power_supply_battery_BAT0 property battery.voltage.current = 11658 (0x2d8a)
20:28:26.367: computer_power_supply_ac_adapter_ADP1 property ac_adapter.present = false

Both acpi and hal will detect the change from battery to charging IMMEDIATELY, but gnome-power-manager won't. It doesn't detect it's running on battery at all: the icon is like when running only on AC (only the plug icon), and if under preferences "running on ac" tab I pull the brightness down, it will decrease the brightness. In the general tab, the icon will only display if Display always is checked, the other 3 options hide the power-manager icon. Also, as stated before, when pluging the ac, it will first display discharging (even though it acts as when on AC, icon displayed is a battery) and after half a minute it will show the correct charging state (battery with the plug)

When unplugged:

root@patrick-laptop:~# cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: 3808 mA
remaining capacity: 2236 mAh
present voltage: 10717 mV
root@patrick-laptop:~# cat /proc/acpi/ac_adapter/ADP1/state
state: off-line

When plugged (just after plugging in, gnome-power-manager still has the battery only icon)
root@patrick-laptop:~# cat /proc/acpi/ac_adapter/ADP1/state
state: on-line
root@patrick-laptop:~# cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charging
present rate: 2488 mA
remaining capacity: 2187 mAh
present voltage: 11591 mV