Pipewire - qpwgraph - Firefox (Routing issue)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
lilith
Established Member
Posts: 1839
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 184 times
Been thanked: 70 times
Contact:

Pipewire - qpwgraph - Firefox (Routing issue)

Post by lilith »

I'm using qpwgraph to route all my audio through a LSP parametric EQ Jack instance as shown in the attached file.
I saved the session in qpwgraph. When listening to tracks on Bandcamp (Soundcloud works fine) sometimes the Firefox instance is not showing up in qpwgraph and the audio seems to be directly routed to to my interface without going through the EQ and limiter. When I hit F5 in qpwgraph the Firefox channel shows up and is correctly connected to the LSP plugins.

I wonder where the problem is located and where I can report this bug. Can anyone reproduce this?

User avatar
Impostor
Established Member
Posts: 1736
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 173 times
Been thanked: 490 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by Impostor »

lilith wrote: Mon Nov 04, 2024 8:02 pm

I'm using qpwgraph to route all my audio through a LSP parametric EQ Jack instance as shown in the attached file.
I saved the session in qpwgraph. When listening to tracks on Bandcamp (Soundcloud works fine) sometimes the Firefox instance is not showing up in qpwgraph and the audio seems to be directly routed to to my interface without going through the EQ and limiter. When I hit F5 in qpwgraph the Firefox channel shows up and is correctly connected to the LSP plugins.

I wonder where the problem is located and where I can report this bug. Can anyone reproduce this?

Already reported this:
https://github.com/rncbc/qpwgraph/issues/47
You're welcome to back it up.

User avatar
Impostor
Established Member
Posts: 1736
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 173 times
Been thanked: 490 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by Impostor »

lilith wrote: Mon Nov 04, 2024 8:02 pm

I'm using qpwgraph to route all my audio through a LSP parametric EQ Jack instance as shown in the attached file.
I saved the session in qpwgraph. When listening to tracks on Bandcamp (Soundcloud works fine) sometimes the Firefox instance is not showing up in qpwgraph and the audio seems to be directly routed to to my interface without going through the EQ and limiter. When I hit F5 in qpwgraph the Firefox channel shows up and is correctly connected to the LSP plugins.

I wonder where the problem is located and where I can report this bug. Can anyone reproduce this?

A workaround is to create a virtual default audio sink, and connect that to LSP. Put a conf file in ~/.config/pipewire/pipewire-pulse.conf.d with content:

Code: Select all

pulse.cmd = [
   { cmd = "load-module" args = "module-null-sink media.class=Audio/Sink sink_name=default_sink channel_map=stereo" }
]
context.exec = [
    { path = "pactl"        args = "set-default-sink default_sink" }
]
User avatar
lilith
Established Member
Posts: 1839
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 184 times
Been thanked: 70 times
Contact:

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by lilith »

Great, thank you! Will try this.

User avatar
sunrat
Established Member
Posts: 1150
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 194 times
Been thanked: 320 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by sunrat »

Pipewire has a decent parametric in module-filter-chain. I use LSP PEQ with my old JACK-ALSA system but PW EQ in the new one. It's not graphical but just copy the parameters from the LSP one to the config file. Works well here, and easy to set as default sink. I wrote about it in another post.

User avatar
lilith
Established Member
Posts: 1839
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 184 times
Been thanked: 70 times
Contact:

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by lilith »

sunrat wrote: Mon Nov 04, 2024 9:50 pm

Pipewire has a decent parametric in module-filter-chain. I use LSP PEQ with my old JACK-ALSA system but PW EQ in the new one. It's not graphical but just copy the parameters from the LSP one to the config file. Works well here, and easy to set as default sink. I wrote about it in another post.

Can you easily turn this off when using headphones?

User avatar
sysrqer
Established Member
Posts: 2619
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 391 times
Been thanked: 175 times
Contact:

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by sysrqer »

I guess sunrat means easyeffects? I've just tried that and it works with new firefox tabs, they get routed through it. Regarding turning it off for headphones, there is an option to load a preset with an input/output device but if that doesn't help there is a bypass switch if you don't mind opening the window.

User avatar
sunrat
Established Member
Posts: 1150
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 194 times
Been thanked: 320 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by sunrat »

lilith wrote: Tue Nov 05, 2024 8:00 pm
sunrat wrote: Mon Nov 04, 2024 9:50 pm

Pipewire has a decent parametric in module-filter-chain. I use LSP PEQ with my old JACK-ALSA system but PW EQ in the new one. It's not graphical but just copy the parameters from the LSP one to the config file. Works well here, and easy to set as default sink. I wrote about it in another post.

Can you easily turn this off when using headphones?

Here's the post I made about it - Re: Pipewire system room correction plugin . I see you have posted in the topic.
I guess you could turn it off by just changing the sink with pactl.
There's also a nice front-end for it by @Axel-Erfurt - Pipewire EQ

@sysrqer no I don't mean EasyEffects. That's a different option but probably more resource-intensive. IIRC it uses LSP as its back-end.

delete000
Established Member
Posts: 65
Joined: Fri Dec 31, 2021 7:48 pm
Has thanked: 16 times
Been thanked: 5 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by delete000 »

Impostor wrote: Mon Nov 04, 2024 9:03 pm

A workaround is to create a virtual default audio sink, and connect that to LSP. Put a conf file in ~/.config/pipewire/pipewire-pulse.conf.d with content:

Code: Select all

pulse.cmd = [
   { cmd = "load-module" args = "module-null-sink media.class=Audio/Sink sink_name=default_sink channel_map=stereo" }
]
context.exec = [
    { path = "pactl"        args = "set-default-sink default_sink" }
]

@Impostor could you elaborate a bit? I added the conf file but don't see the sink in qpwgraph.

User avatar
Impostor
Established Member
Posts: 1736
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 173 times
Been thanked: 490 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by Impostor »

delete000 wrote: Sun Dec 08, 2024 4:14 pm

@Impostor could you elaborate a bit? I added the conf file but don't see the sink in qpwgraph.

There isn't much to elaborate. If you have pipewire-pulse installed, it should have pulled in pulseaudio-utils, and then the above conf file should work afaik (after a reboot maybe). You could try it manually instead:

Code: Select all

pactl load-module module-null-sink media.class=Audio/Sink sink_name=default_sink channel_map=stereo
pactl set-default-sink default_sink
User avatar
lilith
Established Member
Posts: 1839
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 184 times
Been thanked: 70 times
Contact:

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by lilith »

Impostor wrote: Mon Dec 09, 2024 2:02 pm
delete000 wrote: Sun Dec 08, 2024 4:14 pm

@Impostor could you elaborate a bit? I added the conf file but don't see the sink in qpwgraph.

There isn't much to elaborate. If you have pipewire-pulse installed, it should have pulled in pulseaudio-utils, and then the above conf file should work afaik (after a reboot maybe). You could try it manually instead:

Code: Select all

pactl load-module module-null-sink media.class=Audio/Sink sink_name=default_sink channel_map=stereo
pactl set-default-sink default_sink

For me this worked. Will test if it's a solution.

delete000
Established Member
Posts: 65
Joined: Fri Dec 31, 2021 7:48 pm
Has thanked: 16 times
Been thanked: 5 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by delete000 »

For some reason the sink doesn't show up automatically on my system, even after reboot.

Manually starting the sink works though (thanks @Impostor), though there is a small glitch on track changes, pausing, or when the screen wakes up: there's 2-3 repetitions of the last few ms of whatever is playing. It sounds like a buffer looping a few times before the sound stops.

User avatar
Impostor
Established Member
Posts: 1736
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 173 times
Been thanked: 490 times

Re: Pipewire - qpwgraph - Firefox (Routing issue)

Post by Impostor »

delete000 wrote: Sat Feb 01, 2025 10:28 pm

For some reason the sink doesn't show up automatically on my system, even after reboot.

Manually starting the sink works though (thanks @Impostor), though there is a small glitch on track changes, pausing, or when the screen wakes up: there's 2-3 repetitions of the last few ms of whatever is playing. It sounds like a buffer looping a few times before the sound stops.

I've just found out that the pactl command in the context.exec field of the pipewire conf file doesn't even work. I don't know if it never worked, or that it stops being supported somewhere in between pipewire v1.0.5 and v1.3.81. (Conf file specs seem to change now and then with pipewire/wireplumber)

The creation of the sink still works via the conf file, but it must be manually appointed as the default sink. Then wireplumber should remember it (stores it in ~/.local/state/wireplumber/default-nodes) forever after.

I don't experience those repetitions.

Post Reply