zoukankan      html  css  js  c++  java
  • mate-notification-daemon stopping, Mate notifications timeout

    Asked 9 days ago
    Viewed 16 times
    0

    Whenever I connect or disconnect my Bluetooth headphones or the power cable (probably also some other events), I get a popup window showing the notification text instead of a regular notification, which I need to close manually every time.

    When Firefox wants to send a notification, the entire browser freezes for multiple seconds and then it shows something that looks like it might be Firefox's own implementation of notification, instead of using the system notifications.

    When I try to open the notification settings in the Telegram messenger, the window freezes for a while and then the notifications settings appear without an option to "use native notifications".

    When I execute

    notify-send lalala
    

    in a terminal, nothing happens for 50 seconds and then the command ends without having shown a notification or any console output.

    When I press the "preview" button in the Mate notification settings (mate-notification-properties or "Popup notifications" in system settings), I get one of the following error messages after the settings window froze for a similar amount of time:

    Error while displaying notification: Error calling StartServiceByName for 
    org.freedesktop.Notifications: Timeout was reached
    Error while displaying notification: Error calling StartServiceByName for 
    org.freedesktop.Notifications: Process org.freedesktop.Notifications exited with status 1
    

    This all seems like the system tries to show a notification, doesn't manage to do so, but also doesn't throw an error until the timeout duration is reached, then gives some feedback back to the program that causes it to either use a fallback mechanism for notifications or do nothing at all.

    I'm unsure whether this is something I've changed in the system or if an update caused this, both things often happened on my computer recently. I didn't do anything especially notification-related myself, but mate-notification-daemon and libnotify were updated a week ago. That seems to be roughly the time when notifications stopped working properly.

    Googling the error messages and symptoms only gave some XFCE related answers, but I do not use XFCE.
    After a while I noticed that mate-notification-daemon was not running. Running it manually fixes the issue for a while, but it comes back after a few minutes. My "hacky" solution is currently to have the line

    * * * * * /usr/lib/mate-notification-daemon/mate-notification-daemon -r
    

    in crontab, but that doesn't fix the underlying issue and doesn't prevent freezes between the time when mate-notification-daemon exits for unknown reasons and the next start of a minute. It also causes unnecessary work for the computer.

    I'm using Manjaro 19.0.2 with Mate 1.24.0.

    •  
      Actually is seems like starting mate-notification-daemon manually only runs it for about 30 seconds, so even the workaround works in less than 50% of all cases. – Fabian Röling Mar 10 at 13:10
    •  
      I'm now using this as a workaround: watch -n0 "/usr/lib/mate-notification-daemon/mate-notification-daemon -r" That put into autostart should hopefully ensure that it runs all the time and never kills its previous instance, but I'm not sure. And it still removes notifications when the process exits. – Fabian Röling Mar 16 at 10:37
     
  • 相关阅读:
    使用java.util.Timer来周期性的执行制定的任务
    Android中为APP创建快捷方式的原理(自己的理解)
    View.setTag()的作用
    用3种方法在 operator= 中处理“自我赋值”
    关于 const 成员函数
    复制构造函数 与 赋值操作函数
    Command 模式
    Mediator 模式
    求一棵普通树的两个结点的最低公共祖先
    Memento 模式
  • 原文地址:https://www.cnblogs.com/xuanbjut/p/12535814.html
Copyright © 2011-2022 走看看