Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Spotifyd | Failed to initialize Dbus connection (Read 2458 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Spotifyd | Failed to initialize Dbus connection

This error occurs when I use spotifyd:

Caught panic with message: Failed to initialize DBus connection: D-Bus error: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

I don't understand why this has happened.
exotic

Re: Spotifyd | Failed to initialize Dbus connection

Reply #1
This error occurs when I use spotifyd:

Caught panic with message: Failed to initialize DBus connection: D-Bus error: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

I don't understand why this has happened.
Hi,

Which packages are you using and how do you start it?


Re: Spotifyd | Failed to initialize Dbus connection

Reply #2
I have syslog-ng, syslog-ng-runit, spotifyd-runit, spotifyd, and spotify-tui.

I've managed to change the error somehow, it now says:

Feb 14 03:04:01 zachens login[1064]: pam_elogind(login:session): Failed to connect to system bus: No such file or directory
Feb 14 03:06:43 zachens spotifyd[1688]: Caught panic with message: attempted to zero-initialize type `librespot_tremor::tremor_sys::ov_callbacks`, which is invalid
Feb 14 03:06:45 zachens spotifyd[1688]: Caught panic with message: called `Result::unwrap()` on an `Err` value: "SendError(..)"
Feb 14 03:06:45 zachens spotifyd[1688]: Player thread panicked!

I am not sure what I did to change it, I was fiddling around and forget to check.

I have it set with rsm.
exotic

Re: Spotifyd | Failed to initialize Dbus connection

Reply #3
Check inspect and compare your insallation, with the results below:

Code: [Select]
-> sudo ps aux | grep dbus                                                                                                     
root      1084  0.0  0.0   2404  1228 ?        Ss   16:51   0:00 runsvdir -P /run/runit/service log: Activating service name='org.freedesktop.UPower' requested by ':1.69' (uid=1000 pid=8179 comm="/usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/pa") (using servicehelper) dbus-daemon[1220]: [system] Successfully activated service 'org.freedesktop.UPower' .... (upowerd:8493): UPower-Linux-WARNING **: 18:37:26.514: treating change event as add on /sys/devices/pci0000:00/0000:00:13.2/usb2/2-2 ...
root      1209  0.0  0.0   2252   680 ?        Ss   16:51   0:00 runsv dbus
dbus      1220  0.0  0.0   5736  4372 ?        S    16:51   0:01 dbus-daemon --system --nofork --nopidfile
linuxer   8058  0.0  0.0   5080   284 ?        S    17:23   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session xfce4-session
linuxer   8059  0.4  0.0   6184  4080 ?        Ss   17:23   0:26 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
linuxer   8084  0.0  0.0   4640  3576 ?        S    17:23   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
linuxer  21560  0.1  0.0   8768  2196 pts/1    S+   19:11   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn dbus
Code: [Select]
->  sudo rsm status dbus                                                                                                                                                                 
>  filtering out 'acpid' because match 'dbus'
>  filtering out 'agetty-tty1' because match 'dbus'
>  filtering out 'agetty-tty2' because match 'dbus'
>  filtering out 'agetty-tty3' because match 'dbus'
>  filtering out 'agetty-tty4' because match 'dbus'
>  filtering out 'agetty-tty5' because match 'dbus'
>  filtering out 'agetty-tty6' because match 'dbus'
>  filtering out 'ananicy' because match 'dbus'
>  filtering out 'apcupsd' because match 'dbus'
>  filtering out 'avahi-daemon' because match 'dbus'
>  filtering out 'bluetoothd' because match 'dbus'
>  filtering out 'clamd' because match 'dbus'
>  filtering out 'colord' because match 'dbus'
>  filtering out 'cronie' because match 'dbus'
>  filtering out 'cupsd' because match 'dbus'
>  filtering out 'docker' because match 'dbus'
>  filtering out 'elogind' because match 'dbus'
>  filtering out 'jackett' because match 'dbus'
>  filtering out 'lightdm' because match 'dbus'
>  filtering out 'lm_sensors' because match 'dbus'
>  filtering out 'NetworkManager' because match 'dbus'
>  filtering out 'nmbd' because match 'dbus'
>  filtering out 'openntpd' because match 'dbus'
>  filtering out 'smbd' because match 'dbus'
>  filtering out 'spotifyd' because match 'dbus'
>  filtering out 'syslog-ng' because match 'dbus'
>  filtering out 'teamviewer' because match 'dbus'
>  filtering out 'udevd' because match 'dbus'
>  filtering out 'ufw' because match 'dbus'
>  filtering out 'webmin' because match 'dbus'
>  filtering out 'zramen' because match 'dbus'
> [rsm] - linuxer-pc (/run/runit/service) - 1 service

   SERVICE              STATE   ENABLED   PID      COMMAND           TIME
 ✔ dbus                 run     true      1220     dbus-daemon       2 hours
Code: [Select]
-> sudo pacman -Qs dbus                                                                                                                                                                             
local/dbus 1.12.20-1
    Freedesktop.org message bus system
local/dbus-c++ 0.9.0-9
    A C++ API for D-BUS
local/dbus-glib 0.110-2
    GLib bindings for DBUS
local/dbus-runit 20191020-2
    runit service scripts for dbus
local/dleyna-connector-dbus 0.3.0-3
    Provides a D-Bus API for the dLeyna services
local/gambas3-gb-dbus 3.15.2-7 (gambas3)
    DBUS component
local/kdbusaddons 5.78.0-1 (kf5)
    Addons to QtDBus
local/lib32-dbus 1.12.20-1.1
    Freedesktop.org message bus system (32-bit)
local/lib32-dbus-glib 0.110-2
    GLib bindings for DBUS
local/lib32-libdbusmenu-glib 16.04.0-4
    Library for passing menus over DBus (32-bit)
local/lib32-libdbusmenu-gtk2 16.04.0-4
    Library for passing menus over DBus (32-bit) (GTK+ 2 library)
local/lib32-libdbusmenu-gtk3 16.04.0-4
    Library for passing menus over DBus (32-bit) (GTK+ 3 library)
local/libcloudproviders 0.3.1-2
    DBus API that allows cloud storage sync clients to expose their services
local/libdbusmenu-glib 16.04.0-4
    Library for passing menus over DBus
local/libdbusmenu-gtk2 16.04.0-4
    Library for passing menus over DBus (GTK+ 2 library)
local/libdbusmenu-gtk3 16.04.0-4
    Library for passing menus over DBus (GTK+ 3 library)
local/libdbusmenu-qt5 0.9.3+16.04.20160218-5
    A library that provides a Qt implementation of the DBusMenu spec
local/python-dbus 1.2.16-3
    Python bindings for DBUS
local/python-dbus-common 1.2.16-3
    Common dbus-python files shared between python-dbus and python2-dbus
local/python-pydbus 0.6.0-7
    Pythonic D-Bus library
local/python2-dbus 1.2.16-3
    Python2 bindings for DBUS
local/python2-pydbus 0.6.0-4
    pythonic D-Bus library
local/ruby-dbus 0.15.0-3
    Ruby module for interaction with D-Bus
local/xdg-dbus-proxy 0.1.2-2
    D-Bus proxy


Re: Spotifyd | Failed to initialize Dbus connection

Reply #4
It's looking very similar on my end, besides all the things you have setup.

Apparently the librespot_tremor has a few temporary fixes, but they all involve using rust cargo.
 
I can't really do that, as I got it via the universe repo?
exotic

Re: Spotifyd | Failed to initialize Dbus connection

Reply #5
So, it is a problem of librespot_tremor, which is probably a part of librespot rust AUR package, or so.

This package seems unupdated for quite some time, while it's code seems to have been updated, recently



We do not support AUR packages, because it is not our responsibility to do so.


Re: Spotifyd | Failed to initialize Dbus connection

Reply #6
You could try spotifyd-full-git and rust-nightly-bin from aur here: https://aur.archlinux.org/packages/spotifyd-full-git/
and here respectively:  https://aur.archlinux.org/packages/rust-nightly-bin/
Although, as previously mentioned, these are unsupported packages.

Best regards.
We should try to be kind to everyone.....we are all fighting some sort of battle.

 

Re: Spotifyd | Failed to initialize Dbus connection

Reply #7
You could try spotifyd-full-git and rust-nightly-bin from aur here: https://aur.archlinux.org/packages/spotifyd-full-git/
and here respectively:  https://aur.archlinux.org/packages/rust-nightly-bin/
Although, as previously mentioned, these are unsupported packages.

Best regards.
The spotifyd on AUR  is systemd depended, versus spotifyd on Universe

Re: Spotifyd | Failed to initialize Dbus connection

Reply #8
Appreciate it fellas.

I've just compiled it from source, and changed the cargo.toml to not include librespot_tremor.

For now, I've just been using scripts to start it.
exotic

Re: Spotifyd | Failed to initialize Dbus connection

Reply #9
So, case solved...

Re: Spotifyd | Failed to initialize Dbus connection

Reply #10
The spotifyd on AUR  is systemd depended, versus spotifyd on Universe
I didn't notice any systemd dependencies in the pkgbuild, and I was able to build the package w/o issues, so there are no build-time systemd dependencies. Perhaps there could be run-time issues? I didn't try using the software.

Best regards.
We should try to be kind to everyone.....we are all fighting some sort of battle.

Re: Spotifyd | Failed to initialize Dbus connection

Reply #11
I didn't notice any systemd dependencies in the pkgbuild, and I was able to build the package w/o issues, so there are no build-time systemd dependencies. Perhaps there could be run-time issues? I didn't try using the software.

Best regards.

Hi,

Check the commented line #34, of our build

Regards

Re: Spotifyd | Failed to initialize Dbus connection

Reply #12
Hi,

Check the commented line #34, of our build

Regards
Yes, I didn't notice that. However, it isn't the only thing to install a systemd .service. I have nine such .service files on my Artix Plasma system in /usr/lib/systemd/user;
"app-org.kde.spectacle.service, at-spi-dbus-bus.service, glib-pacrunner.service, plasma-kglobalaccel.service, plasma-kwin_wayland.service, plasma-kwin_x11.service, xdg-desktop-portal.service, xdg-document-portal.service, xdg-permission-store.service."
They are annoying to see, but do not seem to cause any issues beyond that.  ;)

Best regards.
We should try to be kind to everyone.....we are all fighting some sort of battle.

Re: Spotifyd | Failed to initialize Dbus connection

Reply #13
Yes, I didn't notice that. However, it isn't the only thing to install a systemd .service. I have nine such .service files on my Artix Plasma system in /usr/lib/systemd/user;
"app-org.kde.spectacle.service, at-spi-dbus-bus.service, glib-pacrunner.service, plasma-kglobalaccel.service, plasma-kwin_wayland.service, plasma-kwin_x11.service, xdg-desktop-portal.service, xdg-document-portal.service, xdg-permission-store.service."
They are annoying to see, but do not seem to cause any issues beyond that.  ;)

Best regards.
yeah, at least on this case, there are not any leftovers, from spotifyd (Universe). :-D

Regards