You are not logged in.
Hello all,
I've been having trouble with getting wireplumber config files to properly "apply" the effects.
The two main things I am trying to do: swap the left-right audio channels (so the "left" is "right" and "right" becomes "left"), and disable suspension as whenever audio stops playing I've noticed when trying to play some other stream it has no output until I try playing a stream again, or use a different application to start playing. From what I've found disabling suspension might help with this.
Originally I had the conf files in
~/.config/wireplumber/wireplumber.conf.d/
however they never seemed to apply so I had to move them to
/etc/wireplumber/wireplumber.conf.d/
Now at least when inspecting with wpctl it appears as if they worked, but the actual output still isn't swapped. Listening to a "headphone test video" or even using my DE's audio utility to test left/right channels it's still not swapped.
Additionally, despite seeing the suspend timeout being present the issue with audio not playing still remains.
I'm really quite confused on why, at the very least, the swapped channels isn't working.
These are the config files I have made for wireplumber
monitor.alsa.rules = [
{
matches = [
{
# Matches all sources
node.name = "~alsa_input.*"
},
{
# Matches all sinks
node.name = "~alsa_output.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]
51-disable-suspension.conf
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_output.*"
}
]
actions = {
update-props = {
audio.position = ["FR", "FL"]
}
}
}
]
52-swap-channels.conf
results of wpctl inspect
wpctl inspect 76
id 76, type PipeWire:Interface:Node
alsa.card = "2"
alsa.card_name = "USB Audio"
alsa.class = "generic"
alsa.components = "USB0b05:1996"
alsa.device = "2"
alsa.driver_name = "snd_usb_audio"
alsa.id = "Audio"
alsa.long_card_name = "Generic USB Audio at usb-0000:00:14.0-4, high speed"
alsa.mixer_device = "_ucm000A.hw:Audio"
alsa.mixer_name = "USB Mixer"
alsa.name = "USB Audio #2"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "Generic USB Audio at usb-0000:00:14.0-4, high speed"
api.alsa.card.name = "USB Audio"
api.alsa.headroom = "8704"
api.alsa.open.ucm = "true"
api.alsa.path = "hw:Audio,2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "playback"
api.alsa.period-num = "64"
api.alsa.period-size = "512"
audio.channels = "2"
audio.position = "["FR", "FL"]"
card.profile.device = "12"
* client.id = "41"
clock.quantum-limit = "8192"
device.api = "alsa"
device.class = "sound"
* device.id = "61"
device.profile.description = "S/PDIF Output"
device.profile.name = "HiFi: SPDIF: sink"
device.routes = "1"
* factory.id = "19"
factory.name = "api.alsa.pcm.sink"
library.name = "audioconvert/libspa-audioconvert"
* media.class = "Audio/Sink"
* node.description = "USB Audio S/PDIF Output"
node.driver = "true"
node.driver-id = "76"
node.loop.name = "data-loop.0"
node.max-latency = "16384/48000"
* node.name = "alsa_output.usb-Generic_USB_Audio-00.HiFi__SPDIF__sink"
* node.nick = "USB Audio #2"
node.pause-on-idle = "false"
* object.path = "alsa:acp:Audio:12:playback"
* object.serial = "364"
port.group = "playback"
* priority.driver = "712"
* priority.session = "712"
session.suspend-timeout-seconds = "0"
(the audio channels ARE swapped in wpctl inspect, but when playing audio they aren't?)
journalctl for wireplumber
Jul 17 16:11:55 KRAKEN systemd[984]: Started Multimedia Service Session Manager.
Jul 17 16:11:57 KRAKEN wireplumber[1077]: default: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
Jul 17 16:11:57 KRAKEN wireplumber[1077]: spa.bluez5: BlueZ system service is not available
Jul 17 16:11:57 KRAKEN wireplumber[1077]: [0:00:19.122933907] [1077] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
Jul 17 16:11:57 KRAKEN wireplumber[1077]: [0:00:19.122941025] [1077] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
Jul 17 16:11:57 KRAKEN wireplumber[1077]: [0:00:19.122951238] [1077] INFO Camera camera_manager.cpp:313 libcamera v0.3.0
Jul 17 16:11:57 KRAKEN wireplumber[1077]: wp-event-dispatcher: <WpAsyncEventHook:0x5ff942738320> failed: failed to activate item: Object activation aborted: proxy destroyed
Jul 17 16:27:52 KRAKEN wireplumber[1077]: spa.bluez5: BlueZ system service is not available
From reading, the two errors are related to just webcam stuff and thus can safely be ignored. I believe the BlueZ is also for bluetooth headphones and can be ignored as I am not using those.
journalctl for pipewire
Jul 17 16:11:55 KRAKEN systemd[984]: Started PipeWire Multimedia Service.
Jul 17 16:11:55 KRAKEN pipewire[1076]: pw.context: vm.overrides in context.properties are deprecated, use context.properties.rules instead
Jul 17 16:12:43 KRAKEN pipewire[1076]: spa.audioadapter: 0x582ae972dd38: scheduling stopped node
Jul 17 16:30:21 KRAKEN pipewire[1076]: spa.audioadapter: 0x582ae9417348: scheduling stopped node
some other additional info
kernel 6.9.9-arch1-1
DE: Plasma 6.1.2
WM: kwin (using wayland)
Wireplumber version: 0.5.5-1
PipeWire version: 1:1.2.1-1
I do have and use EasyEffects, however there is no modification/effects set for output, only input (noise reduction mostly). I once attempted using EasyEffects to swap channels, but it resulted in some issues so I wanted to get it working with wireplumber instead.
As for details on my audio setup itself:
I have a JDS Labs Atom amp and DAC. It's connected through an optical S/PDIF cable (the USB analog stopped working entirely for me at some point after an update a year or so back). I've then got my headphones connected to the amp's 6.35mm port.
The main reason I am wanting to swap channels is simply due to the positioning of everything on my desk and with my headphones cable, it is more ergonomic for the headphones to be "reversed" on my head, which results in the "left" speaker being on my "right" ear. Silly, I know, but I assumed swapping channels would just.. kinda work..
As for the suspension, this one is certainly a bit more annoying but I'm not sure what else to describe other than when first playing a stream (youtube, spotify, vlc, whatever) there is no audio. If I pause then play, sometimes twice, it'll come back.
I suspect this is the "scheduling stopped node" warning perhaps, mainly because I found this issue
https://gitlab.freedesktop.org/pipewire … ssues/2771
that sounds similar, although it's been marked as "resolved" and no one else seems to have been having this issue.
I hope I covered at least the initial logs/data that may help, but if there is more you wish for me to respond with or to test I am all ears!
Last edited by ashtronaut (2024-07-18 22:42:53)
Offline
The intermittent playback issue sounds like you might still be running pulse. Make sure pipewire-pulse is installed instead of pulseaudio. That could explain both issues if that was the case.
As for swapping the channels, I usually do that via dedicated config after the sink is established with e.g.
pactl load-module module-remap-sink name='Swapped USB Audio' master=alsa_output.usb-Generic_USB_Audio-00.HiFi__SPDIF__sink channel_map=front-left,front-right master_channel_map=front-right,front-left
... But the way via wireplumber probs should work as well, however I'm also seeing an SPDIF output, which can sometimes behave strangely if you are actually sending a digital input. Can you switch that to an Analog one and does that take the change properly?
Last edited by V1del (2024-09-02 09:54:35)
Offline
The intermittent playback issue sounds like you might still be running pulse. Make sure pipewire-pulse is installed instead of pulseaudio. That could explain both issues if that was the case.
I don't think I've actually got pulseaudio installed.
~ % pacman -Q | grep pulse
libpulse 17.0-3
pipewire-pulse 1:1.2.1-1
pulseaudio-qt 1.5.0-1
libpulse and pulseaudio-qt are dependencies of plasma-pa which was installed when I installed Plasma KDE, but I don't think it actually represents pulseaudio running and I believe it's still just done through pipewire-pulse, using pipewire itself instead.
As for swapping the channels, I usually do that via dedicated config after the sink is established with e.g.
pactl load-module module-remap-sink name='Swapped USB Audio' master=alsa_output.usb-Generic_USB_Audio-00.HiFi__SPDIF__sink master_channel_map=front-left,front-right master_channel_map=front-right,front-left
...
Interesting, are you just having this command run as part of your startup somewhere?
But the way via wireplumber probs should work as well, however I'm also seeing an SPDIF output, which can sometimes behave strangely if you are actually sending a digital input. Can you switch that to an Analog one and does that take the change properly?
Ah so it turns out I was wrong, it is actually using optical S/PDIF not USB, despite being labeled as "USB Audio". I tried switching back to to the actual USB / analog output, but I was unable to get any audio to play. Which made me remember that I switched to optical S/PDIF because at some point, after some update, I remember the USB / analog audio just entirely stopped working and I could never figure out why and my "fix" was to just use optical because it worked. This happened a while ago and my faulty memory strikes again. I'll make sure to update the original post to be more accurate, sorry about that!
So the tl;dr of that long tangent is USB / analog actually doesn't work in general, meaning I can only use the digital S/PDIF.
Offline
Fantastic.....
Did you ever figure this out?
Offline
It would be interesting to get to the bottom of this. I'm trying to disable my useless HDMI sinks. Try with the first one:
monitor.alsa.rules =
[
{
matches =
[
{
node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink"
}
]
actions =
{
update-props =
{
node.disabled = true
}
}
}
]
And the result is:
Sep 02 08:34:57 x1carbon wireplumber[8574]: s-monitors: ALSA node alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink disabled
However, it still shows up in GNOME's audio settings and doesn't seem to appear disabled. Any ideas?
The same approach works with a complete device that I have disabled (omitted for brevity), so I am wondering if disabling individual nodes somehow doesn't work as expected. Any help is appreaciated.
Offline
Fantastic.....
Did you ever figure this out?
Not really no.
At some point (after a random update probably?) the actual USB connection started working (confusingly it's not the audio output called USB audio lol). When I have been able to use that, it actually works great. All the config is properly applied.
After plugging in an external hard drive I have been using to back up some files, the actual USB connection completely stopped working again. Even after removing it and restarting, updating the system, etc, it has gone back to not working.
The settings are not applied when using the S/PDIF output (the one that's called USB but isn't actually).
So the general issue of the config files being applied but not actually working still exists when using S/PDIF.
And my tertiary issue of the actual USB output not really working still exists, as I have no ideas as to why it sometimes randomly will work and then stop and never return until at some point in the potential future.
Audio remains my biggest annoyance with linux. I really wish it "just worked" for me as it seemingly does for others I talk to about my woes...
Offline