Anyone else having audio performance issues on newer kernels?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Prefader
Established Member
Posts: 8
Joined: Sat Sep 07, 2019 3:23 pm
Been thanked: 1 time

Anyone else having audio performance issues on newer kernels?

Post by Prefader »

I'm currently running Ubuntu 24.10, kernel 6.11.0-1014-lowlatency with pipewire 1.2.4 on a Dell Precision 7550 with a Focusrite Scarlett 2i4. With the usual audio tweaks, I'm able to run my DAWs (bitwig & reaper) using PIPEWIRE_QUANTUM=48/48000 without xruns until I start getting a little deep into channel count or put some "hungry" plugins into play.

There is an issue with pipewire 1.2 where I can't publish more than one RTP stream while running pipewire-aes67 at a time. The process of building from source and replacing the default packages has been a little daunting, as pipewire is tightly integrated with Ubuntu and remove it pulls a lot of other co-dependent components out, which is undesireable.

So, I've tried a few newer releases with newer version of pipewire... Ubuntu 25.04, Xubuntu 25.04, Arch, and now Debian Trixie, and they all seem to suffer from the exact same problem: I set myself up using the same tweaks and settings I do on 24.10 (with small variances as needed by distribution), and on none of them can I run stable at under 128/48000. I've also tried the liquorix kernel (I do not recall which distro I was using at the time) to no avail.
I suspect that this has something to do with the switch to PREEMPT=DYNAMIC in the main kernel, but I'm only guessing. Does anyone have any suggestions on things I should be looking at to remedy this?

User avatar
sunrat
Established Member
Posts: 1216
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 210 times
Been thanked: 356 times

Re: Anyone else having audio performance issues on newer kernels?

Post by sunrat »

Prefader wrote: Sun Jun 08, 2025 9:47 pm

I suspect that this has something to do with the switch to PREEMPT=DYNAMIC in the main kernel, but I'm only guessing. Does anyone have any suggestions on things I should be looking at to remedy this?

Have you set preempt=full in your kernel options? Optimised everything with rtcqs?

Prefader
Established Member
Posts: 8
Joined: Sat Sep 07, 2019 3:23 pm
Been thanked: 1 time

Re: Anyone else having audio performance issues on newer kernels?

Post by Prefader »

Yep. As I said, perfectly stable at 48/48000 on 6.11. Everything later, I can't get below 128. Full boot options are:

Code: Select all

threadirqs preempt=full nohz_full=all intel_idle.max_cstate=0 processor.max_cstate=0 intel_pstate=disable

rtcqs reports green across the board on all of these installs once I'm done with setup. Still can't run at 48/48000 on anything but Ubuntu 24.10 and older.

User avatar
Impostor
Established Member
Posts: 1758
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 176 times
Been thanked: 498 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Impostor »

Prefader wrote: Sun Jun 08, 2025 9:47 pm

Don't know about kernel issues, but for your pipewire issue, you do not need to uninstall your distro version before installing a newer version. On Mint 22.1, I just overwrote it with the master version, so I'm now using 1.5.0 instead of 1.0.5.

User avatar
Linuxmusician01
Established Member
Posts: 1757
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 1033 times
Been thanked: 192 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Linuxmusician01 »

So Ubuntu 24 is on PW ver. 1.2 whereas the latest is 1.5? Is there any way to upgrade PW? I'm gonna have to upgrade my distro soon and I want Ubuntu 24 LTS...

[edit] It appears that is already upgraded from PW version 1.0.5 that's in 24.04 Noble (link).

Prefader
Established Member
Posts: 8
Joined: Sat Sep 07, 2019 3:23 pm
Been thanked: 1 time

Re: Anyone else having audio performance issues on newer kernels?

Post by Prefader »

Because of the way ubuntu makes other packages dependent on pipewire (gnome-shell, for example, is dependant on pipewire), removing it for replacement is challenging. Building from source to create packages is also challenging, as ubuntu breaks pipewire up into several smaller packages. I have done this in the past, building 1.4 packages from the 25.04 repos and installing it over 1.2.4 on 24.10, and while performance was good, I had quirky stability issues elsewhere until I downgraded back to the stock pipewire packages.

Also, when installing pipewire over the existing install, doesn't this break whenever an apt-upgrade pulls down an update to pipewire? Would pinning pipewire in apt prevent dependent packages from getting upgraded, as well?

Regardless of upgrading pipewire in place on my current installation, there is still the issue that I will, someday, need to upgrade the entire installation. I feel it's going to be important to know what's changed and how to tune the system to achieve the same performance, but I can't seem to find anything that outlines a way to find what might be at fault here. I still feel like this is tied to the kernel... I may try building 6.14 from source on 24.10 just to see if I can get the same issues to appear, at least then I'll know where to start looking.

Thank you for the ideas and thoughts, all.

User avatar
sunrat
Established Member
Posts: 1216
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 210 times
Been thanked: 356 times

Re: Anyone else having audio performance issues on newer kernels?

Post by sunrat »

Prefader wrote: Mon Jun 09, 2025 1:14 pm

I may try building 6.14 from source on 24.10

Liquorix has 6.14 now. I'm running it on Bookworm and Trixie and it's good so far. Easier than building from source. I don't have the same hardware as you obviously and don't run such low quantum.

Prefader
Established Member
Posts: 8
Joined: Sat Sep 07, 2019 3:23 pm
Been thanked: 1 time

Re: Anyone else having audio performance issues on newer kernels?

Post by Prefader »

This matches my experience... I have good performance at 128/48000 or higher with everything (except for debian's -realtime kernel, which is worse for me), but for my purposes I really need to get latencies down further than that.

P.S. - is that the Songbird logo in your avatar?! I haven't thought about that program in a LONG time, if it is.

User avatar
Impostor
Established Member
Posts: 1758
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 176 times
Been thanked: 498 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Impostor »

Prefader wrote: Mon Jun 09, 2025 1:14 pm

Building from source to create packages is also challenging, as ubuntu breaks pipewire up into several smaller packages. I have done this in the past, building 1.4 packages from the 25.04 repos and installing it over 1.2.4 on 24.10,

I just clone/build/install pipewire directly from
https://gitlab.freedesktop.org/pipewire/pipewire
Just 5 cli commands and it's done.

Prefader wrote: Mon Jun 09, 2025 1:14 pm

Also, when installing pipewire over the existing install, doesn't this break whenever an apt-upgrade pulls down an update to pipewire?

Yeah, I don't apt-upgrade ever :). If mintupdate offers a pipewire update, I graciously decline.

User avatar
sunrat
Established Member
Posts: 1216
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 210 times
Been thanked: 356 times

Re: Anyone else having audio performance issues on newer kernels?

Post by sunrat »

Prefader wrote: Mon Jun 09, 2025 2:26 pm

P.S. - is that the Songbird logo in your avatar?! I haven't thought about that program in a LONG time, if it is.

Yes it is! Songbird was a promising project that never was completed.

User avatar
Linuxmusician01
Established Member
Posts: 1757
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 1033 times
Been thanked: 192 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Linuxmusician01 »

Impostor wrote: Mon Jun 09, 2025 3:02 pm
Prefader wrote: Mon Jun 09, 2025 1:14 pm

Building from source to create packages is also challenging, as ubuntu breaks pipewire up into several smaller packages. I have done this in the past, building 1.4 packages from the 25.04 repos and installing it over 1.2.4 on 24.10,

I just clone/build/install pipewire directly from
https://gitlab.freedesktop.org/pipewire/pipewire
Just 5 cli commands and it's done.

Prefader wrote: Mon Jun 09, 2025 1:14 pm

Also, when installing pipewire over the existing install, doesn't this break whenever an apt-upgrade pulls down an update to pipewire?

Yeah, I don't apt-upgrade ever :). If mintupdate offers a pipewire update, I graciously decline.

Don't you have to remove the PipeWire packages that your distro itself installed then? And if so, won't that break software (Gnome or something) that depends on it?

User avatar
Impostor
Established Member
Posts: 1758
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 176 times
Been thanked: 498 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Impostor »

Linuxmusician01 wrote: Tue Jun 10, 2025 9:36 am

Don't you have to remove the PipeWire packages that your distro itself installed then? And if so, won't that break software (Gnome or something) that depends on it?

I didn't remove any packages. Just "make install" in /usr, so I don't break the (any) pipewire system integration, just overwrite the old stuff. So as far as other software is concerned, nothing has changed.

I did clean up some obsolete wireplumber and pipewire conf stuff in /usr/share, but afaict I could've just as well let it bitrot. Anyway, I've been running my system like this for almost 6 months already, and haven't encountered any issues yet. No more than before, I mean...

User avatar
Linuxmusician01
Established Member
Posts: 1757
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 1033 times
Been thanked: 192 times

Re: Anyone else having audio performance issues on newer kernels?

Post by Linuxmusician01 »

Impostor wrote: Tue Jun 10, 2025 2:03 pm
Linuxmusician01 wrote: Tue Jun 10, 2025 9:36 am

Don't you have to remove the PipeWire packages that your distro itself installed then? And if so, won't that break software (Gnome or something) that depends on it?

I didn't remove any packages. Just "make install" in /usr, so I don't break the (any) pipewire system integration, just overwrite the old stuff. So as far as other software is concerned, nothing has changed.

I did clean up some obsolete wireplumber and pipewire conf stuff in /usr/share, but afaict I could've just as well let it bitrot. Anyway, I've been running my system like this for almost 6 months already, and haven't encountered any issues yet. No more than before, I mean...

Thank you for the info/clearing that up. I might do the same some day.

Prefader
Established Member
Posts: 8
Joined: Sat Sep 07, 2019 3:23 pm
Been thanked: 1 time

Re: Anyone else having audio performance issues on newer kernels?

Post by Prefader »

I haven't found any solutions yet, but I have a couple of data points:

  • I get a LOT of xruns on the USB input device, even when it's not routed or in use

  • The audio application (Reaper , Bitwig) reports very few xruns

  • The USB output device shows similar xruns to the application, but not at the same time

  • I can hear far more dropouts than are being reported

I'm still trying to get this working on Arch, kernel version 6.15. I've followed all of the steps in this guide: https://this.ven.uber.space/docs/computer/pro-audio/ to see if any of the things I don't usually do in there had any effect, and it hasn't changed my situation any as far as I can tell. I'm still bottoming out at 128/48000, where on Ubuntu 24.10 I can get down to 48/48000.

Post Reply