If you just want to disable the notifications, this will do the trick:
$ xfconf-query --channel xfce4-power-manager --property /xfce4-power-manager/general-notification --set false
Note: this will disable all notifications, including low battery warnings.
You can also do this with the GUI
by toggling the "Show notifications" checkbox under "Appearance".
![Xfce Power Manager Power manager settings](https://cdn.statically.io/img/i.sstatic.net/gSaOq.png)
Appearance
By checking Show notifications, you enable informational popups for
events like plugging and unplugging or low battery charge.
https://docs.xfce.org/xfce/xfce4-power-manager/1.4/preferences
At the time, I thought it might have had something to do with
the interaction between battery capacity loss and
charging thresholds.
Lithium-ion batteries lose capacity over time,
so maybe at some point in the battery's lifetime
the charge threshold would be right at the edge,
leading to a flurry of notifications
until the capacity dropped enough to be out of range.
The last full charge of my battery was at 95.10% 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
which seemed suspiciously close to 95%.
There is a
bug report (old link)
on the XFCE bug tracker that discusses a fix.
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.
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.
(It was a little hard to find this
because Bugzilla's robots.txt disallows indexing by search engines.)
The linked patch
suggests the issue is essentially just a "debouncing" problem,
wherein the charging bounces between 99% and 100%.
Flapping prevention for charge/discharge notifications
Added flapping suppression for a laptop that continually reverts between 99%
and 100% and spams the screen with charging/discharging/fullycharged messages
to the point where the notifications occurred many times per minute.
https://github.com/acidtonic/xfce4-power-manager/commit/d26e066d687e521836f56d7e2b9c6dc1d79c15a9
Unfortunately, the patch is dated 2017
and the XFCE maintainers haven't merged it yet.
I've checked the official git repository
just to make sure.
Note that while the bug report was opened in 2016,
this is not a recent problem.
For posterity,
here's the instances I've been able to find
of people describing this bug
presented in chronological order:
Arch Linux forum post from 2010:
I am having a problem with xfce. I have arch installed on an ibm t61 and
everything seems to work great.
Right now, if the laptop is plugged in, the 'battery is charging' bubble/tip
keeps flashing on and off in the right hand corner. Also with this laptop if
I head into the xfce4-power-manager the lid close and power button options
are greyed out.
Ubuntu forum post from 2012:
The power manager / battery keeps popping up a notification telling me my
laptop battery is charging, then a second later, tells me it's fully charged.
But I haven't unplugged the power, and I never had this issue with Ubuntu
proper.
Debian bug report from 2015:
xfce4-power-manager: infinite loop of battery charging/battery full popup
messages
[ . . . ]
Package: xfce4-power-manager
Version: 1.4.1-2
[ . . . ]
- What led up to the situation?
Logging into the system.
- What was the outcome of this action?
Battery is full/battery is charging pop ups repeat ad nauseum
- What outcome did you expect instead?
Battery to stay charged, as I'm on A/C power.
Manjaro Linux post from 2016
First, I using Manjaro xfce 16.06 CD2.
It show Power manager. Your battery is charging >><< Your battery is fully
charged.
This two notification appear continuity when my battery is full. But my
battery is bottle so I can’t disconnect from electricity supply.
Bug report on XFCE bug tracker from 2016:
Battery charging/full charged notification spamming
[ . . . ]
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.
Reddit post (r/thinkpad) from 2018:
Plugged in T410 cycles between AC and battery power at 100%?
I just got this T410 on eBay...
i5-520m, nVidia graphics, 6 GB RAM, 255 GB SSD, 9 cell battery (original I
think, lasts about 2h), 90W charger
...but it has an issue with the power. It is like the battery will charge to
100%, start discharging, then fully charge again every few seconds. Xfce
power manager will notify me every second of the current status: "Your
battery is charging" > "Your battery is fully charged". I thought it might
have been a bug with Ubuntu, but it will do it while it is sleeping too (the
battery LED on the back will flash every few seconds the same way). Is my
battery or power supply just begging to be replaced? Would I be able to fix
in software? I could probably disable power manager notifications, but that
feels more like a bandaid.
Manjaro Linux post from 2019:
Is it normal for Power Manager to constantly notify that "Your Battery is
fully charged" and "Your Battery is charging" every few seconds after the
battery has finished charging?
Just wanted to double check that nothing is wrong before I turn off the
notifications in case there's some other issues. Thanks.
xfconf-query --channel xfce4-power-manager --property /xfce4-power-manager/general-notification --set false