Announcements

Spotify not connected to DBus or MPRIS

Solved!
Reply
Highlighted

Spotify not connected to DBus or MPRIS

Regular

Device

ROG Zephyrus G14

Operating System

Manjaro Linux 5.8 with G14 patch

Spotify Version

1.1.42.622.gbd112320, AUR package

Issue

Spotify does not send notifications or respond to media keys. I have checked notify-send, and it functions perfectly. When run from the terminal, Spotify tells me

(spotify:145942): GLib-GIO-CRITICAL **: 20:15:11.712: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Spotify does not show up in MPRIS as a media player, although I installed Clementine and that appears fine, pointing to an issue with Spotify. Running the commands bound to my media keys directly, e.g.
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
gives the error message
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files
Following some questions online I've tried changing my .xinitrc file's command to start my window manager to a few different variations with no success, notably
exec "dbus-launch --exit-with-session i3"

I'm at my wits' end, and outside of my expertise with DBus and MPRIS, so any help or pointers would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution!

Re: Spotify not connected to DBus or MPRIS

Regular

It appears the issue was not with Spotify after all. My changes were to .xinitrc, but because I was starting i3 with lightdm, .xinitrc was not being run. Instead, I put the following commands into my .profile:


export NO_AT_BRIDGE=1
eval $(dbus-launch --sh-syntax)
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID
export DBUS_SESSION_BUS_WINDOWID

 

I'm not sure which of these was the solution, but together they fixed MPRIS controls and caused notifications to work again.

View solution in original post

2 Replies

Re: Spotify not connected to DBus or MPRIS

Rock Star 17
Rock Star 17

Hey @IFcoltransG 

 

Perhaps you should try the snap version of Spotify app, if you're ok with that.
I have no issues with the snap Spotify and the dbus commands even after upgrading the system.

 

Was this working for you before?

 

 

SebastyRock Star 17
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.
Highlighted
Solution!

Re: Spotify not connected to DBus or MPRIS

Regular

It appears the issue was not with Spotify after all. My changes were to .xinitrc, but because I was starting i3 with lightdm, .xinitrc was not being run. Instead, I put the following commands into my .profile:


export NO_AT_BRIDGE=1
eval $(dbus-launch --sh-syntax)
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID
export DBUS_SESSION_BUS_WINDOWID

 

I'm not sure which of these was the solution, but together they fixed MPRIS controls and caused notifications to work again.

View solution in original post

SUGGESTED POSTS