Open Arbee4ever opened 1 year ago
that's a pretty old version, try upgrading.
I've faced with something similar; Operating System Type: linux-gnueabihf Spotifyd 0.3.5 cargo 1.72.0 playerctl v2.4.1
Has your spotifyd
binary MPRIS
support built in? As in: Did you install the full
binary and enable the use_mpris
flag?
I'm not sure about full
install
but I've build this bin with cargo by faq from this page:
https://docs.spotifyd.rs/installation/Ubuntu.html
and restart spotifyd service with these params:
backend = "alsa"
use_mpris = true
dbus_type = "session"
In unit logs I seeing these:
Couldn't read volume from alsa device with name "default".
Couldn't set volume: "Couldn't find selem with name 'Master'."
Which audio backend were you using before? Otherwise, you'll need to find the correct configuration, e.g. using aplay -L
.
I've resolved troubles with volume control.
playerctl
still No players found
.
When I change on dbus_type = "system"
I receive this exception:
Message: Failed to register dbus player name: D-Bus error: Connection ":1.119" is not allowed to own the service "org.mpris.MediaPlayer2.spotifyd.instance3022" due to security policies in the configuration file (org.freedesktop.DBus.Error.AccessDenied)
Maybe the reason is that I use Alsa with this dbus_type
?
UPDATE: Seems relates to https://github.com/Spotifyd/spotifyd/issues/244
Are you on a headless system? If so, you'll either need to make sure that a session dbus is available and accessible from spotifyd
as well as playerctl
.
Or you use dbus_type = "system"
and roll your own controlling solution (since playerctl
doesn't work with the system dbus), but that will require additional configuration to fix that security policy issue above. (See the other issue you linked for details on that.)
If you have a working session dbus, you can check that spotifyd
is connecting correctly via
# dbus-monitor --session --monitor "type='signal',interface='org.freedesktop.DBus'"
...
signal time=1701811349.860905 sender=org.freedesktop.DBus -> destination=(null destination) serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.1266"
string ""
string ":1.1266"
signal time=1701811349.861010 sender=org.freedesktop.DBus -> destination=:1.1266 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.1266"
signal time=1701811349.861855 sender=org.freedesktop.DBus -> destination=(null destination) serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string "org.mpris.MediaPlayer2.spotifyd.instance215550"
string ""
string ":1.1266"
signal time=1701811349.861945 sender=org.freedesktop.DBus -> destination=:1.1266 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string "org.mpris.MediaPlayer2.spotifyd.instance215550"
i'm experiencing this issue on as well on Ubuntu 23.10 with a rustup
managed rust, spotifyd 0.3.5, use_mpris=true
& dbus_type=session
how do i build the "full" version? i ran cargo install spotifyd
for installation.
also, log says use_mpris: none
You'll need to add --features dbus_mpris
.
ran cargo install spotifyd --features dbus_keyring,dbus_mpris,default,portaudio_backend,pulseaudio_backend,rodio_backend
TIL how cargo features work ig
a --features all
would be nice
Well, there's --all-features
. ^^
Hey there, I was having the same issue. It turns out I was trying to use the session dbus from while starting from a systemd user unit. This meant that spotifyd didn't have the proper pointers to dbus via environment variable. The proper way to do this is by running:
systemctl --user import-environment; systemctl --user daemon-reload
... apparently. But I'm not sure when/where to do that. Probably via your DE 'autostart' if you have one. Once you've done that, all user units will import your environment on reload.
Description When I start spotifyd, it looks like mpris is not working, as I can't control the playback using my "Music PLayer" Extension or playerctl.
To Reproduce
Expected behavior Playerctl and the extension should be able to control it.
Logs
Click to show logs
``` Loading config from "/home/arbee/.config/spotifyd/spotifyd.conf" CliConfig { config_path: None, no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), username_cmd: None, password: Some("taken out for privacy"), password_cmd: None, use_keyring: false, use_mpris: None, dbus_type: None, on_song_change_hook: None, cache_path: None, no-audio-cache: false, backend: None, volume_controller: Some(Alsa), device: None, control: None, mixer: None, device_name: Some("spotifyd"), bitrate: None, audio_format: None, initial_volume: None, volume_normalisation: false, normalisation_pregain: None, zeroconf_port: None, proxy: None, device_type: Some(Computer), autoplay: false, max_cache_size: None } } Found user shell: Some("/bin/bash") No proxy specified registering event source with poller: token=Token(2147483649), interests=READABLE Using alsa volume controller. registering event source with poller: token=Token(0), interests=READABLE | WRITABLE signal: Want signal found waiting giver, notifying poll_want: taker wants! signal: Want signal: Want Ignoring blacklisted access point ap-gew4.spotify.com:4070 Ignoring blacklisted access point ap-gew4.spotify.com:443 deregistering event source from poller Ignoring blacklisted access point ap-gew4.spotify.com:80 Ignoring blacklisted access point ap-gue1.spotify.com:4070 Connecting to AP "ap-gae2.spotify.com:443" signal: Closed registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE Authenticated as "1doctorproctor1" ! new Session[0] Session[0] strong=3 weak=1 Country: "DE" new Spirc[0] canonical_username: 1doctorproctor1 new MercuryManager new Player[0] Converting with ditherer: tpdf Using AlsaSink with format: S16 command=AddEventSender command=VolumeSet(0) subscribed uri=hm://remote/user/1doctorproctor1/ count=0 kMessageTypeNotify "Pixel 6" 07d93ca34490b752c30032f3eaf210a6424d4942 1558149747 1693775263583 kPlayStatusStop kMessageTypeNotify "Pixel 6" 07d93ca34490b752c30032f3eaf210a6424d4942 1558164304 1693775278140 kPlayStatusPlay kMessageTypeNotify "Pixel 6" 07d93ca34490b752c30032f3eaf210a6424d4942 1558169700 1693775283536 kPlayStatusPlay kMessageTypeLoad "Pixel 6" 07d93ca34490b752c30032f3eaf210a6424d4942 1558170646 1693775283536 kPlayStatusPlay State: context_uri: "spotify:playlist:3rKLlnjjjcNhDmQKS5qdHH" index: 0 position_ms: 19098 status: kPlayStatusPlay position_measured_at: 1693775284525 context_description: "" shuffle: true repeat: true playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: "\360\334\355.r\232N\311\270k\336\304\0003\"a"} track {gid: "\005n\033\222K?C\023\230\266\243\312\300J\275\240"} track {gid: "U\272\224*\254\257J\331\245\275\270\366p\3511Q"} track {gid: "\363n\n\344\022\222I\272\250[\303\017H\351\021T"} track {gid: "\277\301\035K\010\240G:\242D\010\310\245\332+\253"} track {gid: "R\016\234\237\341\003Mk\231\\Ef\2320c\365"} track {gid: "u\213\345(\3042K8\245Xc\242q\337\367\352"} track {gid: "0\201R\202\025\343D\203\256]\307\322\r\325\207C"} track {gid: "h%\232\235J\234O\222\243X\263f\314yo\336"} track {gid: "p\025\323\261\007]F\373\277G\375\2454r\370;"} track {gid: "\201V\364\376\216\020B2\252\021\230\360\261\213O\356"} track {gid: "\316M\214\234\333&J\026\253\227\003\0216\257\263\027"} track {gid: "\263P\330vc\300Mf\251a\006\271(\236j\341"} track {gid: "\241\352\236\271\245\310K?\206n\350>^\256\350\236"} track {gid: "\001\3648\210{&E\214\240\227p\325\201\021\211\325"} track {gid: "\325\304m\t\232\035Hg\224\325\314\007\207R8)"} track {gid: "l\265\035\333\342\233JL\244%\230\242\255\010\341W"} track {gid: "\242{\351V\"TIB\226\227\361Dn\376\352\325"} track {gid: "\035/@\'\326Versions (please complete the following information):
Additional context Config File:
(Also I just noticed that
--verbose
hides the username in the "CliConfig" line for privacy, but not later on, which is not very private)