This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

pipewire: fail bluez node transition instead of stalling wireplumber

+22
+22
2configs/pipewire.nix
··· 27 27 pulse.enable = true; 28 28 jack.enable = true; 29 29 }; 30 + 31 + # WirePlumber's bluez monitor calls node:activate() on the result of 32 + # LocalNode(), which is nil when the adapter factory refuses the node. The 33 + # WH-1000XM5 triggers that whenever its audio transport dies ("spa.bluez5: 34 + # Failure in Bluetooth audio transport", then "mod.adapter: can't get 35 + # format: Invalid argument"): the Lua hook throws, its AsyncEventHook 36 + # transition never completes, and the event dispatcher stalls for good -- 37 + # after which no node ever activates again, the ALSA sinks sit in SUSPENDED, 38 + # and every player (including herdr's notification pings) blocks until 39 + # wireplumber is restarted by hand. Fail the transition instead. 40 + services.pipewire.wireplumber.package = pkgs.wireplumber.overrideAttrs (old: { 41 + postPatch = (old.postPatch or "") + '' 42 + substituteInPlace src/scripts/monitors/bluez/create-node.lua \ 43 + --replace-fail \ 44 + 'local node = LocalNode("adapter", properties)' \ 45 + 'local node = LocalNode("adapter", properties) 46 + if node == nil then 47 + transition:return_error ("Failed to create BT node " .. tostring (properties["node.name"])) 48 + return 49 + end' 50 + ''; 51 + }); 30 52 }