Comment 33 for bug 384304

Revision history for this message
Javier Martín (jmartinj) wrote : Re: [Bug 384304] Re: devicekit-power fails to realize I'm on battery after AC disconnect

@Wolfang:

Just to clarify, the patch above fixes the scenario in which devkit-power -d
reports "on-battery: no" after unplugging the AC, but apparently only when
the battery is fully charged. Under those circumstances, the battery
(through the /sys/devices filesystem) happens to report an "Unknown" status
(who knows why). That confuses the devkit-power daemon, since the
"on-battery" yes/no decision depends on the battery reporting a "charging"
or "discharging" status, and not on the AC device itself (which seems more
sensible to me).

The end result is that gnome-power-manager will never realize when AC goes
off-line and it will never switch to the "on battery" policy. The biggest
issue I had with this was that my laptop never went to sleep after closing
the lid (since I only instruct g-p-m to suspend when closing the lid on
batteries) and I've already found my laptop cooking in its bag three times.