7

I've got my laptop plugged in.

The xfce power manager is repeating, incessantly: "Your battery is charging", "Your battery is fully charged", "Your battery is charging", "Your battery is fully charged", "Your battery is charging", "Your battery is fully charged"... etc.

This has never happened before. The most likely explanation is that there is some short causing the power to keep dropping. I'm not aware of any loose connections or problems with my power supply. I'm sat in a cafe I've never sat in before. I can't say for sure.

UPDATE:

The problem is intermittent and persistent. Nathaniel M Beaver's fix fixed it under my then version of xfce4.

But the problem has reoccurred under xfce4 v4.14. Only now the problem is worse.

It seems to reoccur at random. A restart seems solves it. It actually seems to occur after the power is removed and replaced (I've yet to determine if suspend plays a role).

What's worse is that the fix no longer works. Given the instruction, xconf-query reports that the option no longer exists to disable its runaway messaging system. It says:

Property "/xfce4-power-manager/general-notification" does not exist on channel "xfce4-power-manager".

A call to xfconf-query --channel xfce4-power-manager -l shows that xconf no longer has an option to control the messages.

The Power Manager settings GUI no longer has an a notifications option either. It has a "Status notifications" option which is already off.

3
  • 1
    Not a fix, but I used this as a workaround: xfconf-query --channel xfce4-power-manager --property /xfce4-power-manager/general-notification --set false Commented Jul 12, 2019 at 12:00
  • I do believe this is worthy to be the answer.
    – markling
    Commented Jul 17, 2019 at 11:49
  • 1
    This is obviously undesirable for a laptop where it may be used off AC power and the low battery status should be noted. Might as well throw away the laptop and pretend we're living in the 1970's >_< Commented Jun 8, 2023 at 7:07

2 Answers 2

8

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

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.

2
  • 1
    I think the warning that the "fix" disables the low battery warning should be in BIG BOLD TEXT as it is easy to miss. Thank you for including all your in-depth research with links to the patches. It looks like, although the issue remains, the bug repository has moved: gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/22
    – hackerb9
    Commented Nov 2, 2023 at 19:31
  • 1
    @hackerb9 Thanks, I updated the link to the bug repository. Commented Jan 4 at 18:22
2

It seems that in xfce4 v4.14 the rogue messages can be turned off by going to the settings GUI, finding Power Manager, and switching the "Status notifications" on and off again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .