Talk:MPD

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (~~~~), and indent successive comments with colons (:). Add new sections at the bottom of the page, under a heading (== ==). Please remember to mark sections as "open for discussion" using {{talk|open}}, so they will show up in the list of open discussions.

MPD and Pipewire

Talk status
This discussion is done as of 2022-10-21.

Using MPD as a system app seems to be problematic with pipewire as a user service (on openrc - I don't have a systemd gentoo system setup). I believe this is a result of the design of pipewire which manages containerisation more clearly than pulseaudio. Changing over to pipewire will break a working mpd/pulseaudio setup, and also changing the settings to native pipewire doesn't work. Changing mpd to a user level service rather than a system level service resolves the situation with pulseaudio or pipewire in the audio settings. I propose to rewrite the MPD page to make this clearer.

  • Perhaps it would be better to have the preferred option as user level rather than system level? This is the approach used by Arch in their documentation.
  • Also, I haven't tried to set up pipewire as a system level service - this might be the best approach for those needing a system level mpd service.

Please let me know your opinions!

Paulj (talk) 07:04, 20 October 2022 (UTC)

MPD is supposed to be run as system deamon. Running it as a user deamon is not the goal of MPD, nor it was ever intended to be ran as user daemon at first. Hence the name Music Player Daemon. Citing other linux distribution wikis does not help here. Read the official MPD manual https://mpd.readthedocs.io/en/latest/user.html#the-configuration-file Running MPD as user daemon is a "workaround" for those mentioned application like "pipewire/PA" or other sound deamons. The real question here is is: Which problem are you trying to solve? The problem you are trying to solve is getting to run MPD using Pipewire. The MPD gentoo wiki article is perfectly fine here. Complies how MPD is supposed to work. Get your configuration running, then edit the gentoo wiki here. Do not suggest running MPD as a user deamon primarily, this is the wrong solution for the wrong problem. -- Needle (talk) 11:56, 20 October 2022 (UTC)
Needle - thanks for your comments. The problem I am trying to solve is this:
* Start point: MPD as a daemon, utilising pulseaudio as a user level service. I believe this is the standard setup for gentoo currently (in as much as gentoo has a standard :) ). I have run MPD like this for several years.
* Setup Pipewire to replace pulseaudio as detailed in the wiki / news information. Now MPD doesn’t work with the original pulseaudio settings. Everything else works as expected.
* Change the MPD audio settings to use pipewire natively. MPD still doesn’t work. You can see the details of the error messages here: https://forums.gentoo.org/viewtopic-t-1158055-highlight-.html
* reconfigure so MPD is not running as a system daemon but a user level daemon - everything now works as expected.
Based on this, there are a couple of possibilities:
* I have missed some configuration detail which is required to get MPD working with pipewire when MPD is a system daemon.
* For MPD to work as a system daemon, pipewire needs to be working as a system level daemon. I haven’t tried to set it up like this. From my (limited) understanding, this is not the preferred way to run pipewire.
I’ll have a look at the various bits of documentation you cite to see if/what I have missed. Out of interest: do you have a working MPD system daemon on a system with pipewire as the sound server?
Paulj (talk) 12:30, 20 October 2022 (UTC)
Using MPD with ALSA over here. -- Needle (talk) 13:28, 20 October 2022 (UTC)
Ok - I have a working setup with the following:
* MPD configured with audio_type as "pulse", and running as a system level daemon
* Pipewire-pulse configured with one of the tcp: options under pulse.properties in pipewire-pulse.conf. This enables applications using pipewire through libpulse can utilise pipewire.
Based on a chat on the pipewire IRC, it isn't clear if the pipewire socket will become more accessible in the future in later versions. I did ask, but didn't get a response.
I think an edit to the MPD page explaining that currently setting the audio_type to pipewire will not work for system level daemon utilisation, but will work for user level might be worthwhile? I also think an edit on the pipewire page might help others who trip over the same issue. I'll make a proposal - feel free to modify if you can see a better way to explain it!
Paulj (talk) 16:26, 20 October 2022 (UTC)
Hello Paulj. This is good to hear the configuration issue is solved. Just add it to the wiki and it will be good. Please close the discussion if everything is fine so far on your side. Regards. Needle (talk) 07:01, 21 October 2022 (UTC)