17

Notification blocks for example tabs from browser and is very annoying overall. Mouse works fine and will most likely continue working over a month, and battery is really simple to swap. Therefore there is no good reason to keep that notification appearing constantly and a good reason to disable it.

I have tried this answer, no help.

I also tried disable all notifications, no help.

I tried command gconftool --set /apps/gnome-power-manager/notify/low_capacity --type boolean false, no help

I have booted after changing these settings.

Mouse battery low

DevHugo
  • 121
  • I am pretty sure this is a bug, how do I report this as a bug? Reading the guide how to report a bug feels pretty daunting, and I do not know which program I should report. – Ohto Nordberg Sep 03 '18 at 09:12
  • 1
    try to change boolean UsePercentageForPolicy=true to false sir – abu-ahmed al-khatiri Sep 03 '18 at 09:23
  • I have done that, and I assume the effect of that is notification will not appear so frequently. I guess it helps a bit, while not solving the actual problem. – Ohto Nordberg Sep 03 '18 at 09:38
  • they suggest https://ubuntuforums.org/showthread.php?t=2395380 to did change the use-time-for-policy and call sudo init 6 and that the trick sir. – abu-ahmed al-khatiri Sep 04 '18 at 05:44
  • 1
    This is a confirmed bug, might be fixed some day https://bugzilla.kernel.org/show_bug.cgi?id=201445 – Ohto Nordberg Oct 16 '18 at 19:28
  • This seems to be resolved. I wont test, as I use rechargeable batteries now. https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/108 – Ohto Nordberg Nov 12 '18 at 20:15
  • so these settings can solved your issue sir? – abu-ahmed al-khatiri Nov 13 '18 at 08:48
  • I think they can. I will not test. No normal batteries any more. – Ohto Nordberg Nov 13 '18 at 13:57
  • @OhtoNordberg Where'd you get that this is resolved? The link you gave is to an "open" issue, and gives no indication that anyone has made any attempt to fix this, nor that anyone in a position to do so, has any interest in doing so. No one involved in the distro seems to consider the current state of this to be a bad thing. I'm currently in the process of getting new computers, and this issue is the reason that my new systems won't be running Ubuntu. – Matthew Najmon Nov 10 '19 at 20:56
  • I understand @MatthewNajmon, this is a really annoying bug. I cannot say if this bug has been fixed (as I mentioned), but my personal resolution is that I do not use a mouse with battery any more. The Ubuntu resolution seems to be (haven't confirmed this...) to ignore this. The resolution is not always a happy one. – Ohto Nordberg Nov 12 '19 at 10:33
  • 1

2 Answers2

3

There is "NoNotifications", which can intercept notifications and even hide specific ones based on the text they contain

However, when I tried to install it, it failed. Let me know if you get it working.

I also saw a suggestion to uninstall the power indicator

sudo apt remove indicator-power

But this gave me an error that it wasn't installed in the first place. Perhaps it goes by another name now, in Ubuntu 18.04?

I post this answer to point out how many times I've seen this asked in all my searches, and while there are fixes that may have worked in Ubuntu 17.10 and below, they no longer work in 18.04. And too many replies take a condescending "change the batteries" (when in fact these low powered devices will continue to operate on batteries for months or even a year while this notification still pops up) or "this has already been answered" (pointing to these fixes which no longer work), and so, I think we have a bug on our hands.

However, I too do not know what "package" to report (as you also mentioned in one of your comments). Typing "ubuntu-bug" in a terminal and answering "Other" says "You need a PID"...

Pablo Bianchi
  • 15,657
Domarius
  • 243
  • I did apt-get remove indicator-power , and while it didn't give me an error, it did require me to also remove unity-control-center (which prereqs indicator-power), and even after removing both, the mouse-battery notification continues to pop up. – Matthew Najmon Nov 11 '19 at 22:56
  • 1
    @MatthewNajmon Wow... well, for the record, my ultimate solution to this problem was to stop using Ubuntu. Especially since they seem to be gearing towards the information-collecty type behaviour now. Been using MX Linux, which I think is far better - though going to try Manjaro now, just to see if it's more stable, and get graphics tablet support back. – Domarius Nov 13 '19 at 11:46
  • Even if removing indicator-power could work, it's won't be an acceptable solution. The power indicator is a MUST feature for laptops. What would be necessary is a way to disable power notifications selectively for some devices. – vvaltchev Apr 04 '20 at 19:47
3

So what worked easily for me (on focal fossa 20.04) is Gui Ambros's patch of the up-device.c upower source file. It comes in the single line command at the bottom of that post. It is a very nasty thing to "wget xxx | bash" so PLEASE do have a look at his explanations:

https://wrgms.com/disable-mouse-battery-low-spam-notification/ And better read your distro's steps on the actual files from Github: install_script.sh aka the steps to set the patch up and running, patch.c aka in c the actual modification.

TL;DR;wadev :

wget -O - https://gist.githubusercontent.com/guiambros/166039459a8579638b57f7d135505ab1/raw/89de0e881f543097155a7ca8ce53248955a7ff54/silent-mouse.sh | bash 
Pablo Bianchi
  • 15,657
Zoyolin
  • 61