NixOS 22.11 upgrade broke mpd; pipewire/jack problem?

I upgraded from 22.05 to NixOS 22.11. Most things went smoothly but mpd won’t run.

Note: mpd is configured using home-manager and started as a user systemd service but there is nothing in the journal.

$ systemctl --user status mpd.service
× mpd.service - Music Player Daemon
     Loaded: loaded (/home/user/.config/systemd/user/mpd.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2022-12-16 16:49:23 EST; 16h ago
    Process: 232395 ExecStartPre=/nix/store/xbdqbi2mscmhl5wcpbgpjdwxbsrvpkil-bash-5.1-p16/bin/bash -c /nix/store/p643r4aczmzb0dhyrx3dj592f0s>
    Process: 232396 ExecStart=/nix/store/smzyrnjyjx9cc84dj2zzwwigad7158s1-mpd-0.23.8/bin/mpd --no-daemon /nix/store/pza614cg1rbnxckb5ay3ic2p>
   Main PID: 232396 (code=exited, status=127)
$ journalctl --user -u
-- No entries --

Running the command by hand reveals the error.

$ /nix/store/smzyrnjyjx9cc84dj2zzwwigad7158s1-mpd-0.23.8/bin/mpd --no-daemon /nix/store/pza614cg1rbnxckb5ay3ic2p78v4yg7y-mpd.conf
/nix/store/smzyrnjyjx9cc84dj2zzwwigad7158s1-mpd-0.23.8/bin/mpd: symbol lookup error: /nix/store/ljldxs6x6clp4j1z5cqsfyfz0rmazglf-pipewire-0.3.60-jack/lib/ undefined symbol: pw_reallocarray

It looks like the pipewire-jack integration has a problem. I’m not directly using Jack (at least I didn’t configure anything) so I was surprised to see the issue.

The mpd module source includes libjack2 which explains how jack2 is involved but I’m not sure how to further trouble shoot the problem nor how to fix it. Suggestions?

Possibly related. According to that, it is a pipewire package problem.

I’m not sure if this helps. I’m using mpd with pipewire for a long time and being on 22.11 (nixos-unstable) for some time:

My home-manager configuration is that simple:

  services.mpd = {
    enable = true;
    musicDirectory = "${config.home.homeDirectory}/Music";
    extraConfig = ''
      audio_output {
        type "pipewire"
        name "My Pipewire output"

My user is in the audio group.


My config is a superset of yours. With the exception of the actual paths, the configs are the same. I also define dataDir and playlistDirectory as well.

I updated the flake.lock and restarted mpd. It is working now. So whatever it was seems to be transient.

Thanks for your help @bwolf.

FWIW, this seemingly is because you/your systemd unit were trying to run the version of mpd from 22.05, using the pw-jack from 22.11. (I know this because mpd 0.23.8 was never available in 22.11, while Pipewire 0.3.60 is only available in 22.11.)

What are you using to manage that unit file, home-manager? I’m curious as to why it didn’t update the mpd path, if so.

1 Like