Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify + MPRIS not working #25587

Closed
muni-corn opened this issue Oct 14, 2020 · 12 comments
Closed

Spotify + MPRIS not working #25587

muni-corn opened this issue Oct 14, 2020 · 12 comments

Comments

@muni-corn
Copy link
Contributor

System

  • xuname:
    Void 5.8.13_1 x86_64 AuthenticAMD uptodate rrrmFFFFFFFFFFFFFFFFF
  • package:
    spotify-1.1.26_2

Expected behavior

On my previous install with Arch Linux, I was able to control Spotify playback with playerctl. I'm using awesomewm with keybinds to control audio playback, with commands such as playerctl play-pause. These commands work for other MPRIS players like Firefox and MPV with the mpv-mpris plugin.

Actual behavior

playerctl doesn't work with Spotify, and playback information doesn't show up in my muse-status bar either.

Steps to reproduce the behavior

Bonus issue: Currently it seems that spotify-1.1.26_1 is unable to be installed correctly/completely from the official nonfree repository:

~/D/void-packages $ sudo xbps-install spotify

Name    Action    Version           New version            Download size
spotify install   -                 1.1.26_1               - 

Size required on disk:          229B
Space available on disk:      6123MB

Do you want to continue? [Y/n] 

[*] Verifying package integrity
spotify-1.1.26_1: verifying RSA signature...

[*] Collecting package files
spotify-1.1.26_1: collecting files...

[*] Unpacking packages
spotify-1.1.26_1: unpacking ...

[*] Configuring unpacked packages
spotify-1.1.26_1: configuring ...
looking up repository.spotify.com
connecting to repository.spotify.com:80
connecting to 13.249.200.159
requesting http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.1.26.501.gbe11e53b-15_amd64.deb
http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.1.26.501.gbe11e53b-15_amd64.deb: (null)
Failed downloading spotify client
ERROR: spotify-1.1.26_1: [configure] INSTALL script failed to execute the post ACTION: Operation not permitted
Transaction failed! see above for errors.

So I am using the spotify package from my local repository.

  1. Install spotify from a local void-packages repository
  2. Make sure playerctl is installed too
  3. Play a song on Spotify and try to toggle playback with playerctl play-pause

Here's an extra little bit of information:

~/D/void-packages $ dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files

(Taken from this issue on the Spotify discussion forums)

@muni-corn
Copy link
Contributor Author

Further information from running spotify on the command line:

/usr/libexec/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /usr/libexec/spotify/spotify)
/usr/libexec/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /usr/libexec/spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
[1013/211704.717838:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

(spotify:17792): GLib-GIO-CRITICAL **: 21:17:04.939: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

Center of attention is the last line; this G_IS_DBUS_CONNECTION assertion failure line is repeated a few times every time the playback status of Spotify changes.

@ericonr
Copy link
Member

ericonr commented Oct 14, 2020

Is your window manager started with dbus-run-session ?

@ericonr
Copy link
Member

ericonr commented Oct 14, 2020

@muni-corn
Copy link
Contributor Author

I have

  • sddm for starting awesomewm
  • dbus system service enabled
  • elogind system service enabled

@muni-corn
Copy link
Contributor Author

Side note: I really want to commend you @ericonr for your response time with these issues :) You're incredibly responsive and cooperative and it's so awesome to see you active on every issue I post here.

Let me know if there's a way to tip you or something. You deserve it. Cheers!

@infinitelytimelesstech
Copy link

I had issues like this for a while on void linux. I've found that if you're using elogind, you do not want it started as a system service. Rather, you'll want to install elogind-dbus replacing the traditional dbus package. After that's installed, when dbus starts as a system service, it will start elogind automatically without needing a service. Check htop or a similar program to make sure elogind is actually running too. Read more here in the Void Documentation. Hope this helps!

@muni-corn
Copy link
Contributor Author

@ohlookitsaaron It doesn't seem like that worked for me :(

@muni-corn
Copy link
Contributor Author

This seems to be an issue with how dbus is set up with my AwesomeWM setup. Spotify works correctly with Plasma.

I noticed that Spotify wasn't showing notifications when playing a new song with AwesomeWM AND Slack wasn't showing notifications for new messages. But all of these work with Plasma.

Finna close this issue and I'll figure out how to get dbus working with awesomewm. I expected it to work just by running awesome from SDDM but I guess it doesn't lol

@muni-corn
Copy link
Contributor Author

Looking at the xsession file for awesomewm, I'm wondering if we should change

  1. Exec to dbus-launch --exit-with-session awesome
  2. Type to XSession

Just comparing awesome.desktop with plasma.desktop

@ericonr
Copy link
Member

ericonr commented Oct 29, 2020

dbus-launch --exit-with-session awesome

You can't do this unless you make awesomewm depend on dbus, which I believe it doesn't. (And it should be dbus-run-session, not dbus-launch --exit-with-session.)

I believe systemd distros deal with this by having systemd handle thinigs, but this doesn't happen here.

@ericonr
Copy link
Member

ericonr commented Oct 29, 2020

Well, turns out it does depend, so it can probably be changed. Idk if this would break how other people are doing their dbus setup, tho.

@dm17
Copy link

dm17 commented Feb 13, 2021

Looking at the xsession file for awesomewm, I'm wondering if we should change

  1. Exec to dbus-launch --exit-with-session awesome
  2. Type to XSession

Just comparing awesome.desktop with plasma.desktop

So that ended up working? Didn't realize using pulse required one to start their WM with dbus.
So instead of exec awesome in .xinitrc we should exec dbus-launch --exitwith-session awesome?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants