All audio functions fail to start on NixOS


Dec 28 20:26:12 nixos polkitd[3728]: Finished loading, compiling and executing 4 rules
Dec 28 20:26:13 nixos dbus-daemon[1666]: [session uid=1000 pid=1666] Reloaded configuration
Dec 28 20:26:13 nixos dbus-daemon[1666]: [session uid=1000 pid=1666] Reloaded configuration
Dec 28 20:27:05 nixos bluetoothd[971]: Device is already marked as connected
Dec 28 20:27:11 nixos dbus-daemon[972]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.23" (uid=1000 pid=1674 comm="/nix/store/bmrvdzzn438lwrzffwi13878g3d14xn3-wirepl") interfa>
Dec 28 20:27:11 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:61: in global 'unhandleLinkable'
                                                 [string "rescan.lua"]:110: in function <[string "rescan.lua"]:105>
Dec 28 20:27:11 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:61: in global 'unhandleLinkable'
                                                 [string "rescan.lua"]:110: in function <[string "rescan.lua"]:105>
Dec 28 20:27:11 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:61: in global 'unhandleLinkable'
                                                 [string "rescan.lua"]:110: in function <[string "rescan.lua"]:105>
Dec 28 20:27:11 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:61: in global 'unhandleLinkable'
                                                 [string "rescan.lua"]:110: in function <[string "rescan.lua"]:105>
Dec 28 20:27:11 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:61: in global 'unhandleLinkable'
                                                 [string "rescan.lua"]:110: in function <[string "rescan.lua"]:105>
Dec 28 20:27:23 nixos /nix/store/k3a1l3123n87h9d3ha2vhqfqm4l2myb6-xdg-desktop-portal-1.20.3/libexec/xdg-desktop-portal[2134]: Realtime error: Could not get pidns for pid 5788: pidns required but no pidfd provided
Dec 28 20:27:23 nixos wireplumber[1674]: wplua: [string "rescan.lua"]:47: attempt to call a nil value (method 'get_property')
                                         stack traceback:
                                                 [string "rescan.lua"]:47: in global 'checkLinkable'
                                                 [string "rescan.lua"]:130: in function <[string "rescan.lua"]:125>
Dec 28 20:27:32 nixos bluetoothd[971]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down

For example, mpv and firefox both stay at 00:00:00.00 for all video and audio files.

1 Like

Behavior persists - I’ve tried various fixes including pinning and flags to disable lua in wireplumber but none had any effect. (chatgpt said the error indicated wireplumber and pipewire had conflicting versions but I’m not going to try >100 randomly generated pinning scripts)

current config:

  hardware.bluetooth = {
    enable = true;
    powerOnBoot = true;
  };
  # Enable sound.
  # services.pulseaudio.enable = true;
  # OR
  security.rtkit.enable = true;
   services.pipewire = {
     enable = true;
     audio.enable = true;
     alsa.enable = true;
     pulse.enable = true;
     wireplumber.enable = true;
   };

I’ve tried many solutions — this is a very persistent error and yields no results on any search engine

wplua: [string “rescan.lua”]:47: attempt to call a nil value (method ‘get_property’)

Reverting from nixos-unstable and nixpkgs-unstable to

nixos https://channels.nixos.org/nixos-25.11
nixpkgs https://channels.nixos.org/nixpkgs-25.11-darwin

and rebooting fixes it although probably temporarily — the main error from OP still is certainly unresolved and this is a temporary fix via nixpkgs/nixos reversion — maybe nixos since I tried downgrading nixpkgs and rebuilding before and there was no difference in the nixos-rebuild output any of the times nix-channel was changed, only when configuration.nix in /etc/nixos was changed.

edit: Using nixos-25.11 with nixpkgs-unstable allows audio/video to run without apparent errors after reboot.

I encountered the same error when recently updating nixpkgs-unstable. Reverting to nixpkgs-unstable 2fad6eac6077f03fe109c4d4eb171cf96791faa4 seems to have resolved the issue for now.