org.freedesktop.Notifications: Timeout was reached (Error calling StartServiceByName)

On my terminal, I entered notify-send "hello" but instead of getting a notification, it showed this error:

[chococandy@chococandy-nitroan51544 ~]$ notify-send "hello"
Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached

Then I tried running DISPLAY=:0 notify-send "hello" which showed me the same error as before:

[chococandy@chococandy-nitroan51544 ~]$ DISPLAY=:0 notify-send "hello"
Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached

I’m using i3wm and I updated my system just now.
Systemd or journalctl logs:
https://termbin.com/9g4pt
Xorg logs:
https://termbin.com/9wn0

Hi, I am not an expert on that, but from your systemd logs I saw that two services were tried to be started.
org.kde.knotifications
and
org.freedesktop.Notifications

Could you post the result of
ps -ef | grep -E 'notif'
to see what notification process is running?

1 Like
[chococandy@chococandy-nitroan51544 ~]$ ps -ef | grep -E 'notif'
chococa+   18372   18365  0 17:13 pts/0    00:00:00 grep -E notif

Okay, seems like there is no notification process running. Did your notifications work before the update? Did you switch the DE recently?

Can you check if there is any notification service installed, maybe with

pacman -Qs | grep notif

?

Edit: I am not using i3wm, but it might be using dunst for notifications by default, so maybe check whether dunst is installed on your system

1 Like

No, notifications were not working even before the update.
I didn’t switch to DE but I installed KDE DE and used it sometimes for my work.

[chococandy@chococandy-nitroan51544 ~]$ pacman -Qs | grep notif
    Customizable and lightweight notification-daemon
local/eos-update-notifier 1.18-1
    Software update notifier and 'news for you' for EndeavourOS users.
local/knotifications 5.102.0-1 (kf5)
    Abstraction for system notifications
local/knotifyconfig 5.102.0-1 (kf5)
    Event notification library
local/libnotify 0.8.1-1
    Library for sending desktop notifications
local/ruby-rb-inotify 0.10.1-1
    Thorough inotify wrapper for Ruby using FFI
    Listens to file modifications and notifies you about the changes
local/startup-notification 0.12-7
local/xfce4-notifyd 0.7.3-1 (xfce4-goodies)

I checked. Dunst is installed.

[chococandy@chococandy-nitroan51544 ~]$ pacman -Q  | grep dunst
dunst 1.9.0-1

This is a well known issue with dbus service activation.
What is the output of

grep -i name=org.freedesktop.notifications /usr/share/dbus-1/services/*

If you get multiple lines back that means that dbus will try to activate all handlers for registered services when you execute notify-send.

Then, KDE service will timeout because KDE daemons/services for handling notifications are not running.

For quick testing edit /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
and change the name from org.freedesktop.Notifications to something else, i.e

$ sudoedit /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
...
Name=org.freedesktop.TestNotifications

and reboot. notify-send should work after that.

KDE bug reference for this: https://bugzilla.redhat.com/show_bug.cgi?id=484945 (it was opened in 2009 :smile: but still relevant)

2 Likes

Thanks, it worked.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.