Disable “Mouse battery low” spam notification












21















Countless times over the past few weeks I have been notified about the low battery in my wireless mouse. Every time it wakes up from sleeping mode and reconnects over Bluetooth I get a notification. I have gotten hundreds of notifications. I do not want them and I do not need them. Yes, battery is low, but at 0% (as reported) it will go on for another week at least. The notification has no timer and will stay visible until I close it.



How do I disable this torture?



enter image description here



Realizing I might sound like a grumpy old man I am not going to replace my batteries that are good for another month as a workaround. I am running Ubuntu 17.10 with GNOME Shell. I have no clue what is causing this. Pointers and suggestions will be greatly appreciated!



UPDATE: It turns out the mouse ran for another ten days or so after the initial notification. With the OS constantly reminding me that it will soon stop working. Wasting fine batteries is not a very good design. People should care about that and have an option to turn the notifications off.



UPDATE 2018-10-22: I asked the question some time ago. The marked correct answer might not apply anymore. It appears to be a bug in the gnome-settings-daemon. See the report for updates revolving this issue: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1798166










share|improve this question




















  • 2





    @heynnema You did not read the whole post did you?

    – domo
    Dec 14 '17 at 6:14











  • Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

    – heynnema
    Dec 14 '17 at 15:59








  • 1





    @heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

    – Domarius
    Oct 21 '18 at 22:21








  • 1





    @Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

    – domo
    Oct 22 '18 at 13:12











  • @heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

    – Domarius
    Nov 20 '18 at 22:45
















21















Countless times over the past few weeks I have been notified about the low battery in my wireless mouse. Every time it wakes up from sleeping mode and reconnects over Bluetooth I get a notification. I have gotten hundreds of notifications. I do not want them and I do not need them. Yes, battery is low, but at 0% (as reported) it will go on for another week at least. The notification has no timer and will stay visible until I close it.



How do I disable this torture?



enter image description here



Realizing I might sound like a grumpy old man I am not going to replace my batteries that are good for another month as a workaround. I am running Ubuntu 17.10 with GNOME Shell. I have no clue what is causing this. Pointers and suggestions will be greatly appreciated!



UPDATE: It turns out the mouse ran for another ten days or so after the initial notification. With the OS constantly reminding me that it will soon stop working. Wasting fine batteries is not a very good design. People should care about that and have an option to turn the notifications off.



UPDATE 2018-10-22: I asked the question some time ago. The marked correct answer might not apply anymore. It appears to be a bug in the gnome-settings-daemon. See the report for updates revolving this issue: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1798166










share|improve this question




















  • 2





    @heynnema You did not read the whole post did you?

    – domo
    Dec 14 '17 at 6:14











  • Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

    – heynnema
    Dec 14 '17 at 15:59








  • 1





    @heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

    – Domarius
    Oct 21 '18 at 22:21








  • 1





    @Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

    – domo
    Oct 22 '18 at 13:12











  • @heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

    – Domarius
    Nov 20 '18 at 22:45














21












21








21


6






Countless times over the past few weeks I have been notified about the low battery in my wireless mouse. Every time it wakes up from sleeping mode and reconnects over Bluetooth I get a notification. I have gotten hundreds of notifications. I do not want them and I do not need them. Yes, battery is low, but at 0% (as reported) it will go on for another week at least. The notification has no timer and will stay visible until I close it.



How do I disable this torture?



enter image description here



Realizing I might sound like a grumpy old man I am not going to replace my batteries that are good for another month as a workaround. I am running Ubuntu 17.10 with GNOME Shell. I have no clue what is causing this. Pointers and suggestions will be greatly appreciated!



UPDATE: It turns out the mouse ran for another ten days or so after the initial notification. With the OS constantly reminding me that it will soon stop working. Wasting fine batteries is not a very good design. People should care about that and have an option to turn the notifications off.



UPDATE 2018-10-22: I asked the question some time ago. The marked correct answer might not apply anymore. It appears to be a bug in the gnome-settings-daemon. See the report for updates revolving this issue: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1798166










share|improve this question
















Countless times over the past few weeks I have been notified about the low battery in my wireless mouse. Every time it wakes up from sleeping mode and reconnects over Bluetooth I get a notification. I have gotten hundreds of notifications. I do not want them and I do not need them. Yes, battery is low, but at 0% (as reported) it will go on for another week at least. The notification has no timer and will stay visible until I close it.



How do I disable this torture?



enter image description here



Realizing I might sound like a grumpy old man I am not going to replace my batteries that are good for another month as a workaround. I am running Ubuntu 17.10 with GNOME Shell. I have no clue what is causing this. Pointers and suggestions will be greatly appreciated!



UPDATE: It turns out the mouse ran for another ten days or so after the initial notification. With the OS constantly reminding me that it will soon stop working. Wasting fine batteries is not a very good design. People should care about that and have an option to turn the notifications off.



UPDATE 2018-10-22: I asked the question some time ago. The marked correct answer might not apply anymore. It appears to be a bug in the gnome-settings-daemon. See the report for updates revolving this issue: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1798166







17.10 mouse battery notification gnome-settings-daemon






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 22 '18 at 13:07







domo

















asked Dec 13 '17 at 16:27









domodomo

1085




1085








  • 2





    @heynnema You did not read the whole post did you?

    – domo
    Dec 14 '17 at 6:14











  • Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

    – heynnema
    Dec 14 '17 at 15:59








  • 1





    @heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

    – Domarius
    Oct 21 '18 at 22:21








  • 1





    @Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

    – domo
    Oct 22 '18 at 13:12











  • @heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

    – Domarius
    Nov 20 '18 at 22:45














  • 2





    @heynnema You did not read the whole post did you?

    – domo
    Dec 14 '17 at 6:14











  • Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

    – heynnema
    Dec 14 '17 at 15:59








  • 1





    @heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

    – Domarius
    Oct 21 '18 at 22:21








  • 1





    @Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

    – domo
    Oct 22 '18 at 13:12











  • @heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

    – Domarius
    Nov 20 '18 at 22:45








2




2





@heynnema You did not read the whole post did you?

– domo
Dec 14 '17 at 6:14





@heynnema You did not read the whole post did you?

– domo
Dec 14 '17 at 6:14













Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

– heynnema
Dec 14 '17 at 15:59







Yes I did read it. Just replace the battery and you'll be good for another 3-6 months. The OS is doing what it was designed to do. You have 0% battery reading. Quit chasing your tail.

– heynnema
Dec 14 '17 at 15:59






1




1





@heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

– Domarius
Oct 21 '18 at 22:21







@heynnema Well I've been closing these notifications for about, oh, 6 months now... and still going! Entirely pointless, and not something that happens in Windows. The bottom line is these low-powered mice & keyboards have much lower power thresholds than laptop batteries, and so, do not need these excessive warnings for close to half a year of usage... nor do we need condescending comments from people for whom this problem doesn't happen to affect. Actually it's a confirmed bug; bugzilla.kernel.org/show_bug.cgi?id=201445

– Domarius
Oct 21 '18 at 22:21






1




1





@Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

– domo
Oct 22 '18 at 13:12





@Domarius Thanks for the update. I edited the question and added a link to the bug report (although, I linked the launchpad report instead).

– domo
Oct 22 '18 at 13:12













@heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

– Domarius
Nov 20 '18 at 22:45





@heynnema As of time of writing, the batteries have finally died. So 2 months after I made my comment, previous to which I had been seeing the notification for several months already! If the "OS is doing what it's designed to do" then this is evidence enough that it is "designed" badly. For the record, when I boot into Windows, it fades a "battery low warning" for a second and then fades away quickly. Much less intrusive.

– Domarius
Nov 20 '18 at 22:45










3 Answers
3






active

oldest

votes


















8














OK, I hit the same issue. Reasons are similar; my Logitech M570 is fed on "dead" batteries as it lasts MONTHS on a very low voltage alkaline. So I use batteries in other things and keep the dead ones for my M570.



The best answer I've found was to lower the Power Plugins critical level warning. This way you can customise when it nags.



You need dconf for command line or dconf-editor for the GUI version (for GUI you'll need to do sudo apt-get install dconf-tools).



Setting is generically for batteries though, so if you're on a laptop or a UPS then you will be altering the warning levels for those, which may be non ideal.



For Ubuntu 17.10 (Artful Aardvark) go to org → gnome → settings-daemon → plugins → power. Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.



It is not a perfect answer if you have a laptop, but it is fine for a desktop computer and better than filling landfill with batteries or being nagged.






share|improve this answer


























  • Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

    – domo
    Mar 2 '18 at 8:22






  • 3





    This does not work in 18.04. Darn. Notification appears regardless of that setting.

    – Ohto Nordberg
    Sep 2 '18 at 14:11






  • 1





    Same here, also there is no "percentage-low" entry.

    – Matthias Urlichs
    Oct 7 '18 at 10:11













  • This doesnt work in Mint 19 either :(

    – Keltari
    Dec 1 '18 at 17:29











  • There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

    – livthomas
    Jan 4 at 18:58



















1














You could use a script that closes the message as soon as it opens (with the delay of 0.5 seconds, it takes time for the message window to open).
This is not perfect, because it closes the last notification window in the window stack. Therefore there is a small chance to close the wrong notification if it appears at almost the same time as the one with the message summary "Mouse battery low".



Dependancies:



sudo apt install python-dbus wmctrl -y


This one is for xfce. You'll have to tweak it for gnome, if that is what you use.
For xfce next command closes the last notification window:



wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)


awk filters the window(s) with the window class xfce4-notifyd.



For mate-desktop window class is mate-notification-daemon, I'm not sure for Gnome.



Change that line for your DE in the script.



Save next script, make it executable and set it to run on startup.



#!/usr/bin/env python
import glib
import dbus
import os
import time
from dbus.mainloop.glib import DBusGMainLoop

def close_notification(bus, message):
keys = ["app_name", "replaces_id", "app_icon", "summary",
"body", "actions", "hints", "expire_timeout"]
args = message.get_args_list()
if len(args) == 8:
notification = dict([(keys[i], args[i]) for i in range(8)])
if notification["summary"] == "Mouse battery low":
time.sleep(.5)
# Adapt next command for your DE
os.system("wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)")

loop = DBusGMainLoop(set_as_default=True)
session_bus = dbus.SessionBus()
session_bus.add_match_string_non_blocking("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
session_bus.add_message_filter(close_notification)
glib.MainLoop().run()





share|improve this answer































    0














    I never used bluetooth mouse, but if I click on its icon, it gives me plugins options. There is a power management plugin among them. Perhaps disabling it may help.






    share|improve this answer



















    • 2





      I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

      – domo
      Dec 14 '17 at 6:24











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f985963%2fdisable-mouse-battery-low-spam-notification%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    8














    OK, I hit the same issue. Reasons are similar; my Logitech M570 is fed on "dead" batteries as it lasts MONTHS on a very low voltage alkaline. So I use batteries in other things and keep the dead ones for my M570.



    The best answer I've found was to lower the Power Plugins critical level warning. This way you can customise when it nags.



    You need dconf for command line or dconf-editor for the GUI version (for GUI you'll need to do sudo apt-get install dconf-tools).



    Setting is generically for batteries though, so if you're on a laptop or a UPS then you will be altering the warning levels for those, which may be non ideal.



    For Ubuntu 17.10 (Artful Aardvark) go to org → gnome → settings-daemon → plugins → power. Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.



    It is not a perfect answer if you have a laptop, but it is fine for a desktop computer and better than filling landfill with batteries or being nagged.






    share|improve this answer


























    • Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

      – domo
      Mar 2 '18 at 8:22






    • 3





      This does not work in 18.04. Darn. Notification appears regardless of that setting.

      – Ohto Nordberg
      Sep 2 '18 at 14:11






    • 1





      Same here, also there is no "percentage-low" entry.

      – Matthias Urlichs
      Oct 7 '18 at 10:11













    • This doesnt work in Mint 19 either :(

      – Keltari
      Dec 1 '18 at 17:29











    • There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

      – livthomas
      Jan 4 at 18:58
















    8














    OK, I hit the same issue. Reasons are similar; my Logitech M570 is fed on "dead" batteries as it lasts MONTHS on a very low voltage alkaline. So I use batteries in other things and keep the dead ones for my M570.



    The best answer I've found was to lower the Power Plugins critical level warning. This way you can customise when it nags.



    You need dconf for command line or dconf-editor for the GUI version (for GUI you'll need to do sudo apt-get install dconf-tools).



    Setting is generically for batteries though, so if you're on a laptop or a UPS then you will be altering the warning levels for those, which may be non ideal.



    For Ubuntu 17.10 (Artful Aardvark) go to org → gnome → settings-daemon → plugins → power. Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.



    It is not a perfect answer if you have a laptop, but it is fine for a desktop computer and better than filling landfill with batteries or being nagged.






    share|improve this answer


























    • Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

      – domo
      Mar 2 '18 at 8:22






    • 3





      This does not work in 18.04. Darn. Notification appears regardless of that setting.

      – Ohto Nordberg
      Sep 2 '18 at 14:11






    • 1





      Same here, also there is no "percentage-low" entry.

      – Matthias Urlichs
      Oct 7 '18 at 10:11













    • This doesnt work in Mint 19 either :(

      – Keltari
      Dec 1 '18 at 17:29











    • There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

      – livthomas
      Jan 4 at 18:58














    8












    8








    8







    OK, I hit the same issue. Reasons are similar; my Logitech M570 is fed on "dead" batteries as it lasts MONTHS on a very low voltage alkaline. So I use batteries in other things and keep the dead ones for my M570.



    The best answer I've found was to lower the Power Plugins critical level warning. This way you can customise when it nags.



    You need dconf for command line or dconf-editor for the GUI version (for GUI you'll need to do sudo apt-get install dconf-tools).



    Setting is generically for batteries though, so if you're on a laptop or a UPS then you will be altering the warning levels for those, which may be non ideal.



    For Ubuntu 17.10 (Artful Aardvark) go to org → gnome → settings-daemon → plugins → power. Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.



    It is not a perfect answer if you have a laptop, but it is fine for a desktop computer and better than filling landfill with batteries or being nagged.






    share|improve this answer















    OK, I hit the same issue. Reasons are similar; my Logitech M570 is fed on "dead" batteries as it lasts MONTHS on a very low voltage alkaline. So I use batteries in other things and keep the dead ones for my M570.



    The best answer I've found was to lower the Power Plugins critical level warning. This way you can customise when it nags.



    You need dconf for command line or dconf-editor for the GUI version (for GUI you'll need to do sudo apt-get install dconf-tools).



    Setting is generically for batteries though, so if you're on a laptop or a UPS then you will be altering the warning levels for those, which may be non ideal.



    For Ubuntu 17.10 (Artful Aardvark) go to org → gnome → settings-daemon → plugins → power. Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.



    It is not a perfect answer if you have a laptop, but it is fine for a desktop computer and better than filling landfill with batteries or being nagged.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 29 '18 at 22:59









    Peter Mortensen

    1,03721016




    1,03721016










    answered Feb 26 '18 at 13:44









    JetblackstarJetblackstar

    9612




    9612













    • Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

      – domo
      Mar 2 '18 at 8:22






    • 3





      This does not work in 18.04. Darn. Notification appears regardless of that setting.

      – Ohto Nordberg
      Sep 2 '18 at 14:11






    • 1





      Same here, also there is no "percentage-low" entry.

      – Matthias Urlichs
      Oct 7 '18 at 10:11













    • This doesnt work in Mint 19 either :(

      – Keltari
      Dec 1 '18 at 17:29











    • There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

      – livthomas
      Jan 4 at 18:58



















    • Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

      – domo
      Mar 2 '18 at 8:22






    • 3





      This does not work in 18.04. Darn. Notification appears regardless of that setting.

      – Ohto Nordberg
      Sep 2 '18 at 14:11






    • 1





      Same here, also there is no "percentage-low" entry.

      – Matthias Urlichs
      Oct 7 '18 at 10:11













    • This doesnt work in Mint 19 either :(

      – Keltari
      Dec 1 '18 at 17:29











    • There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

      – livthomas
      Jan 4 at 18:58

















    Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

    – domo
    Mar 2 '18 at 8:22





    Thanks, that worked. The popup started to bug me again. org.gnome.settings-daemon.plugins.power contained a lot of goodness.

    – domo
    Mar 2 '18 at 8:22




    3




    3





    This does not work in 18.04. Darn. Notification appears regardless of that setting.

    – Ohto Nordberg
    Sep 2 '18 at 14:11





    This does not work in 18.04. Darn. Notification appears regardless of that setting.

    – Ohto Nordberg
    Sep 2 '18 at 14:11




    1




    1





    Same here, also there is no "percentage-low" entry.

    – Matthias Urlichs
    Oct 7 '18 at 10:11







    Same here, also there is no "percentage-low" entry.

    – Matthias Urlichs
    Oct 7 '18 at 10:11















    This doesnt work in Mint 19 either :(

    – Keltari
    Dec 1 '18 at 17:29





    This doesnt work in Mint 19 either :(

    – Keltari
    Dec 1 '18 at 17:29













    There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

    – livthomas
    Jan 4 at 18:58





    There was no percentage-low key on my Gnome 3.30 either and after some time spent Googling this problem it seems there is no other solution out there. Since the notifications were getting really annoying, I just disabled UPower by running systemctl stop upower and systemctl mask upower. Hopefully, there will be no negative consequences of this action.

    – livthomas
    Jan 4 at 18:58













    1














    You could use a script that closes the message as soon as it opens (with the delay of 0.5 seconds, it takes time for the message window to open).
    This is not perfect, because it closes the last notification window in the window stack. Therefore there is a small chance to close the wrong notification if it appears at almost the same time as the one with the message summary "Mouse battery low".



    Dependancies:



    sudo apt install python-dbus wmctrl -y


    This one is for xfce. You'll have to tweak it for gnome, if that is what you use.
    For xfce next command closes the last notification window:



    wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)


    awk filters the window(s) with the window class xfce4-notifyd.



    For mate-desktop window class is mate-notification-daemon, I'm not sure for Gnome.



    Change that line for your DE in the script.



    Save next script, make it executable and set it to run on startup.



    #!/usr/bin/env python
    import glib
    import dbus
    import os
    import time
    from dbus.mainloop.glib import DBusGMainLoop

    def close_notification(bus, message):
    keys = ["app_name", "replaces_id", "app_icon", "summary",
    "body", "actions", "hints", "expire_timeout"]
    args = message.get_args_list()
    if len(args) == 8:
    notification = dict([(keys[i], args[i]) for i in range(8)])
    if notification["summary"] == "Mouse battery low":
    time.sleep(.5)
    # Adapt next command for your DE
    os.system("wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)")

    loop = DBusGMainLoop(set_as_default=True)
    session_bus = dbus.SessionBus()
    session_bus.add_match_string_non_blocking("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
    session_bus.add_message_filter(close_notification)
    glib.MainLoop().run()





    share|improve this answer




























      1














      You could use a script that closes the message as soon as it opens (with the delay of 0.5 seconds, it takes time for the message window to open).
      This is not perfect, because it closes the last notification window in the window stack. Therefore there is a small chance to close the wrong notification if it appears at almost the same time as the one with the message summary "Mouse battery low".



      Dependancies:



      sudo apt install python-dbus wmctrl -y


      This one is for xfce. You'll have to tweak it for gnome, if that is what you use.
      For xfce next command closes the last notification window:



      wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)


      awk filters the window(s) with the window class xfce4-notifyd.



      For mate-desktop window class is mate-notification-daemon, I'm not sure for Gnome.



      Change that line for your DE in the script.



      Save next script, make it executable and set it to run on startup.



      #!/usr/bin/env python
      import glib
      import dbus
      import os
      import time
      from dbus.mainloop.glib import DBusGMainLoop

      def close_notification(bus, message):
      keys = ["app_name", "replaces_id", "app_icon", "summary",
      "body", "actions", "hints", "expire_timeout"]
      args = message.get_args_list()
      if len(args) == 8:
      notification = dict([(keys[i], args[i]) for i in range(8)])
      if notification["summary"] == "Mouse battery low":
      time.sleep(.5)
      # Adapt next command for your DE
      os.system("wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)")

      loop = DBusGMainLoop(set_as_default=True)
      session_bus = dbus.SessionBus()
      session_bus.add_match_string_non_blocking("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
      session_bus.add_message_filter(close_notification)
      glib.MainLoop().run()





      share|improve this answer


























        1












        1








        1







        You could use a script that closes the message as soon as it opens (with the delay of 0.5 seconds, it takes time for the message window to open).
        This is not perfect, because it closes the last notification window in the window stack. Therefore there is a small chance to close the wrong notification if it appears at almost the same time as the one with the message summary "Mouse battery low".



        Dependancies:



        sudo apt install python-dbus wmctrl -y


        This one is for xfce. You'll have to tweak it for gnome, if that is what you use.
        For xfce next command closes the last notification window:



        wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)


        awk filters the window(s) with the window class xfce4-notifyd.



        For mate-desktop window class is mate-notification-daemon, I'm not sure for Gnome.



        Change that line for your DE in the script.



        Save next script, make it executable and set it to run on startup.



        #!/usr/bin/env python
        import glib
        import dbus
        import os
        import time
        from dbus.mainloop.glib import DBusGMainLoop

        def close_notification(bus, message):
        keys = ["app_name", "replaces_id", "app_icon", "summary",
        "body", "actions", "hints", "expire_timeout"]
        args = message.get_args_list()
        if len(args) == 8:
        notification = dict([(keys[i], args[i]) for i in range(8)])
        if notification["summary"] == "Mouse battery low":
        time.sleep(.5)
        # Adapt next command for your DE
        os.system("wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)")

        loop = DBusGMainLoop(set_as_default=True)
        session_bus = dbus.SessionBus()
        session_bus.add_match_string_non_blocking("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
        session_bus.add_message_filter(close_notification)
        glib.MainLoop().run()





        share|improve this answer













        You could use a script that closes the message as soon as it opens (with the delay of 0.5 seconds, it takes time for the message window to open).
        This is not perfect, because it closes the last notification window in the window stack. Therefore there is a small chance to close the wrong notification if it appears at almost the same time as the one with the message summary "Mouse battery low".



        Dependancies:



        sudo apt install python-dbus wmctrl -y


        This one is for xfce. You'll have to tweak it for gnome, if that is what you use.
        For xfce next command closes the last notification window:



        wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)


        awk filters the window(s) with the window class xfce4-notifyd.



        For mate-desktop window class is mate-notification-daemon, I'm not sure for Gnome.



        Change that line for your DE in the script.



        Save next script, make it executable and set it to run on startup.



        #!/usr/bin/env python
        import glib
        import dbus
        import os
        import time
        from dbus.mainloop.glib import DBusGMainLoop

        def close_notification(bus, message):
        keys = ["app_name", "replaces_id", "app_icon", "summary",
        "body", "actions", "hints", "expire_timeout"]
        args = message.get_args_list()
        if len(args) == 8:
        notification = dict([(keys[i], args[i]) for i in range(8)])
        if notification["summary"] == "Mouse battery low":
        time.sleep(.5)
        # Adapt next command for your DE
        os.system("wmctrl -i -c $(wmctrl -lx | awk '/xfce4-notifyd.Xfce4-notifyd/{print $1}' | tail -n 1)")

        loop = DBusGMainLoop(set_as_default=True)
        session_bus = dbus.SessionBus()
        session_bus.add_match_string_non_blocking("type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true")
        session_bus.add_message_filter(close_notification)
        glib.MainLoop().run()






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 15 '18 at 1:57







        user903316






























            0














            I never used bluetooth mouse, but if I click on its icon, it gives me plugins options. There is a power management plugin among them. Perhaps disabling it may help.






            share|improve this answer



















            • 2





              I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

              – domo
              Dec 14 '17 at 6:24
















            0














            I never used bluetooth mouse, but if I click on its icon, it gives me plugins options. There is a power management plugin among them. Perhaps disabling it may help.






            share|improve this answer



















            • 2





              I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

              – domo
              Dec 14 '17 at 6:24














            0












            0








            0







            I never used bluetooth mouse, but if I click on its icon, it gives me plugins options. There is a power management plugin among them. Perhaps disabling it may help.






            share|improve this answer













            I never used bluetooth mouse, but if I click on its icon, it gives me plugins options. There is a power management plugin among them. Perhaps disabling it may help.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 13 '17 at 18:46









            OlgaOlga

            338




            338








            • 2





              I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

              – domo
              Dec 14 '17 at 6:24














            • 2





              I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

              – domo
              Dec 14 '17 at 6:24








            2




            2





            I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

            – domo
            Dec 14 '17 at 6:24





            I am not sure what exactly you are referring to but I have not found anything of sorts. I have looked through everything in the settings GUI. Bluetooth, Devices, Notifications, Power and I can not find a place where to disable it. Thank you for trying

            – domo
            Dec 14 '17 at 6:24


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f985963%2fdisable-mouse-battery-low-spam-notification%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?