How to disable "Mouse battery low" notification in Ubuntu 18.04?

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"...


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