After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760530 - Don't warn about low battery in peripherals on each boot/resume
Don't warn about low battery in peripherals on each boot/resume
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: power
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2016-01-12 14:59 UTC by Kamil Páral
Modified: 2019-03-20 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kamil Páral 2016-01-12 14:59:46 UTC
For the last 3-4 months I've been seeing "Your mouse batter is low" notification every time I started or resumed my system. Initially, the notification just appeared and disappeared, but as the battery level decreased, the notification received more severe wording and it stayed pinned on the screen until I actively dismissed it. I had to do it every single time, 20+ times per week, and it started to be quite annoying soon.

I believe I saw the notification for the first time around 50% of battery level (3-4 months back), and I saw the "critical" version of the notification around 15% of battery level (about 1 month back). Yesterday the battery finally died, I replaced it with a new one, and I finally got rid of that notification. But I imagine I'll start seeing it again in a few months and I'm not happy about that prospect.

While the overall idea is a great one (informing the user about low mouse battery), I'd like to question the current design of this feature:
* it gets triggered on every system start or resume, often in gdm and always in the user session
* there's no way to suppress it

This combination makes the feature less useful and more annoying very quickly. I'd like to suggest some of the following improvements:

a) don't start notifying about battery level at 50%, that's too soon. 30% would be more reasonable. Modern mice can last 6-12 months with a single battery.

b) don't notify on every system start/resume, but only on battery level change. So inform once at 30%, once at 25%, once at 20%...

c) treat the battery level as "critical" at 10% instead of 15%

d) once the battery level is critical, keep the requirement to manually dismiss it, but again only inform once for every 2-3% change (e.g. at 10%, 7%, 4%, 1%)

e) allow to suppress this notification by adding a "don't inform me again" action to the notification (that should not be the default action, but an extra button attached to the notification bubble). Alternatively (or together with that), there's no need for that extra action, but the default action should point to a place where this is configurable. Currently, it is not configurable anywhere. It would be logical to place this into Control Center -> Notifications (add a new "Low mouse battery" toggle) or Control Center -> Power (a similar toggle).


Implementing just b)+d) or just e) would still tremendously improve the current state and you would have my deep thanks. Implementing all of those would provide the best user experience, I believe.

Thank you.


gnome-shell-3.18.3-1.fc23.x86_64
gnome-settings-daemon-3.18.2-1.fc23.x86_64
Comment 1 Bastien Nocera 2016-01-12 18:12:57 UTC
(In reply to Kamil Páral from comment #0)
> For the last 3-4 months I've been seeing "Your mouse batter is low"
> notification every time I started or resumed my system. Initially, the
> notification just appeared and disappeared, but as the battery level
> decreased, the notification received more severe wording and it stayed
> pinned on the screen until I actively dismissed it. I had to do it every
> single time, 20+ times per week, and it started to be quite annoying soon.
> 
> I believe I saw the notification for the first time around 50% of battery
> level (3-4 months back), and I saw the "critical" version of the
> notification around 15% of battery level (about 1 month back). Yesterday the
> battery finally died, I replaced it with a new one, and I finally got rid of
> that notification. But I imagine I'll start seeing it again in a few months
> and I'm not happy about that prospect.
> 
> While the overall idea is a great one (informing the user about low mouse
> battery), I'd like to question the current design of this feature:
> * it gets triggered on every system start or resume, often in gdm and always
> in the user session
> * there's no way to suppress it
> 
> This combination makes the feature less useful and more annoying very
> quickly. I'd like to suggest some of the following improvements:
> 
> a) don't start notifying about battery level at 50%, that's too soon. 30%
> would be more reasonable. Modern mice can last 6-12 months with a single
> battery.

We don't. We started notifying at under 26%, and now under 10%:
https://bugs.freedesktop.org/show_bug.cgi?id=92920

> b) don't notify on every system start/resume, but only on battery level
> change. So inform once at 30%, once at 25%, once at 20%...

We don't have any state saved either in gnome-settings-daemon or in UPower.

> c) treat the battery level as "critical" at 10% instead of 15%

It was 13%, and it's now 5%.

> d) once the battery level is critical, keep the requirement to manually
> dismiss it, but again only inform once for every 2-3% change (e.g. at 10%,
> 7%, 4%, 1%)

We only notify on state changes, so only when going from normal -> low or low -> critical. We don't notify in between but it's possible you see those because the mouse disconnects and reconnects, for example.

> e) allow to suppress this notification by adding a "don't inform me again"
> action to the notification (that should not be the default action, but an
> extra button attached to the notification bubble). Alternatively (or
> together with that), there's no need for that extra action, but the default
> action should point to a place where this is configurable. Currently, it is
> not configurable anywhere. It would be logical to place this into Control
> Center -> Notifications (add a new "Low mouse battery" toggle) or Control
> Center -> Power (a similar toggle).

Really not interested in adding more options for this. Better off keeping state as above.

I would advise to test with a newer UPower (those changes aren't in a released version, but the patches should apply to the current release), and if it's still as annoying, we can start looking into being better at how we create notifications to avoid annoyance.

Putting on NEEDINFO until a newer UPower has been tested.
Comment 2 Kamil Páral 2016-01-13 09:32:17 UTC
(In reply to Bastien Nocera from comment #1)
> We only notify on state changes, so only when going from normal -> low or
> low -> critical. We don't notify in between but it's possible you see those
> because the mouse disconnects and reconnects, for example.

In that case this is something that is definitely not working and would solve this whole bug. I have Logitech M705 connected using standard USB receiver. I don't turn off the mouse (using a button on the bottom) ever. Yet I received the notification on every system start/resume. Maybe you consider that as mouse reconnection?

If you are willing to look into this, I can supply some debug information, and I can even use rechargeable batteries to switch normal and low energy levels easily.

> I would advise to test with a newer UPower (those changes aren't in a
> released version, but the patches should apply to the current release), and
> if it's still as annoying, we can start looking into being better at how we
> create notifications to avoid annoyance.
> 
> Putting on NEEDINFO until a newer UPower has been tested.

I'll try to test the patches against Fedora 23's version and let you know.
Comment 3 Kamil Páral 2016-01-28 16:05:59 UTC
OK, turns out the referenced patches don't really do much. 3e49e65 lowers the warning levels threshold and db4f9b4 changes UPower.conf. I did apply db4f9b4, but I did not apply 3e49e65, because it was easier for me to test with higher threshold numbers (wider battery level range to hit when discharging batteries) - should not have any effect except for warning sooner.

So, with UsePercentageForPolicy=true, the warnings seem to arrive when expected. That's OK.

However, it still does notify you for every system start/resume. So no change there. I know the notification level was decreased below 10% charge, so it will not bug people for too long (let's say 2-3 weeks with my mouse), but still, it would be nice if it notified only once, or with some steps (e.g. once for every 2% decreased).

You said "We don't have any state saved either in gnome-settings-daemon or in UPower." and then you said "We only notify on state changes". I don't really understand that, it seems to contradict each other. What about saving a simple key "last_warn=none|low|crit" in gsettings/dconf/somewhere else and using it to notify once for each threshold reached?

I.e.:
if level < level_crit:
  if last_warn != crit:
    last_warn = crit
    notify(crit)
else if level < level_low:
  if last_warn != low:
     last_warn = low
     notify(low)
else:
  last_warn = none

Seems simple enough, if you're willing to store the value somewhere.
Comment 4 Bastien Nocera 2016-02-03 15:12:58 UTC
(In reply to Kamil Páral from comment #3)
> OK, turns out the referenced patches don't really do much. 3e49e65 lowers
> the warning levels threshold and db4f9b4 changes UPower.conf. I did apply
> db4f9b4, but I did not apply 3e49e65, because it was easier for me to test
> with higher threshold numbers (wider battery level range to hit when
> discharging batteries) - should not have any effect except for warning
> sooner.
> 
> So, with UsePercentageForPolicy=true, the warnings seem to arrive when
> expected. That's OK.
> 
> However, it still does notify you for every system start/resume. So no
> change there. I know the notification level was decreased below 10% charge,
> so it will not bug people for too long (let's say 2-3 weeks with my mouse),
> but still, it would be nice if it notified only once, or with some steps
> (e.g. once for every 2% decreased).
> 
> You said "We don't have any state saved either in gnome-settings-daemon or
> in UPower." and then you said "We only notify on state changes". I don't
> really understand that, it seems to contradict each other. What about saving
> a simple key "last_warn=none|low|crit" in gsettings/dconf/somewhere else and
> using it to notify once for each threshold reached?

The device appearing with a "warning-level" of none, which will be updated to critical if the battery level is low enough when read.

Disconnecting and connecting the mouse will make it forget the warning level (it's like connecting a new device).

We only warn when the warning-level changes, but don't keep any record of previous warning levels after disconnection. So both of those statements are correct.

> I.e.:
> if level < level_crit:
>   if last_warn != crit:
>     last_warn = crit
>     notify(crit)
> else if level < level_low:
>   if last_warn != low:
>      last_warn = low
>      notify(low)
> else:
>   last_warn = none
> 
> Seems simple enough, if you're willing to store the value somewhere.

It's simple except when it's not...

How would we know to warn if the device was recharged and reached that != none warning-level again?

How can we warn again (resident notification) without it showing up in the notifications area again, but still being present in the notifications list?

The devil is in the detail, and implementing this would require substantial changes to gnome-settings-daemon and possibly UPower.
Comment 5 Kamil Páral 2016-02-03 15:59:25 UTC
OK, I understand how it works now, and I changed the bug title to RFE "don't warn on every boot".

> How would we know to warn if the device was recharged and reached that !=
> none warning-level again?

I can't find a bug in that code. If the device is recharged, last_warn is set to "none", and the next time the battery level goes below level_low threshold, it notifies you.

> How can we warn again (resident notification) without it showing up in the
> notifications area again, but still being present in the notifications list?

Well, naive implementation is easy :-)

if level < level_crit:
  if last_warn != crit:
    last_warn = crit
    notify(crit)
  else if last_warn == crit:
    notify(crit, resident=True)
...
Comment 6 Luc 2016-03-26 21:34:17 UTC
+1 for repeated warnings are boring.

Considering that some mouse models are announcing a 3 years battery life, low battery" levels should be configurable globally or per model (5% of 3 years means around 2 months left, and 15% means around 6 months left) 

Specially for laptop users, ability to disable warnings is desirable: many users will not change the battery before the peripheral cannot be used anymore, and "always" have some spare batteries at home.

At worst, laptop users can switch back to the integrated mousepad or keyboard until they can replace the battery.
Comment 7 Garry Wilson 2017-09-12 01:31:35 UTC
Have to agree with the other two guys. The fact that you can't disable those low battery warning messages is very annoying.
Is it at least possible to change the threshold manually? I changed the low and critical tresholds in UPower.conf, but I still got the low battery message for my mouse at 10%. Do those thresholds only apply to laptop batteries and not peripherals?

For the time being I disabled the upower deamon altogether.
Comment 8 Rasmus Underbjerg Pinnerup 2018-06-11 15:25:00 UTC
I've been bothered by this error for the last half year as well, only with me it's the keyboard (Logitech MK700). I get the "low battery" error on every bootup, and it's been going for about half a year now. 

Now it's changed from the 10% warning to the 5% one saying: "Keyboard battery low. Wireless keyboard is very low in power (5%). This device will soon stop functioning if not charged."

This pops up about every ten minutes and has to be manually dismissed. I really don't care to struggle with that for the next couple of months.

Clearly, I could just change batteries now, but why should I not use the full capacity of the batteries? This warning is very annoying indeed.
Comment 9 GNOME Infrastructure Team 2019-03-20 11:32:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME'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.gnome.org/GNOME/gnome-settings-daemon/issues/287.