Continuous dbus errors: org.freedesktop.DBus.Error.NameHasNoOwner

Ubuntu Support Template

Ubuntu Version:
24.04.03

Desktop Environment (if applicable):
KDE Plasma

Problem Description:
I have thousands of error messeages from dbus. (~200 messages per / second)

method call time=1766005188.745723 sender=:1.19654 -> destination=org.freedesktop.DBus serial=17 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.cinnamon.ScreenSaver"
error time=1766005188.745725 sender=org.freedesktop.DBus -> destination=:1.19654 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=17
--
method call time=1766005188.745827 sender=:1.19654 -> destination=org.freedesktop.DBus serial=21 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.gnome.Shell"
error time=1766005188.745829 sender=org.freedesktop.DBus -> destination=:1.19654 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=21
--
method call time=1766005188.745871 sender=:1.19654 -> destination=org.freedesktop.DBus serial=24 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.gnome.ScreenSaver"
error time=1766005188.745873 sender=org.freedesktop.DBus -> destination=:1.19654 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=24
--
method call time=1766005188.746882 sender=:1.19655 -> destination=org.freedesktop.DBus serial=3 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.kde.StatusNotifierItem"
error time=1766005188.746884 sender=org.freedesktop.DBus -> destination=:1.19655 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=3
--
method call time=1766005188.746921 sender=:1.19655 -> destination=org.freedesktop.DBus serial=6 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.freedesktop.ScreenSaver"
error time=1766005188.746923 sender=org.freedesktop.DBus -> destination=:1.19655 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=6
--
method call time=1766005188.746941 sender=:1.19655 -> destination=org.freedesktop.DBus serial=8 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "com.canonical.dbusmenu"
error time=1766005188.746943 sender=org.freedesktop.DBus -> destination=:1.19655 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=8
--
method call time=1766005188.747034 sender=:1.19655 -> destination=org.freedesktop.DBus serial=15 path=/; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.gnome.Shell.Extensions.StreamController"
error time=1766005188.747036 sender=org.freedesktop.DBus -> destination=:1.19655 error_name=org.freedesktop.DBus.Error.NameHasNoOwner reply_serial=15

I tried to reomve / purge the mentioned applications (cinnamon screensaver, dnome screensaver
) but that does not change anything.
In addition,I tried to find the destination by this cryptic number, but the destination is not found)

~$ dbus-send --print-reply --dest=org.freedesktop.DBus   /   org.freedesktop.DBus.GetConnectionCredentials   string:'1.19656'
Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not get credentials of name '1.19656': no such name

Does someone has a clue how I can find out what is the source of the messages?

Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble

Kernel: inux muse 6.11.0-1013-lowlatency #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 16 15:24:19 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

The colon at the beginning is significant - it marks this as a unique connection name. Also be aware that there are two separate dbus instances, the system bus and the session bus. So you might want to try

dbus-send --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.GetConnectionCredentials string:':1.19656'

or if that gives no sensible results try the system bus

dbus-send --print-reply --system --dest=org.freedesktop.DBus / org.freedesktop.DBus.GetConnectionCredentials string:':1.19656'

A quicker way might be to install ‘d-feet’ from the repositories. It’s a graphical tool to explore the dbus.

Thank you for your quick reply, @hdd-gehrke!
I tried your corrected dbus-requests:

dbus-send --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.GetConnectionCredentials string:':1.53100'
Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not get credentials of name ':1.53100': no such name

With d-feet I was not successfull as well, but I finally know why:
The credential string changes constantly (better it increments by one after all string values “com.canonical.dbusmenu”, “org.gnome.Shell.Extensions.StreamController”
 are sent once.
Can it be that a “dbus-process” is constantly restarting?
Do you know where this number is generated?

I did another request:

dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames |grep 1.12
method return time=1766053018.209171 sender=org.freedesktop.DBus -> destination=:1.125828 serial=3 reply_serial=2
      string ":1.128"
      string ":1.129"
      string ":1.125827"
      string ":1.125828"
      string ":1.120"
      string ":1.121"
      string ":1.122"
      string ":1.123"
      string ":1.125"
      string ":1.127"

Theese high numbers are changing constantly.

If you want to find out which specific application is sending these requests, you can use the sender ID provided in the logs (e.g., :1.19654).

Run this command in your terminal:

dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID string:":1.19654"

This will give you a PID (Process ID). You can then run ps -fp <PID> to see exactly which program is responsible.

Is this a problem?

Usually, no. * If your system is running fine: These logs are just “noise.” The app is simply checking if features like “prevent screen sleep” or “show tray icon” are available. Since it can’t find the specific service for your desktop, it will likely just skip that feature or use a generic fallback.

  • If an app is crashing: If a specific program fails immediately after these logs, it means the developer didn’t handle the NameHasNoOwner error gracefully, and the app is crashing because it expected a service to be there.

This unfortunately does not work as this string is constantly changing, as I wrote above.

It could either be a process that is constantly restarting (a process starts, tries to connect to several services through dbus, finds out that it can’t, closes down because talking to those process is necessary for it, gets restarted possibly by systemd or through dbus; that seems to me like an honest mistake or a misconfiguration) or it could be that it’s one process that constantly connects to and disconnects from dbus (that seems almost malicious to me because I can’t think of a sane reason to do so; might be just an error but would be a stupid thing to do 
). Either explanation fits the constantly increasing unique connection name.

A unique connection name is generated by the dbus-daemon and given to anything that connects to the bus and calls org.freedesktop.DBus.Hello().

You could try something like

while : ; do 
  a=$(dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus \
          org.freedesktop.DBus.GetConnectionUnixProcessID string:':1.60' 2> /dev/null|tail -1)
  a=${a##*uint32} 
  ps -fp $a 2> /dev/null
done

and set the unique connection name to something that is a bit larger than the last observed value. With a bit of luck you’ll get it after it crashes and gets a new unique connection name.

@hdd-gehrke Thank you for your ideas. Yesterday I already tried manually to make the dbus request with an upcoming number but I was not frequent enough.
Now with your script it looks like, the script is using the same number range. So the numbers are rising even much more frequently and I had no chance to get the right number.
I will now try to disable the user services to see if some of this services is causing thtrouble.

Ok that was finally successfull. The problem is caused by the stream-controller app.
Thank you for your help @hdd-gehrke & @Actionparsnip

1 Like

For the benefit of anybody reading this later: I didn’t think of the fact that dbus-send also makes a new connection to the bus on every call. A much more promising approach would be to write a similar script in Python using something like python3-dbus; with that you would only make one connection for your script and could have a function that listens for the signal NameOwnerChanged and would be called by the bus every time a new name appears on the bus.

1 Like

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