Attached is a patch to fix this bug. The problem is in function
dkp_daemon_get_on_battery_local of dkp-daemon.c. The logic is "we're on
battery as soon as _any_ battery goes discharging", but often batteries
have troubles reporting their charging/discharging status and just say
"unknown" (at least in my two laptops, an IBM T42 and an Asus Eee 901),
so relying on the batteries' status to figure out wether we are plugged
in or not is not acceptable. Rather, we should ask the AC power device
directly and change the above logic to: "we're on battery as soon as
_any_ AC supply goes online".

A patch is attached. It applies on 011-1ubuntu1. I would report it
upstream if I knew how.

I also uploaded the binaries to a PPA. To test this fix:

sudo add-apt-repository ppa:jmartinj/dkp
sudo apt-get update
sudo apt-get upgrade


** Attachment added: "fix_on_battery_detection.diff"
   http://launchpadlibrarian.net/35769054/fix_on_battery_detection.diff

-- 
devicekit-power fails to realize I'm on battery after AC disconnect
https://bugs.launchpad.net/bugs/384304
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to