You are not logged in.

#1 Yesterday 12:21:10

SubS0
Member
Registered: 2015-02-10
Posts: 40

wireplumber 0.5.16-1: ALSA sink nodes are never destroyed on USB

After upgrading to wireplumber 0.5.16-1 from extra-testing, ALSA sink nodes for USB audio devices are never destroyed when the device is unplugged. Each replug adds another node, so sinks accumulate indefinitely. Applications that try to bind to a stale node (Firefox here) become unresponsive.

I'm not a WirePlumber wizard, so maybe I'm missing something!
Downgrading the kernel from 7.2.2.arch1-1 -> 7.1.11.arch1-1 doesn't change this behavior.
Downgrading to wireplumber 0.5.15-1 (same DAC, same port, same cable, same me) from [extra] fixes it completely.


If I plug a USB DAC, unplug it, plug it again, checking `pactl list short sinks` against `/proc/asound/cards` at each step (device is an Amanero Combo384) here what I obtain:

                T0 unplugged   T1 plugged   T2 unplugged   T3 replugged
0.5.15          none           282          none           291
0.5.16          326            326, 361     326, 361       326, 361, 369

With 0.5.15 the node tracks the hardware exactly. With 0.5.16 no node is ever
removed. At T2 there are two sinks and zero matching ALSA cards.

The kernel handles the removal normally and the card disappears from /proc/asound/cards. At each removal I got:

usb 3-1: USB disconnect, device number 13

wireplumber sees it too, but the node survives:

spa.alsa: poll fd error/hangup (card removed?), removing poll sources
s-monitors: Could not find ALSA device for node alsa_output.usb-...
spa.alsa: 'front:3': playback open failed: No such file or directory
pw.node: (...) suspended -> error (Start error: No such file or directory)

If my understanding is right, the stale node keeps retrying on a card that no longer exists.

I can't open an issue on gitlab.archlinux.org and I'm not even sure that I don't miss something here… There is something in the changelog but it's unclear for me.

I read that 0.5.16 change "made monitors wait for successful device activation before storing the devices and nodes as managed objects". Is it related?

I kept the logs (journalctl and kernel messages) for each step if needed.

Is this a bug or do Ineed to change something on my config (but, as I tried with no ~/.config/wireplumber, I doubt)?

Offline

#2 Yesterday 16:37:27

filotek
Member
Registered: 2018-08-15
Posts: 26

Re: wireplumber 0.5.16-1: ALSA sink nodes are never destroyed on USB

Confirming this on wireplumber 0.5.16-1 which I experienced this morning.

My hardware: KTMicro AV Access iDock USB, on a Thunderbolt/KVM switch so it gets plugged and unplugged often.

Unplugging the dock did not move audio back to the built-in speakers. The sink was still listed and still marked RUNNING. On replug I ended up with two iDock sinks and two monitors.

Downgrading to 0.5.15-1 fixes it completely.

Could be related to https://gitlab.freedesktop.org/pipewire … issues/999

Offline

#3 Today 08:08:43

DesolateBits
Member
Registered: Today
Posts: 1

Re: wireplumber 0.5.16-1: ALSA sink nodes are never destroyed on USB

I’m seeing what looks like the same or a very similar issue after updating to wireplumber 0.5.16-1, but in my case it affects HDMI audio rather than USB.

My setup is KDE Plasma on Wayland with AMD HDMI audio (Navi 31 HDMI/DP Audio). The HDMI sink for my TV (Telkka) sometimes gets duplicated after the display/HDMI connection changes state.

When the issue happens, wpctl status shows two sinks:

63. Telkka
84. Telkka

pactl list short sinks also shows the exact same PipeWire sink twice:

alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1
alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1

At the same time the journal shows the second node failing to open the ALSA device:

spa.alsa: 'hdmi:2,1': playback open failed: Device or resource busy
pw.node: (alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1-84) suspended -> error

WirePlumber also throws:

wplua: [string "alsa.lua"]:446: attempt to call a nil value (method 'store_managed_pending')

Plasma’s volume applet then becomes confused as well:

qrc:/qt/qml/plasma/applet/org/kde/plasma/volume/ListItemBase.qml:313:
TypeError: Cannot read property 'volume' of undefined

Restarting the audio stack fixes it immediately:

systemctl --user restart pipewire pipewire-pulse wireplumber

After that only one HDMI sink remains again.

Versions:

wireplumber 0.5.16-1
pipewire 1:1.6.8-1
pipewire-pulse 1:1.6.8-1

The issue seems to be triggered by HDMI/display re-enumeration. In my logs Plasma also reported:

There are no outputs - creating placeholder screen

shortly before the duplicate HDMI sink appeared.

So this may be the same stale/duplicate ALSA-node regression, just affecting HDMI in my case.

Offline

#4 Today 08:28:06

pocketarch
Member
Registered: Today
Posts: 1

Re: wireplumber 0.5.16-1: ALSA sink nodes are never destroyed on USB

having the same issue with WirePlumber 0.5.16-1
I’m having several audio issues after updating to WirePlumber 0.5.16-1, mainly when plugging/unplugging headphones:

- Audio glitches/cuts out during jack insertion/removal
- Volume controls can become stuck
- Automatic switching between speakers and headphones stops working
- Unplugging headphones doesn't reliably switch back to speakers
- Media playback doesn't reliably pause when headphones are unplugged
- Repeatedly plugging/unplugging the jack creates duplicate PipeWire ALSA nodes instead of removing/reusing the existing ones
- Speaker, Headphones and Microphone nodes can keep accumulating

Tried reinstalling entire Audio Stack didn't work (drove me crazy) Only after downgrading WirePlumber from 0.5.16-1 to 0.5.15-1 did all of these issues disappear. No other PipeWire packages were changed. Could someone please report this bug

Last edited by pocketarch (Today 11:19:18)

Offline

Board footer

Powered by FluxBB