Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

battery monitor refresh and warning #42

Closed
cburgard opened this issue Apr 27, 2022 · 0 comments
Closed

battery monitor refresh and warning #42

cburgard opened this issue Apr 27, 2022 · 0 comments

Comments

@cburgard
Copy link

I'm using a Lenovo T14s, running archlinux with LXDE.
lxpanel does an awesome job, thank you very much for this excellent piece of software!
My only complaint right now is that the battery monitor behaves weirdly, namely:
Whenever the power is plugged or unplugged, I get a "Battery low" warning for a few moments, regardless of how full the battery is currently. This is a bit annoying, especially when you're on an irregular power supply (like, e.g., power outlets in public transport), because you'll get warnings every few seconds. This is dangerous because you'll start ignoring these warnings and miss them when they're actually important - this has happened to me before.
Looking through the code, I was trying to figure out whether there's a way to avoid this happening. I don't really know how this works exactly, but as far as I can see, the battery monitor just reads out whatever is in the ACPI provided files, which is fair.
I suppose the real issue is with acpi and/or the hardware not providing correct numbers in the moment of plugging in or out, and I'm not sure how much can be done about that.
One "workaround" however would be to reduce the frequency at which the battery monitor checks the input, so that short fluctuations are not picked up - and let's be real: we don't need battery updates more than every minute or so.
So please take this as a feature request to add an option to manually set / override the frequency at which the monitor updates itself - or, alternatively, to add a "grace period" to the battery notification such that the warning is only displayed if the battery is below threshold for a certain number of time (5 seconds or so), to suppress "fake" notifications due to momentary fluctuations.

@ib ib added the enhancement New feature or request label Dec 13, 2024
ib added a commit that referenced this issue Jan 24, 2025
There is often a short fluctuation in the calculation of the remaining
battery life, so check that the calculation remains stable for about a
minute to avoid false alarms.

Add one minute to the default alarmTime to account for this delay.

This closes github issue #42, reported by cburgard.
@ib ib removed the enhancement New feature or request label Jan 24, 2025
@ib ib closed this as completed Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants