DevKit-Power doesn't detect the system is running on battery power if you boot your laptop without AC power

Emilio López buhitoescolar at
Tue Nov 17 10:16:31 PST 2009


2009/11/17 Richard Hughes <hughsient at>:
> 2009/11/6 Emilio López <buhitoescolar at>:
>> Running "devkit-power -d", it reveals it's not
>> gnome-power-manager's fault, as devkit doesn't detect the battery and says
>> it's running on AC power. I'm using devkit-power 011 on Ubuntu Karmic Koala,
>> and my PC is an Acer Aspire 6930.
> Do you have any battery devices in /sys/class/power_supply?

emilio at laptop:~$ ls /sys/class/power_supply

It doesn't seem so. But I have noticed that conky made it work, who
knows why. So I disabled conky, restarted, and the problem was there
again. So, if devkit-power doesn't see my, and then I do this,

emilio at laptop:~$ cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            2056 mA
remaining capacity:      1956 mAh
present voltage:         10699 mV

The battery magically appears, and all the actions get triggered (like
lowering screen brightness).

emilio at laptop:~$ ls /sys/class/power_supply

It seems that cheching that /proc/acpi/battery/BAT1/state makes
devkit-power aware of the battery. Any thoughts?


More information about the devkit-devel mailing list