Public bug reported: When some wireless keyboards and/or mice are connected (for me it's Logitech K800 and Performance MX), most part of all time this daemon is spamming me about low batteries.
The problems are: 1. there is no flag to turn off these annoying notifications; 2. there is no way to change low/critical battery thresholds since they're hard-coded*; 3. there is a mistake in the code making that WARNING_CRITICAL will never be triggered*; 4. there in no way to determine low battery condition based on the battery-level reported by device**. * code example from gsd-power-manager.c: engine_get_warning_csr (GsdPowerManager *manager, UpDevice *device) { gdouble percentage; /* get device properties */ g_object_get (device, "percentage", &percentage, NULL); if (percentage < 26.0f) return WARNING_LOW; else if (percentage < 13.0f) return WARNING_CRITICAL; return WARNING_NONE; } // you see, WARNING_CRITICAL won't be triggered ** the information as kbd/mouse report battery condition: upower -i /org/freedesktop/UPower/devices/battery_hidpp_battery_0 battery-level: low percentage: 10% (should be ignored) when battery is full, reported percentage (fake) is 70%, low - 10%, critical - 5% and unknown (="nearly dead") - 50%. In "unknown" conditions the mouse can work for a few hours, in "critical" - a few days and in "low" - a few weeks. So, all this time the daemon is frequently producing these warnings, which is annoying. And in "almost dead" condition it is thinking that battery is OK (since it reports 50%), what's not correct. The only way to detect it is to look at the battery-level. Ubuntu Unity 24.04 unity-settings-daemon: 15.04.1+21.10.20220802-0ubuntu5 ** Affects: unity-settings-daemon (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2091245 Title: Improper battery handling for peripherals To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unity-settings-daemon/+bug/2091245/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs