我一直遇到 Manjaro 上的 i3 中无法加载通知的问题。
这会导致通知图标无法正常工作的奇怪问题。例如,当我单击网络管理器时,它不会显示菜单。Discord 会随机挂起,或者我的会话会在随机时间冻结。
我看到以下内容:
journalctl -b | grep -i notification
Jul 10 08:28:01 aaron-lpt dbus-daemon[817]: [system] Service file "/usr/share/dbus-1/system-services/org.freedesktop.Notification.service" should have been named "org.freedesktop.Notifications.service" and will not work with system bus activation
Jul 10 08:29:08 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activating service name='org.freedesktop.Notifications' requested by ':1.14' (uid=1000 pid=1581 comm="xfce4-power-manager ")
Jul 10 08:30:08 aaron-lpt plasma_waitforname[1652]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jul 10 08:30:08 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Jul 10 08:30:08 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activating service name='org.freedesktop.Notifications' requested by ':1.11' (uid=1000 pid=1553 comm="nm-applet ")
Jul 10 08:31:08 aaron-lpt plasma_waitforname[4024]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jul 10 08:31:08 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Jul 10 09:29:12 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activating service name='org.freedesktop.Notifications' requested by ':1.4' (uid=1000 pid=1558 comm="pamac-tray ")
Jul 10 09:30:13 aaron-lpt plasma_waitforname[10402]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jul 10 09:30:13 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Jul 10 09:39:26 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activating service name='org.freedesktop.Notifications' requested by ':1.268' (uid=1000 pid=9047 comm="/opt/discord/Discord ")
Jul 10 09:40:27 aaron-lpt plasma_waitforname[11135]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jul 10 09:40:27 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
Jul 10 09:40:27 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Activating service name='org.freedesktop.Notifications' requested by ':1.268' (uid=1000 pid=9047 comm="/opt/discord/Discord ")
Jul 10 09:40:38 aaron-lpt systemd[1495]: Starting XFCE notifications service...
Jul 10 09:40:38 aaron-lpt dbus-daemon[1520]: [session uid=1000 pid=1520] Successfully activated service 'org.freedesktop.Notifications'
Jul 10 09:40:38 aaron-lpt systemd[1495]: Started XFCE notifications service.
grep -i notif ~/.xsession-errors
(nm-applet:1553): libnotify-WARNING **: 08:29:33.375: Failed to connect to proxy
(nm-applet:1553): nm-applet-WARNING **: 08:29:58.387: Failed to show notification: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached
** (pamac-tray:1558): WARNING **: 08:30:08.145: tray.vala:188: Error calling StartServiceByName for org.freedesktop.Notifications: Process org.freedesktop.Notifications exited with status 1
(nm-applet:1553): nm-applet-WARNING **: 08:30:58.198: Failed to show notification: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached
** (pamac-tray:1558): WARNING **: 09:29:37.675: tray.vala:214: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached
** (pamac-tray:1558): WARNING **: 09:30:13.136: tray.vala:188: Error calling StartServiceByName for org.freedesktop.Notifications: Process org.freedesktop.Notifications exited with status 1
(discord:9047): libnotify-WARNING **: 09:39:51.864: Failed to connect to proxy
(discord:9047): libnotify-WARNING **: 09:40:16.888: Failed to connect to proxy
[11204:11265:0710/094021.637904:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
(discord:9047): libnotify-WARNING **: 09:40:27.138: Failed to connect to proxy
[10:02:25:416][0x1a18380][Info]components/core/event-count-notifier/AbstractEventCountNotifier.cpp:66: "Notify event count: 0."
[10:02:26:065][0x1a18380][Info]components/core/event-count-notifier/AbstractEventCountNotifier.cpp:66: "Notify event count: 0."
答案1
我发现对我有用的是manjaro 论坛
systemctl --user start xfce4-notifyd
systemctl --user status xfce4-notifyd
systemctl --user enable xfce4-notifyd
但这对我来说不是一个永久的解决方案。它的状态从linked
变为enabled
systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; linked; vendor preset: enabled)
Active: active (running) since Fri 2020-07-10 09:40:38 SAST; 52min ago
Main PID: 12585 (xfce4-notifyd)
CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
└─12585 /usr/lib/xfce4/notifyd/xfce4-notifyd
Jul 10 09:40:38 aaron-lpt systemd[1495]: Starting XFCE notifications service...
Jul 10 09:40:38 aaron-lpt systemd[1495]: Started XFCE notifications service.
⟩ systemctl --user disable xfce4-notifyd
Removed /home/aaron/.config/systemd/user/xfce4-notifyd.service.
⟩ systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2020-07-10 09:40:38 SAST; 53min ago
Main PID: 12585 (xfce4-notifyd)
CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
└─12585 /usr/lib/xfce4/notifyd/xfce4-notifyd
Jul 10 09:40:38 aaron-lpt systemd[1495]: Starting XFCE notifications service...
Jul 10 09:40:38 aaron-lpt systemd[1495]: Started XFCE notifications service.
⟩ systemctl --user enable xfce4-notifyd
Created symlink /home/aaron/.config/systemd/user/default.target.wants/xfce4-notifyd.service → /usr/lib/systemd/user/xfce4-notifyd.service.
⟩ systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-07-10 09:40:38 SAST; 53min ago
Main PID: 12585 (xfce4-notifyd)
CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
└─12585 /usr/lib/xfce4/notifyd/xfce4-notifyd
Jul 10 09:40:38 aaron-lpt systemd[1495]: Starting XFCE notifications service...
Jul 10 09:40:38 aaron-lpt systemd[1495]: Started XFCE notifications service.