You are not logged in.

#1 2023-08-04 08:49:17

knarh
Member
Registered: 2023-03-11
Posts: 58

mpd doesn't work with pipewire in multi-user mode

I'm running mpd in multi-user(system-wide) configuration, and I'm missing something obvious. 

systemctl --user status wireplumber pipewire{,-pulse}
http://0x0.st/H2kr.txt

journalctl -b | grep mpd

Aug 04 16:43:04 archpc systemd[1]: Listening on mpd.socket.
Aug 04 16:43:04 archpc mpd[545]: Ignoring the 'pid_file' setting in systemd mode
Aug 04 16:43:04 archpc mpd[545]: decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Aug 04 16:43:04 archpc mpd[545]: zeroconf: No global port, disabling zeroconf
Aug 04 16:44:55 archpc mpd[545]: exception: Failed to open "Pipewire Sound Server" (pipewire); Failed to connect stream: Host is down

mpd service is active

Where's a problem?

Last edited by knarh (2023-08-05 07:36:28)

Offline

#2 2023-08-04 11:16:26

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: mpd doesn't work with pipewire in multi-user mode

'm running mpd in multi-user configuration

When you mean multi-user do you mean system-wide mpd configuration? I have a feeling you're running pipewire in --user config and running mpd  system-wide.
Also post your mpd.conf.

Offline

#3 2023-08-05 07:29:56

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: mpd doesn't work with pipewire in multi-user mode

When you mean multi-user do you mean system-wide mpd configuration?

yes

I have a feeling you're running pipewire in --user config

Pipewire is running as an user service

Also post your mpd.conf.

noting interesting

music_directory "/home/music"
db_file "/var/lib/mpd/mpd.db"
playlist_directory "/var/lib/mpd/playlists"

audio_output {
       type "pipewire"
       name "Pipewire Sound Server"
}

upd: It's a good sense that system service has access to user service, isn't it?

Last edited by knarh (2023-08-05 07:41:10)

Offline

#4 2023-08-05 07:44:33

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: mpd doesn't work with pipewire in multi-user mode

I have a feeling you have a mismatch of configuration. If your mpd is system-wide, then mpd server is owned by root but your pipewire is owned by user. That is I think you are getting the error 'Failed to open' pipewire.
Why do you need pipewire to be in --user mode?

Offline

#5 2023-08-05 07:54:18

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: mpd doesn't work with pipewire in multi-user mode

Why do you need pipewire to be in --user mode?

from wiki:

Pipewire uses systemd/User for management of the server

then mpd server is owned by root

mpd drops superuser privileges, and being owned by "mpd" user

upd:
ps axu | grep mpd

mpd         4495  0.0  0.1 741416 53800 ?        Ssl  15:31   0:00 /usr/bin/mpd --systemd

I understand that the problem is that "mpd" user hasn't access to other program which is owned by another user, so how to fix that?

Last edited by knarh (2023-08-05 08:00:50)

Offline

#6 2023-08-07 20:43:39

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: mpd doesn't work with pipewire in multi-user mode

Not sure. I have had issues before setting up mpd system-wide so I've resorted to user mode. According to the wiki: 'This is convenient for daemons and other services that are commonly run for a single user, such as mpd,' so this seems to me pipewire as single user will need to marry mpd as single user. Alternative is probably to use pulseaudio instead if you want to keep a system-wide config for mpd. Othewise just change your mpd to single user.

Last edited by d_fajardo (2023-08-07 20:45:27)

Offline

#7 2023-08-07 21:32:12

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: mpd doesn't work with pipewire in multi-user mode

https://wiki.archlinux.org/title/Music_ … _mpd_user)
But idk whether that also works (or how) for pipewire, https://wiki.archlinux.org/title/PipeWi … he_network has this only for pipewire-pulse
(So mpd would use tcp into a pulseaudio shim for pipewire on top of alsa, lennartware on steroids…)

Offline

Board footer

Powered by FluxBB