On my laptop (a MacBook Pro 11,2 from this year), the firmware emits change events only for the AC power when the power is plugged or unplugged. This causes upower to miss the events and not update the UI until the next poll interval (unfortunately this firmware has no change events at all for the battery, so polling is required).
Which version of upower is this with?
upower-0.99.2-4.fc21.x86_64
In up_daemon_device_changed_cb(), we have: static void up_daemon_device_changed_cb (UpDevice *device, GParamSpec *pspec, UpDaemon *daemon) { <snip> /* refresh battery devices when AC state changes */ g_object_get (device, "type", &type, NULL); if (type == UP_DEVICE_KIND_LINE_POWER) { /* refresh now */ up_daemon_refresh_battery_devices (daemon); } up_daemon_update_warning_level (daemon); } Can you add some debug to that function, and see whether it's getting called correctly? Otherwise, I'll need a debug log.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/upower/upower/issues/42.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.