MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.17k stars 352 forks source link

MPD's volume is very quiet even on 100% #2134

Open vaxerski opened 6 days ago

vaxerski commented 6 days ago

Bug report

Describe the bug

It's been like this for like 2 years now ish, but used to be fine, for sure. I would bisect releases but 2-3 releases back stop compiling due to fmtlib errors.

I use pipewire and the pipewire output.

Expected Behavior

When I set volume to 100% it's comparable with other apps (e.g. firefox, chromium, etc)

Actual Behavior

When I set volume to 100% it's like... 25% ish of other apps.

Version

mpd --version ``` Music Player Daemon 0.23.15 (v0.23.15+) Copyright 2003-2007 Warren Dukes Copyright 2008-2021 Max Kellermann This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Database plugins: simple proxy upnp Storage plugins: local udisks nfs curl Neighbor plugins: upnp udisks Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [audiofile] wav au aiff aif [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [faad] aac [mpcdec] mpc [wavpack] wv [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps:// [pcm] Filters: libsamplerate soxr Tag plugins: id3tag Output plugins: shout null fifo pipe alsa ao oss openal solaris pipewire pulse jack httpd snapcast recorder Encoder plugins: null vorbis opus lame twolame wave flac Archive plugins: [bz2] bz2 [zzip] zip [iso] iso Input plugins: file io_uring archive alsa qobuz curl ffmpeg nfs mms cdio_paranoia Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue Protocols: file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// Other features: avahi dbus udisks epoll icu inotify ipv6 systemd tcp un ```

I've also tried compiling latest -git, and it did not help.

Configuration

config ``` # An example configuration file for MPD. # Read the user manual for documentation: http://www.musicpd.org/doc/user/ # Files and directories ####################################################### # # This setting controls the top directory which MPD will search to discover the # available audio files and add them to the daemon's online database. This # setting defaults to the XDG directory, otherwise the music directory will be # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # music_directory "~/Music/" # # This setting sets the MPD internal playlist directory. The purpose of this # directory is storage for playlists created by MPD. The server will use # playlist files not created by the server but only if they are in the MPD # format. This setting defaults to playlist saving being disabled. # playlist_directory "~/.mpd/playlists" # # This setting sets the location of the MPD database. This file is used to # load the database at server start up and store the database while the # server is not up. This setting defaults to disabled which will allow # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # #db_file "~/.mpd/database" # # These settings are the locations for the daemon log files for the daemon. # These logs are great for troubleshooting, depending on your log_level # settings. # # The special value "syslog" makes MPD use the local syslog daemon. This # setting defaults to logging to syslog. # #log_file "~/.mpd/log" # # This setting sets the location of the file which stores the process ID # for use of mpd --kill and some init scripts. This setting is disabled by # default and the pid file will not be stored. # pid_file "~/.mpd/pid" # # This setting sets the location of the file which contains information about # most variables to get MPD back into the same general shape it was in before # it was brought down. This setting is disabled by default and the server # state will be reset on server start up. # state_file "~/.mpd/state" # # The location of the sticker database. This is a database which # manages dynamic information attached to songs. # #sticker_file "~/.mpd/sticker.sql" # ############################################################################### audio_output { type "pipewire" name "MPD - pw" #server "192.168.1.1" # optional bind_to_address "any" mixer_type "software" ## sink "remote_server_sink" # optional ## media_role "media_role" #optional } ```

Log

mpd --verbose ``` config_file: loading file /home/vaxry/.mpdconf server_socket: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator' vorbis: Xiph.Org libVorbis 1.3.7 opus: libopus 1.5.2 sndfile: libsndfile-1.2.2 hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled simple_db: reading DB exception: Unrecognized tag 'TitleSort', discarding database file input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured curl: version 8.10.1 curl: with OpenSSL/3.3.2 ```

Let me know if anything else is needed.

MaxKellermann commented 6 days ago

Your log shows that you never played anything with MPD. But since you're using PipeWire and software volume instead of PipeWire volumes - are you sure your PipeWire volumes are set correctly? Try playing without PipeWire, with ALSA on a hw: device. I don't think this is a MPD problem, just a misconfiguration of PipeWire volumes.

vaxerski commented 6 days ago

I am pretty positive pw volumes are fine...

Your log shows that you never played anything with MPD.

odd: image

but music is surely playing via mpd.

image volume seems at 100% in pw.

pavu seems to agree too: image

Try playing without PipeWire, with ALSA on a hw: device.

I'll try, normally it won't cuz pw takes ownership of alsa. Will try to kill it.

vaxerski commented 6 days ago

ALSA seems fine. Volume is normal.

I've also tried PA in mpd and it's quiet too.

MaxKellermann commented 6 days ago

You forgot --stdout - or else have a look at the log file you configured.

vaxerski commented 6 days ago

woopsie. My bad. Here:

``` config_file: loading file /home/vaxry/.mpdconf server_socket: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator' vorbis: Xiph.Org libVorbis 1.3.7 opus: libopus 1.5.2 sndfile: libsndfile-1.2.2 hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled simple_db: reading DB input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured curl: version 8.10.1 curl: with OpenSSL/3.3.2 state_file: Loading state file /home/vaxry/.mpd/state config: option 'bind_to_address' on line 291 was not recognized decoder_thread: probing plugin flac decoder: audio_format=44100:16:2, seekable=true client: [0] opened from [::1]:37674 client: [0] process command "commands" client: [0] command returned 0 client: [0] process command "tagtypes" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "list Album" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "find Album "100 Greatest Classic Rock Songs"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "list Artist Album "100 Greatest Classic Rock Songs" Title "Robot Rock"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "status" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "currentsong" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "lsinfo "/"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "plchanges "4294967295"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "play "0"" playlist: play 0:"FLAC CDs/affected/01_02_Get Revenge On The Tyrant.flac" output: opened "MPD - pw" (pipewire) audio_format=44100:24:2 output: converting in=44100:16:2 -> f=44100:24:2 -> out=44100:24:2 client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "status" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 ```
MaxKellermann commented 6 days ago

What happens if you remove the software mixer, and instead set mixer_type "none"? Check the volume and post a new log. You're playing a 16 bit FLAC file, but the "software" mixer implies a converrsion to 24 bit. Maybe the 24 bit code path to PipeWire is buggy, and setting a "null" mixer will make MPD remain at 16 bit, sidestepping the problem.

vaxerski commented 6 days ago

nope, no change.

Additionally, checked wpctl and volume of the mpd node is 1.00 as expected.

``` config_file: loading file /home/vaxry/.mpdconf server_socket: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator' vorbis: Xiph.Org libVorbis 1.3.7 opus: libopus 1.5.2 sndfile: libsndfile-1.2.2 hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled simple_db: reading DB input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured curl: version 8.10.1 curl: with OpenSSL/3.3.2 state_file: Loading state file /home/vaxry/.mpd/state config: option 'bind_to_address' on line 291 was not recognized decoder_thread: probing plugin flac decoder: audio_format=44100:16:2, seekable=true client: [0] opened from [::1]:36756 client: [0] process command "commands" client: [0] command returned 0 client: [0] process command "tagtypes" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "list Album" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "find Album "100 Greatest Classic Rock Songs"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "list Artist Album "100 Greatest Classic Rock Songs" Title "Robot Rock"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "status" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "currentsong" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "lsinfo "/"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "plchanges "4294967295"" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "play "0"" playlist: play 0:"FLAC/Billy Ocean - Love Really Hurts Without You.flac" output: opened "MPD - pw" (pipewire) audio_format=44100:16:2 client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 client: [0] process command "status" client: [0] command returned 0 client: [0] process command "idle" client: [0] command returned 1 ```
MaxKellermann commented 6 days ago

Okay, that was worth a try! Now ALSA.

vaxerski commented 6 days ago

ALSA seems fine. Volume is normal.

You want a log from that too?

MaxKellermann commented 6 days ago

Oh, I didn't see that reply. No, I guess I don't need a log of that. But I have currently no idea what could cause this PipeWire-specific problem. We now know it's not a general MPD problem, but I don't know where to look, other than looking for more well-hidden PipeWire volume knobs. I've never used PipeWire myself (only for MPD debugging).

vaxerski commented 6 days ago

the weird part is that the pulse output has the exact same issue. Is there a JACK output so that we could test that?

MaxKellermann commented 6 days ago

Sure! https://mpd.readthedocs.io/en/stable/plugins.html#jack

vaxerski commented 6 days ago

JACK works properly, loud and clear... wtf xD

(pipewire-jack, of course)

Should this be closed then as.... a bug in pw-pulse and pw? At this point I am quite lost. No other app has any issues.

borine commented 6 days ago

I see you are using the "easyeffects" output filter with pipewire. Perhaps it is some effect that is causing this problem (eg the "Autogain" effect, or some other that influences volume)? I have no experience with easyeffects, so this is just random speculation!

vaxerski commented 6 days ago

even with easyeffects not running the problem persists