You are not logged in.

#1 2023-03-03 22:38:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,885

[SOLVED] mpd with pipewire not playing after seek

I have had the following problem ever since I migrated from pulseaudio to pipewire.

The problem seems to be with mpd.   I havehad tried this under sway, Gnome, i3 and Plasma on X11.  Right now I am using the later.

I am playing music with mpd.   Regardless of the client I use (cantada, mpc), if I cause a skip by clicking on the progress bar in cantada, or use mpc next, mpc prev or mpc skip 10 commands, mpd will apparently move to the new point in the audio stream, will claim that it is playing, but not be playing.  No sound, but also no change in play state (time does not advance).  If I stop and then restart using mpc toggle ; mpc toggle then mpd will play properly from the new spot.  Same if one clicks on pause then play in cantada.

Every time mpd enters play mode, I get the following in the journal:

Mar 03 14:14:31 odin rtkit-daemon[501]: Successfully made thread 4122 of process 484 owned by '1000' RT at priority 20.
Mar 03 14:14:31 odin rtkit-daemon[501]: Supervising 8 threads of 5 processes of 1 users.
Mar 03 14:14:31 odin rtkit-daemon[501]: Successfully made thread 4125 of process 484 owned by '1000' RT at priority 20.
Mar 03 14:14:31 odin rtkit-daemon[501]: Supervising 9 threads of 5 processes of 1 users.
Mar 03 14:14:31 odin mpd[484]: output: Failed to open mixer for 'default detected output': no such mixer control: PCM

Here is a session demonstrating the issue:

ewaller@odin/~[1]% mpc
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   1:05/3:21 (32%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   1:07/3:21 (33%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc prev
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:00/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc     
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:00/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc 
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:00/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc 
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:00/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc toggle
Gordon Lightfoot - Race Among The Ruins
[paused]  #1/11   0:00/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc toggle
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:01/3:21 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:07/3:21 (3%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - Race Among The Ruins
[playing] #1/11   0:10/3:21 (4%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc next
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:00/6:32 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:00/6:32 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:00/6:32 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc toggle
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[paused]  #2/11   0:00/6:32 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc toggle
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:01/6:32 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:04/6:32 (1%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% mpc
Gordon Lightfoot - The Wreck Of The Edmund Fitzgerald
[playing] #2/11   0:07/6:32 (1%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ewaller@odin/~% 

Note that it is playing, and the  time and % are increasing.  Then a request is made for the previous track.  The position counter moves, and the state is playing, but subsequent checks show the time and % don't change (and there is no audio).  Toggle the play state and it reports paused.  Toggle it again and it re-enters play state, counters increment, and I hear a Canadian Troubadour.   Same thing happens when I ask for the next track.

As I mentioned, this never happened with pulseaudio and only occurs with pipewire; I did revert this once just to prove that.   Other audio sources such as a tab in a web browser, mplayer and vlc all seem okay.

Edit:  I should mention I run mpd in single user mode as a systemd user service.

Last edited by ewaller (2023-03-04 15:39:14)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#2 2023-03-03 23:08:45

seth
Member
Registered: 2012-09-03
Posts: 53,198

Re: [SOLVED] mpd with pipewire not playing after seek

Mar 03 14:14:31 odin mpd[484]: output: Failed to open mixer for 'default detected output': no such mixer control: PCM

You don't configure pulse or pipewire as output for mpd, do you?
https://github.com/MusicPlayerDaemon/MPD/issues/1645

Offline

#3 2023-03-03 23:25:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,885

Re: [SOLVED] mpd with pipewire not playing after seek

Don't think so.  I have no config files for pulse or pipewire in my $HOME/.config.  I have no configuration files for pipewire in /etc/pipewire/* ; just empty directories.  I did have a latent configuration file for pulse in /etc, but I deleted it and restarted mpd.   Same results, including the message in the  journal.

Edit:  The mpc config file I had been using was quite old and had come from another system.   I just scrapped it and restarted from /usr/share/doc/mpd/mpdconf.example
Same results.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2023-03-04 07:17:14

seth
Member
Registered: 2012-09-03
Posts: 53,198

Re: [SOLVED] mpd with pipewire not playing after seek

Make sure you're editing the relevant file

man mpd.conf wrote:

MPD first searches  for  it  at  $XDG_CONFIG_HOME/mpd/mpd.conf  then  at  ~/.mpdconf  then  at ~/.mpd/mpd.conf and then in /etc/mpd.conf

The suggested approach is to have sth. like

audio_output {
  type "pulse"
  name "Pipewire Playback"
}

or

audio_output {
  type "pipewire"
  name "Pipewire Playback"
}

in there in order to not default to "type alsa".

Offline

#5 2023-03-04 15:26:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,885

Re: [SOLVED] mpd with pipewire not playing after seek

seth wrote:
audio_output {
  type "pipewire"
  name "Pipewire Playback"
}

There's the magic.    That eliminated the warning in the journal, and it solved my original problem.
I had not paid attention to the audio configuration section as I had audio and had not considered skipping might be backend dependent.

And, I had been editing the expected file; I am somewhat compulsive about putting things in .config and .local when I can.

Thanks Seth.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB