! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Battery charging/full charged notification spamming


Description Simon Dedman 2016-08-10 20:11:17 CEST
Bug appears in 1.4.4 & 1.6.0: laptop (lenovo thinkpad X230) w/ xubuntu 15.10, has recently started happening & I'm not sure what's caused the change.

When plugged in the battery will charge to full, I’ll get the power manager notification "You battery is fully charged" then almost immediately "Your battery is charging", and it'll just repeat back & forth, one replacing the other roughly every second.

At least 2 other people have had this bug but haven't filed it here:

Happy to help with log files or whatever just let me know what you need.
Comment 1 acidtonic 2017-04-02 01:55:44 CEST
I was just in the process of opening a merge request since I ran into this problem on my T410 Thinkpad and fixed it.

Here's a patch against 1.6.0 stable which corrected the issue for me.


Notes: I implemented a 120 second "flap timer" that is reset each time one of the notifications specifically for battery full/charging/discharging occurs while the other types of notifications are shown as usual.

There is one small caveat which is that the very first read of the flap_timer is an uninitialized read yet after that it's initialized to the systems current timer using the monotonic clock call from glib which I assumed was appropriate.

Also the last charge state the system settles into once flapping stops may not be shown and it would be trivial to set an event callback timer each time a notification is suppressed to eventually show the "final state" if flapping stopped since the timer was set.

TODO: Adding a gui to configure the flapping timeout may be desirable. As-is the value is hardcoded and always enabled for all battery/ups devices connected.

Feel free to use the code and I can certify this patch was 100% authored by me and I have the rights to grant usage of the code to this xfce project under it's original license terms.
Comment 2 Nathaniel Beaver 2019-07-19 18:10:16 CEST
Some write-up here:


Just conjecture, but reproducibility might have something to do with lithium-ion battery capacity loss. When I noticed this, the last full charge of my battery was suspiciously close to 95% of design capacity:

$ acpitool -B
  Battery #1     : present
    Remaining capacity : unknown, 98.58%, 00:02:27
    Design capacity    : 5200 mA
    Last full capacity : 4945 mA, 95.10% of design capacity
    Capacity loss      : 4.904%
    Present rate       : 1707 mA
    Charging state     : Charging
    Battery type       : Li-ion 
    Model number       : 45N1005
    Serial number      : 35581

This bug dates back to 2010 at least.







Comment 3 Simon Dedman 2019-07-19 19:26:45 CEST
Interesting point Nathaniel. My laptop battery is completely dead because it's so old, so this may be a factor. I believe I just turned the notification off!
Comment 4 Git Bot editbugs 2020-05-27 01:40:39 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.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.xfce.org/xfce/xfce4-power-manager/-/issues/22.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #12755

Reported by:
Simon Dedman
Reported on: 2016-08-10
Last modified on: 2020-05-27


Ali Abdallah
CC List:
6 users



Additional information