blueman icon indicating copy to clipboard operation
blueman copied to clipboard

Annoying battery notifications

Open JPenuchot opened this issue 1 year ago • 13 comments
trafficstars

blueman: 2.4 BlueZ: 5.73 Distribution: Arch Linux Desktop environment: Sway

Hi,

I'm getting a notification every time my earbuds' batteries drop by 1%. It is getting pretty annoying, how do I disable that?

Regards, Jules

JPenuchot avatar Apr 02 '24 19:04 JPenuchot

Right-click, Plugins, ConnectionNotifier

cschramm avatar Apr 02 '24 19:04 cschramm

Right-click, Plugins, ConnectionNotifier

This also disables all connected/disconnected messages, not just battery updates. I would like to see the battery status only once when the device is first connected, but not on subsequent updates (drop by 1%).

ouuan avatar Apr 07 '24 09:04 ouuan

To be honest I haven't seen a device that provides battery updates with a 1 % granularity. We can make notifications configurable, of course, but could it be a reasonable tradeoff to only show new values if they are multiples of 10 % or would that still annoy you?

cschramm avatar Apr 08 '24 06:04 cschramm

We can make notifications configurable, of course, but could it be a reasonable tradeoff to only show new values if they are multiples of 10 % or would that still annoy you?

10% only sounds acceptable to me.

ouuan avatar Apr 08 '24 06:04 ouuan

I also find this annoying, especially since my keyboard's battery is "unstable". So I add an option to turn off battery updates: https://github.com/4eUeP/blueman/commit/5a9ac2259c719681178acf1b3062cafabdecaeef

We can make notifications configurable could it be a reasonable tradeoff to only show new values if they are multiples of 10 %

How about showing notifications only when the battery level is lower than a value(e.g., 10%)?

Proposal: a new option, e.g., min-battery-level: Int. Notifications will be shown only if the current battery level is below the setting. 0 means disable battery-updates notifications.

4eUeP avatar Apr 08 '24 12:04 4eUeP

To be honest I haven't seen a device that provides battery updates with a 1 % granularity.

The Galaxy Buds2 Pro do that unfortunately :/

JPenuchot avatar Apr 09 '24 15:04 JPenuchot

Not sure about a minimum battery level. The purpose of the notifications is (or was) to inform about the current level. Most of that should be rather up to a power management tool and in many cases they probably do handle it by now (via UPower).

A "running low" logic in blueman seems a bit pointless in light of power management tools and an arbitrary threshold does not sound like a good idea, e.g. mice typically provide distinct levels like 100 %, 80 %, 50 % and 20 % for which a 10 % threshold would just never trigger.

The applet plugin for battery level notifications used to be separate and I'd say the main purpose was to show the level on connection. We merged it with ConnectionNotifier to show a single notification for the connection that included the battery level. The "depletion" notifications are more or less a leftover and we could also drop them completely. :shrug:

cschramm avatar Apr 10 '24 17:04 cschramm

I have devices that can't decide what their battery level is supposed to be, they flicker back and forth between 100% and 90% several times as their battery depletes. So a change to the threshold to 10% would not fix the notification annoyance.

Turning off the ConnectionNotifier plugin altogether is fine by me, just mentioning this in case it's useful to help with the solution.

askmeaboutlo0m avatar Apr 10 '24 19:04 askmeaboutlo0m

Now I see these notifications. And there are a lot of them.

blueman-applet 15.44.57 DEBUG    Base:67 _properties_changed: /org/bluez/hci0/dev_1C_6E_4C_80_0D_6E {'Percentage': 80} [] <Battery.Battery object at 0x7fc84dca1900 (blueman+bluez+Battery+Battery at 0x55d9e08da160)>
blueman-applet 15.45.07 INFO     Notification:242 do_g_signal: 1
blueman-applet 15.45.07 DEBUG    Notification:246 do_g_signal: The notification expired.
blueman-applet 15.45.17 DEBUG    Base:67 _properties_changed: /org/bluez/hci0/dev_1C_6E_4C_80_0D_6E {'Percentage': 60} [] <Battery.Battery object at 0x7fc84dca1900 (blueman+bluez+Battery+Battery at 0x55d9e08da160)>
blueman-applet 15.45.27 INFO     Notification:242 do_g_signal: 1
blueman-applet 15.45.27 DEBUG    Notification:246 do_g_signal: The notification expired.
blueman-applet 15.45.58 DEBUG    Base:67 _properties_changed: /org/bluez/hci0/dev_1C_6E_4C_80_0D_6E {'Percentage': 80} [] <Battery.Battery object at 0x7fc84dca1900 (blueman+bluez+Battery+Battery at 0x55d9e08da160)>
blueman-applet 15.46.07 INFO     Notification:242 do_g_signal: 1
blueman-applet 15.46.07 DEBUG    Notification:246 do_g_signal: The notification expired.
blueman-applet 15.47.58 DEBUG    Base:67 _properties_changed: /org/bluez/hci0/dev_1C_6E_4C_80_0D_6E {'Percentage': 60} [] <Battery.Battery object at 0x7fc84dca1900 (blueman+bluez+Battery+Battery at 0x55d9e08da160)>
blueman-applet 15.48.07 INFO     Notification:242 do_g_signal: 1
blueman-applet 15.48.07 DEBUG    Notification:246 do_g_signal: The notification expired.
blueman-applet 15.48.18 DEBUG    Base:67 _properties_changed: /org/bluez/hci0/dev_1C_6E_4C_80_0D_6E {'Percentage': 80} [] <Battery.Battery object at 0x7fc84dca1900 (blueman+bluez+Battery+Battery at 0x55d9e08da160)>
blueman-applet 15.48.27 INFO     Notification:242 do_g_signal: 1
blueman-applet 15.48.27 DEBUG    Notification:246 do_g_signal: The notification expired.

kuraga avatar Apr 11 '24 12:04 kuraga

Well, ok, I don't see us going down that rabbit hole. So, as we do not want to get into power management applet business, I suggest that we show the battery level on connection only and do not process any updates.

cschramm avatar Apr 12 '24 10:04 cschramm

I also find this annoying, especially since my keyboard's battery is "unstable". So I add an option to turn off battery updates: 4eUeP@5a9ac22

How can I change this setting? Is there a config somewhere? Also the threshold idea seems the way to go.

mar565 avatar Apr 27 '24 07:04 mar565

How can I change this setting? Is there a config somewhere?

There is a link to the fork, so the config is in that fork and is not merged here. You need to build the fork if you want to use it right now.

Also the threshold idea seems the way to go.

The conversations above have concluded that the threshold idea is not the way to go. Instead, we will "show the battery level on connection only and do not process any updates". Please read them and give your argument if you disagree.

ouuan avatar Apr 27 '24 08:04 ouuan

Please try #2362

cschramm avatar May 10 '24 06:05 cschramm