Closed szszoke closed 3 years ago
One of the reasons we have always had some kind of problem with loopback devices(since PulseEffects and Pulseaudio) is that they are implemented by the audio server using the same kind of streams that ordinary players use. The result is that they usually appear in our Players
and Recorders
tab and we try to handle them like they are an audio player. Can you see in these tabs entries related to your loopback devices? If yes try to blocklist them so EasyEffects do no try to move them to our virtual devices. This should fix the problem.
Indeed the loopback devices appeared in the Players
and Recorders
tabs. I added them to the blocklist. I will do some testing and report back.
Adding the two loopback devices solved the issue of the removed links but no links and effect nodes are not created until I manually change the input/output devices and then change them back to the desired ones.
Another weird thing is that EasyEffects links up with the wrong input device.
Look at the nodes marked with red on the screenshot:
I was expecting EasyEffects to link up with capture_MONO
from Scarlett 18i20 Microphone
instead of monitor_AUX7
from the other node with the same name.
Actually, adding the virtual loopback devices to the blocklist did not resolve the issue. When I start EasyEffects, the links between input_AUX7
, output_AUX0
, output_AUX1
and their respective targets is removed.
When I kill EasyEffects the links come back.
There seem to be some issues reported by EasyEffects about setting up links
(easyeffects:85683): easyeffects-WARNING **: 17:48:56.820: soe: link from node 205 to output device 4294967295 failed
(easyeffects:85683): easyeffects-DEBUG: 17:48:56.820: sie: Input device id is invalid. Aborting the link between filters in the microphone pipeline
no links and effect nodes are not created
In order to save cpu power we only link our filters when our Players/Recorders
tab have clients that have effects enabled and are active. So this is something to have in mind when searching for our filters links.
There seem to be some issues reported by EasyEffects about setting up links
Looking at the last logs I see
default.audio.sink, Spa:String:JSON, { "name": "easyeffects_sink" }
default.audio.source, Spa:String:JSON, { "name": "easyeffects_source" }
That is probably the source of the error sie: Input device id is invalid.
. By default EasyEffects tries to use your default source and your default sink. But as PipeWire has EasyEffects virtual devices set as default and we can not play to / record from ourselves EasyEffects does not know which device to take and the id stays undefined. Ideally our virtual devices should never be set as default. Most of the times this causes problems. This kind of thing used to happen in Pulseaudio too.
Try to view the connections through the output of pw-dot
. The file it generates can be viewd with xdot
. I think its output is a little better for debugging.
Thanks for the tip. I get the same result though. The links are removed when EasyEffects is started and then they go back as soon as I close EasyEffects.
Here are three files generated via pw-dot
at three differnet stages (I renamed them to .txt
so that GitHub would let me upload them):
I did some digging with pw-mon
and I found that after EasyEffects are started, I get a few removed: x
lines. If I follow up the ids, they point to links. If I follow up the input and output nodes in the links, they point to the virtual loopback ports and the AUXn
ports on my Scarlett.
After EasyEffects was launched: after.txt
I see... That is weird... I wonder how the simple act of loading EasyEffects could be having such consequences. It makes no sense at all... There are two ways to make links in PipeWire. One that is "high level" and relies on PipeWire's session manager and another that is a more manual approach. Filters can not be linked through the media session manager. So for them we are forced to use the manual and harder approach. We only use the session manager when moving audio clients to our virtual devices. That is what the per application switch does.
Based on the above the only way EasyEffects could be breaking those links is when trying to enable effects for each stream. But if they are blocklisted this should not be happening anymore... I wonder if the session manager is automatically moving the loopback streams to our virtual devices and breaking the links in the process. Both PipeWire and Pulseaudio have a feature where they try to move a stream back to the last used device as soon as that device is available again. Maybe that is what is happening. Are you using wireplumber
or the buit-in PipeWire media session manager?
I am using the built-in session manager.
Ok. Let's look at your last log again
new metadata property: 0, default.configured.audio.sink, Spa:String:JSON, { "name": "easyeffects_sink" }
new metadata property: 0, default.configured.audio.source, Spa:String:JSON, { "name": "easyeffects_source" }
new metadata property: 0, default.audio.sink, Spa:String:JSON, { "name": "scarlett-18i20-playback" }
new metadata property: 0, default.audio.source, Spa:String:JSON, { "name": "scarlett-18i20-microphone" }
(new metadata property: 0, default.video.source, Spa:String:JSON, { "name": "v4l2_input.pci-0000_0f_00.3-usb-0_4.3_1.0" }
new metadata property: 38, target.node, Spa:Id, 4294967295
new metadata property: 41, target.node, Spa:Id, 4294967295
new metadata property: 0, default.audio.sink, Spa:String:JSON, { "name": "easyeffects_sink" }
new metadata property: 0, default.audio.source, Spa:String:JSON, { "name": "easyeffects_source" }
When EasyEffects starts PipeWire switches default devices on its own a few times. Is it still doing that? I think that something must be going wrong with the loopback devices links in this process.
That still happens.
That still happens.
I have the feeling we will have to take this to PipeWire's developers. The most EasyEffects does is asking PipeWire which are the current default devices so we can use them. We never try to set any device as default. I think that the session manager is destroying the loopback device links at some point when switching them between devices. Once EasyEffects is closed our virtual devices are gone with us and the session manager tries to link the loopback devices again. But this time it has no option other than using your hardware as destination.
Kill EasyEffects and try to create a virtual device
pw-cli create-node adapter '{ factory.name=support.null-audio-sink node.name=my-sink media.class=Audio/Sink object.linger=true audio.position=[FL FR] }'
You can use pw-cli destroy id
to destroy this virtual device. You can find its id in the output of pw-cli list-objects Node
. Try also to set it as default to see if this triggers any change in the session manager behavior.
You are right!
When the virtual sink is created, the existing links are removed and when I destroy the sink, the links return. Looks like this issue is not related to EasyEffects after all.
Thanks for the assistance!
For those who might encounter this same issue, my solution was to comment out streams-follow-default
under with-pulseaudio
in my media-session.conf
file.
There are additional issues though.
False alarm. This issue seems to be a lot harder to fix. I cannot get a consistent result. Sometimes everything works as expected, other times the issue comes up again.
Did you try to contact PipeWire's developers? I think this should be reported to them.
EasyEffects Version
6.1.3
What package are you using?
Other (specify below)
Distribution
Mabjaro Pahvo 21.1.6
Describe the bug
I have a Focusrite Scarlett 18i20 3rd Gen that I am using with EasyEffects. I am using the pro-audio PulseAudio profile.
I have set up two loopback devices via PipeWire that link to specific inputs and outputs on the Scarlett 18i20 like this:
This is a screenshot from Helvum that shows the individual nodes and the links before EasyEffects is launched, and the the two virtual devices that should be used by EasyEffects marked by red:
Now, there are two issues:
Expected Behavior
Debug Log
Debug Log
``` (process:57786): easyeffects-DEBUG: 14:33:22.945: main: locale directory: /usr/share/locale (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: system input presets directory: "/etc/easyeffects/input"; (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: system input presets directory: "/etc/xdg/easyeffects/input"; (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: system output presets directory: "/etc/easyeffects/output"; (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: system output presets directory: "/etc/xdg/easyeffects/output"; (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: user presets directory already exists: /home/webstep/.config/easyeffects/ (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: user presets directory already exists: /home/webstep/.config/easyeffects/input (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: user presets directory already exists: /home/webstep/.config/easyeffects/output (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: user presets directory already exists: /home/webstep/.config/easyeffects/autoload/input (easyeffects:57786): easyeffects-DEBUG: 14:33:22.952: presets_manager: user presets directory already exists: /home/webstep/.config/easyeffects/autoload/output (easyeffects:57786): easyeffects-DEBUG: 14:33:22.965: application: easyeffects version: 6.1.3 (easyeffects:57786): easyeffects-DEBUG: 14:33:22.965: pipe_manager: compiled with pipewire: 0.3.35 (easyeffects:57786): easyeffects-DEBUG: 14:33:22.965: pipe_manager: linked to pipewire: 0.3.38 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: core version: 0.3.38 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: core name: pipewire-0 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: found metadata: settings (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Stream/Input/Audio 38 scarlett-18i20-microphone was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Source 39 scarlett-18i20-microphone was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Sink 40 scarlett-18i20-playback was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Stream/Output/Audio 41 scarlett-18i20-playback was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: found metadata: default (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: found metadata: route-settings (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Sink 126 alsa_output.usb-Focusrite_Scarlett_18i20_USB_P96R5DB1509A9B-00.pro-output-0 was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Source 125 alsa_input.usb-Focusrite_Scarlett_18i20_USB_P96R5DB1509A9B-00.pro-input-0 was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: alsa_input.usb-Focusrite_Scarlett_18i20_USB_P96R5DB1509A9B-00.pro-input-0 port 90 is connected to scarlett-18i20-microphone port 59 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: scarlett-18i20-playback port 66 is connected to alsa_output.usb-Focusrite_Scarlett_18i20_USB_P96R5DB1509A9B-00.pro-output-0 port 124 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: scarlett-18i20-playback port 67 is connected to alsa_output.usb-Focusrite_Scarlett_18i20_USB_P96R5DB1509A9B-00.pro-output-0 port 122 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Sink 148 easyeffects_sink was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.050: pipe_manager: Audio/Source/Virtual 155 easyeffects_source was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.051: pipe_manager: easyeffects_sink node successfully retrieved with id 148 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.051: pipe_manager: easyeffects_source node successfully retrieved with id 155 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 0, default.configured.audio.sink, Spa:String:JSON, { "name": "scarlett-18i20-playback" } (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 0, default.configured.audio.source, Spa:String:JSON, { "name": "scarlett-18i20-microphone" } (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 0, default.audio.sink, Spa:String:JSON, { "name": "scarlett-18i20-playback" } (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 0, default.audio.source, Spa:String:JSON, { "name": "scarlett-18i20-microphone" } (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 0, default.video.source, Spa:String:JSON, { "name": "v4l2_input.pci-0000_0f_00.3-usb-0_4.3_1.0" } (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 38, target.node, Spa:Id, 196 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.155: pipe_manager: new metadata property: 41, target.node, Spa:Id, 195 (easyeffects:57786): easyeffects-WARNING **: 14:33:23.171: lv2_wrapper: Could not find the plugin: http://drobilla.net/plugins/mda/Loudness (easyeffects:57786): easyeffects-DEBUG: 14:33:23.172: soe: http://drobilla.net/plugins/mda/Loudness is not installed (easyeffects:57786): easyeffects-WARNING **: 14:33:23.172: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness (easyeffects:57786): easyeffects-WARNING **: 14:33:23.172: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: output (easyeffects:57786): easyeffects-WARNING **: 14:33:23.172: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: link (easyeffects:57786): easyeffects-DEBUG: 14:33:23.179: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.202: lv2_wrapper: http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.232: lv2_wrapper: http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.246: lv2_wrapper: http://lsp-plug.in/plugins/lv2/limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.249: lv2_wrapper: http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-WARNING **: 14:33:23.251: lv2_wrapper: Could not find the plugin: urn:zamaudio:ZaMaximX2 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.251: soe: urn:zamaudio:ZaMaximX2 is not installed (easyeffects:57786): easyeffects-WARNING **: 14:33:23.251: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: thresh (easyeffects:57786): easyeffects-WARNING **: 14:33:23.251: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: ceil (easyeffects:57786): easyeffects-WARNING **: 14:33:23.251: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: rel (easyeffects:57786): easyeffects-DEBUG: 14:33:23.259: lv2_wrapper: http://lsp-plug.in/plugins/lv2/mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.274: pipe_manager: Filter pe_soe_output_level, id = 274, was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.276: soe: output_level successfully connected to pipewire graph (easyeffects:57786): easyeffects-DEBUG: 14:33:23.278: pipe_manager: Filter pe_soe_spectrum, id = 174, was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.280: soe: spectrum successfully connected to pipewire graph (easyeffects:57786): easyeffects-WARNING **: 14:33:23.298: lv2_wrapper: Could not find the plugin: http://drobilla.net/plugins/mda/Loudness (easyeffects:57786): easyeffects-DEBUG: 14:33:23.298: sie: http://drobilla.net/plugins/mda/Loudness is not installed (easyeffects:57786): easyeffects-WARNING **: 14:33:23.298: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: loudness (easyeffects:57786): easyeffects-WARNING **: 14:33:23.298: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: output (easyeffects:57786): easyeffects-WARNING **: 14:33:23.298: lv2_wrapper: http://drobilla.net/plugins/mda/Loudness port symbol not found: link (easyeffects:57786): easyeffects-DEBUG: 14:33:23.301: lv2_wrapper: http://lsp-plug.in/plugins/lv2/sc_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.307: lv2_wrapper: http://lsp-plug.in/plugins/lv2/comp_delay_x2_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.327: lv2_wrapper: http://lsp-plug.in/plugins/lv2/para_equalizer_x32_lr requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.341: lv2_wrapper: http://lsp-plug.in/plugins/lv2/limiter_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.344: lv2_wrapper: http://lsp-plug.in/plugins/lv2/loud_comp_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-WARNING **: 14:33:23.346: lv2_wrapper: Could not find the plugin: urn:zamaudio:ZaMaximX2 (easyeffects:57786): easyeffects-DEBUG: 14:33:23.346: sie: urn:zamaudio:ZaMaximX2 is not installed (easyeffects:57786): easyeffects-WARNING **: 14:33:23.346: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: thresh (easyeffects:57786): easyeffects-WARNING **: 14:33:23.346: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: ceil (easyeffects:57786): easyeffects-WARNING **: 14:33:23.346: lv2_wrapper: urn:zamaudio:ZaMaximX2 port symbol not found: rel (easyeffects:57786): easyeffects-DEBUG: 14:33:23.354: lv2_wrapper: http://lsp-plug.in/plugins/lv2/mb_compressor_stereo requires feature: http://lv2plug.in/ns/ext/urid#map (easyeffects:57786): easyeffects-DEBUG: 14:33:23.367: pipe_manager: Filter pe_sie_output_level, id = 295, was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.369: sie: output_level successfully connected to pipewire graph (easyeffects:57786): easyeffects-DEBUG: 14:33:23.372: pipe_manager: Filter pe_sie_spectrum, id = 147, was added (easyeffects:57786): easyeffects-DEBUG: 14:33:23.374: sie: spectrum successfully connected to pipewire graph (easyeffects:57786): easyeffects-DEBUG: 14:33:23.374: sie: Input device id is invalid. Aborting the link between filters in the microphone pipeline (easyeffects:57786): easyeffects-DEBUG: 14:33:23.384: sie: Input device id is invalid. Aborting the link between filters in the microphone pipeline easyeffects-INFO: 14:33:23.384: application: disabling global bypass (easyeffects:57786): easyeffects-DEBUG: 14:33:23.394: application_ui: Icon Theme Papirus-Light detected (easyeffects:57786): easyeffects-DEBUG: 14:33:23.398: effects_base_ui: cannot lookup application icon scarlett-18i20-playback in /usr/local/share/pixmaps (easyeffects:57786): easyeffects-WARNING **: 14:33:23.398: effects_base_ui: scarlett-18i20-playback icon name not installed in the Papirus-Light icon theme in use. The application icon has been hidden. (easyeffects:57786): easyeffects-DEBUG: 14:33:23.460: rnnoise_ui: model directory already exists: /home/webstep/.config/easyeffects/rnnoise (easyeffects:57786): easyeffects-DEBUG: 14:33:23.466: effects_base_ui: cannot lookup application icon scarlett-18i20-microphone in /usr/local/share/pixmaps (easyeffects:57786): easyeffects-WARNING **: 14:33:23.466: effects_base_ui: scarlett-18i20-microphone icon name not installed in the Papirus-Light icon theme in use. The application icon has been hidden. (easyeffects:57786): easyeffects-DEBUG: 14:33:23.831: new default output device: scarlett-18i20-playback (easyeffects:57786): Gtk-WARNING **: 14:33:23.845: GtkGizmo 0x55ce61162970 (highlight) reported min width -8, but sizes must be >= 0 ```
Additional Information
The reason why I set up virtual devices and don't connect to the Scarlett directly is because I want to have a layer of isolation. That way EasyEffects would not have to deal with the Scarlett sometimes being disconnected.