pipewire BS

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
funkmuscle
Established Member
Posts: 2814
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 133 times
Been thanked: 34 times

pipewire BS

Post by funkmuscle »

Yes yes yes I already been reading a lot of the headaches with pipewire But I tried to work with it and now I'm about to throw my computer through the window. The only reason I kept it is because finally my system can actually watch a video on YouTube for a couple of pointers while Jack is running. With pulse audio I was never able to do that. I would have to shut down everything that I'm working on, shut down Jack and then open up my browser and go to YouTube. If that failed then I have to see what was still running in the background and to just save myself the headache I would just reboot the computer.

Now as I'm working, sometimes depending on what I'm doing everything starts to sound like I'm eating freaking Rice Krispies with the snack crackle pop. I'm on Arch! If I pull out this pipewire, how do I get a friendly system running where I don't have to shut everything down just to open up a video to refresh my memory on say a certain EQ move that I just learned or something along those lines?

It was so bad before because instead of shutting down and doing all that I would run into the other room, put on my TV, put on my Android box and go to YouTube to figure out what I'm doing and then pause it run to the studio bedroom and then run back and so on. I thought pipewire was the saving gracer right there But it turns out to be not the case.

Any pointers on how to get the so-called perfect system going? It works so flawlessly on windows where I can have Reaper running and if I need to check something I just open up YouTube. Yes I have a Windows box going because there's the EzBass that I use that only runs on Windows probably when I need to fix up a bass guitar track instead of sending it back to my bass guitarist who's pretty busy I could just run it through that and fix up the loose pieces. That's the only reason why I have windows going and the work floor there seem to be so much easier if I need to tap in to YouTube to figure out how to use the EZBass.

User avatar
d.healey
Established Member
Posts: 611
Joined: Fri Sep 22, 2017 8:33 pm
Has thanked: 279 times
Been thanked: 101 times

Re: pipewire BS

Post by d.healey »

No problems here in Debian land. A fresh install just works.

David Healey
YouTube - Free HISE scripting and sample library dev tutorials
Libre Wave - Freedom respecting instruments and effects.
User avatar
funkmuscle
Established Member
Posts: 2814
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 133 times
Been thanked: 34 times

Re: pipewire BS

Post by funkmuscle »

d.healey wrote: Tue Jul 11, 2023 10:19 pm

No problems here in Debian land. A fresh install just works.

Don't get me wrong this works when I am mixing and recording but if I have to open up a browser just to go to YouTube and then I hit play, the snap crackle pop begins.

Especially that a new update of pipewire came today for Arch.
I've usually got a minimum of 25 to 30 tracks going and then of course busses as I'm using Mixbus32c.

Sometimes I even forget to start Qjackctl meaning I'm using pipewire-jack. It's just when I'm trying to educate myself and keep learning how to mix properly is when it becomes beyond annoying.

Ubuntu and all the other Debian I just can't stand. It's just my personal preference. I just find a lot of the stuff is bloated and yes Arch do have some uptight rules but not like Debian at least when I was dabbling in it way back. I think I've tried almost every distro out there and I still keep coming back to Arch.

So it looks like I'm just going to have to keep doing what I've been doing. Been doing it this long already so it doesn't matter if I keep going on. I just thought there was an easy way to do this like it's done in the other two platforms.

User avatar
Audiojunkie
Established Member
Posts: 403
Joined: Thu Feb 21, 2019 4:27 pm
Has thanked: 392 times
Been thanked: 157 times

Re: pipewire BS

Post by Audiojunkie »

funkmuscle wrote: Wed Jul 12, 2023 2:55 am
d.healey wrote: Tue Jul 11, 2023 10:19 pm

No problems here in Debian land. A fresh install just works.

Don't get me wrong this works when I am mixing and recording but if I have to open up a browser just to go to YouTube and then I hit play, the snap crackle pop begins.

Especially that a new update of pipewire came today for Arch.
I've usually got a minimum of 25 to 30 tracks going and then of course busses as I'm using Mixbus32c.

Sometimes I even forget to start Qjackctl meaning I'm using pipewire-jack. It's just when I'm trying to educate myself and keep learning how to mix properly is when it becomes beyond annoying.

Ubuntu and all the other Debian I just can't stand. It's just my personal preference. I just find a lot of the stuff is bloated and yes Arch do have some uptight rules but not like Debian at least when I was dabbling in it way back. I think I've tried almost every distro out there and I still keep coming back to Arch.

So it looks like I'm just going to have to keep doing what I've been doing. Been doing it this long already so it doesn't matter if I keep going on. I just thought there was an easy way to do this like it's done in the other two platforms.

Depending on the hardware used, Pipewire works for “some” people. The problem is that the scheduler is not adequate for running low latency with a normal DAW load for all hardware. @wtay is going to change the scheduler to work more like JACK and use IRQ based scheduling. It will still be recommended for best performance at that time to use a realtime OS or a generic kernel with the kernel boot parameters that allow the generic kernel to run like a realtime OS: /preempt=full and /threadirqs. But the goal overall is to try to make pipewire run DAW loads with low latency and no xruns. It will take time, however. The very rough estimate I got from him was six months. But I wouldn’t be overly surprised if that extended to a year. The point is that work is actively being done to improve pipewire, and we need to be patient. In the meantime, there is nothing wrong with using what you’ve always used successfully in the past.

porzione
Established Member
Posts: 50
Joined: Sat Dec 12, 2020 7:46 am
Has thanked: 21 times
Been thanked: 22 times

Re: pipewire BS

Post by porzione »

funkmuscle wrote: Wed Jul 12, 2023 2:55 am
d.healey wrote: Tue Jul 11, 2023 10:19 pm

No problems here in Debian land. A fresh install just works.

Don't get me wrong this works when I am mixing and recording but if I have to open up a browser just to go to YouTube and then I hit play, the snap crackle pop begins.

I had the same problem - everything was fine until I start watching YT in Firefox, then the sound starts to crackle. I used to download videos using youtube-dl and play them with mpv. The problem was solved with a new sound card.

Bitwig / Surge XT / Linux Studio Plugins / u-he stuff / TAL stuff

User avatar
d.healey
Established Member
Posts: 611
Joined: Fri Sep 22, 2017 8:33 pm
Has thanked: 279 times
Been thanked: 101 times

Re: pipewire BS

Post by d.healey »

funkmuscle wrote: Wed Jul 12, 2023 2:55 am

I've usually got a minimum of 25 to 30 tracks going and then of course busses as I'm using Mixbus32c.

I set Ardour to use JACK (if I use ALSA then it will be in exclusive mode)

funkmuscle wrote: Wed Jul 12, 2023 2:55 am

Sometimes I even forget to start Qjackctl meaning

I don't use qjackctl, and I don't have JACK installed, it's not needed if you're using pipewire. I have just pipewire, pipewire-jack, pipewire-audio-client-libraries, and qpwgraph.

Ubuntu and all the other Debian I just can't stand. It's just my personal preference. I just find a lot of the stuff is bloated

I install the minimal image and install every other package manually.

David Healey
YouTube - Free HISE scripting and sample library dev tutorials
Libre Wave - Freedom respecting instruments and effects.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: pipewire BS

Post by merlyn »

funkmuscle wrote: Tue Jul 11, 2023 8:09 pm

... I'm on Arch! If I pull out this pipewire, how do I get a friendly system running where I don't have to shut everything down just to open up a video to refresh my memory on say a certain EQ move that I just learned or something along those lines? ...

The old way of doing it (pre-Pipewire) is to use a bridge between Pulse and JACK, so that audio from Firefox gets passed to JACK. There's a guide on the Arch wiki.

User avatar
funkmuscle
Established Member
Posts: 2814
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 133 times
Been thanked: 34 times

Re: pipewire BS

Post by funkmuscle »

Thank you to everyone there and almost everything that was mentioned I've had my system set up like that forever. It's just the conversion of a lot of the distros going from pulse to pipe!

My sound interface is Audient Sono so I have no issues with the latency side of things. It's all done through the interface. I don't even change anything. I just mix at 1024. When I record all my latency issues is taken care of by the sound interface.

If I'm converting midi to audio then I will change things over to 128 but none of these give me issues. It's just between the browser and the DAW running. That's when I get the good old snap crackle pop!

One thing that I noticed was mention there that I may try is adding myself to the pipewire group.

Thank you everyone

User avatar
sysrqer
Established Member
Posts: 2527
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: pipewire BS

Post by sysrqer »

Have you looked at pw-top when this happens? Are they running at different sample rates or something? It shouldn't be an issue and I've not experienced anything like it but perhaps it is a weird conversion problem?

Also, perhaps you have set up RT priorities too aggressively? Sounds like firefox doesn't have the capacity to process the audio properly.

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: pipewire BS

Post by j_e_f_f_g »

funk,

As I recall, arch uses systemd. pipewire is undoubtably being controlled via a systemd unit file. In that case, you can use systemd's systemctl utlity to reinitialize pipewire as if your computer has been rebooted.

So when you get the weird distortion, open a terminal window.

Now i'm guessing that pipewire's systemd unit name is pipewire. If not, you can find out by using systemctl to show you a long list of every systemd unit currently in memory. You do this by entering the command:

Code: Select all

systemctl -a

This will likely display several pages of units, one page at a time. Each unit is on its own line. Keep pressing the spacebar until you see some unit whose name suggests it's for pipewire. Then press the Q key to end the listing. Assuming the unit name is pipewire, try issuing this command:

Code: Select all

systemctl try-reload-or-restart pipewire

Hopefully this reload will get rid of the distortion. If not, try:

Code: Select all

systemctl stop pipewire
systemctl start pipewire

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: pipewire BS

Post by asbak »

I don't use Arch so don't know if there are particular idiosyncracies on there that need to be dealt with (I imagine there would be, like on any distro) and what would have to be done to optimise things.

What I can tell you is that it works more or less troublefree for me (browsing, consumer audio, running sessions with guitarix or reaper etc at the same time) for me at low latencies on Mint.

I used to pipe pulse to jack which worked OK but I never liked that solution very much. Audio routing now is much simplified compared to what I had to do and I can still switch to native jack if I had to or back, with a script.

How to make it work?

  • On Arch, no idea.
  • Mint, works fine for me. All the usual tuning steps which you will be familiar with, getting rid of services clutter, a low latency kernel, pass rtcqs checks, threadirqs, preempt full, disable USB autosuspend etc etc etc.

I also made some experiments with the pipewire & wireplumber configs and posted about it here which improved latency a lot for my situation. There may be some clues there if you want to take a look.

PS: Have you tried testing with a different browser? What browser are you using? I have Brave and FF on my system, both work OK for me.

funkmuscle wrote: Tue Jul 11, 2023 8:09 pm

Any pointers on how to get the so-called perfect system going? It works so flawlessly on windows where I can have Reaper running and if I need to check something I just open up YouTube. Yes I have a Windows box going because there's the EzBass that I use that only runs on Windows probably when I need to fix up a bass guitar track instead of sending it back to my bass guitarist who's pretty busy I could just run it through that and fix up the loose pieces. That's the only reason why I have windows going and the work floor there seem to be so much easier if I need to tap in to YouTube to figure out how to use the EZBass.

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: pipewire BS

Post by merlyn »

The Arch version of Firefox has been compiled to use JACK when JACK is running. With Pipewire, Firefox may still think it's using JACK. Actually it would be using pipewire-jack. For whatever reason the Firefox JACK client isn't great, and for me will only work xrun-free with a 512 or larger buffer size.

If that is the problem, you could change the buffer size on the fly when wanting to watch a Youtube video :

Code: Select all

$ jack_bufsize 512

Then change it back when going back to your DAW.

My solution is to use a different soundcard for desktop audio, so I have made Firefox use ALSA. In about:config I created a preference media.cubeb.backend and gave it the value alsa. I'm sure you could force Firefox to use Pulse. I don't know the exact value of the preference, but it will be something like pulse, pulseaudio or pulse-audio.

User avatar
funkmuscle
Established Member
Posts: 2814
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 133 times
Been thanked: 34 times

Re: pipewire BS

Post by funkmuscle »

Wow I forgot a lot of reading to do from what you guys posted. Thanks a lot again. Just a quick update, since the latest update of pipewire, I've been running it with Jack and this is just from the DAW point of view, is it ever running smoothly right now. I will try it later on with the browser to see what happens but last night after the update performance was practically flawless.
I know they are many threads on pipewire here
But I didn't see anyone covering this that's why I had to ask.

User avatar
sysrqer
Established Member
Posts: 2527
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: pipewire BS

Post by sysrqer »

merlyn wrote: Fri Jul 14, 2023 12:13 pm

The Arch version of Firefox has been compiled to use JACK when JACK is running. With Pipewire, Firefox may still think it's using JACK. Actually it would be using pipewire-jack. For whatever reason the Firefox JACK client isn't great, and for me will only work xrun-free with a 512 or larger buffer size.

It doesn't use pipewire-jack by for me when running pipewire in arch. But yeah, pretty sure you can set certain clients to use conservative settings if need be, either in the conf or by setting it as a variable on launch.

User avatar
funkmuscle
Established Member
Posts: 2814
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 133 times
Been thanked: 34 times

Re: pipewire BS

Post by funkmuscle »

sysrqer wrote: Fri Jul 14, 2023 4:16 pm
merlyn wrote: Fri Jul 14, 2023 12:13 pm

The Arch version of Firefox has been compiled to use JACK when JACK is running. With Pipewire, Firefox may still think it's using JACK. Actually it would be using pipewire-jack. For whatever reason the Firefox JACK client isn't great, and for me will only work xrun-free with a 512 or larger buffer size.

It doesn't use pipewire-jack by for me when running pipewire in arch. But yeah, pretty sure you can set certain clients to use conservative settings if need be, either in the conf or by setting it as a variable on launch.

I have tried for years even before pipewire.
One of the settings in cadence used to work but then it completely screwed up my alsaconf And that created a whole different problem so I don't use cadence at all.
I've heard that on arch Firefox should work flawlessly while Jack is running but I have yet to see it happen on my setup. By the way this is a fresh setup because my old hard drive crashed.

Post Reply