Irregular performance on Mint w 5.15 kernel

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
profquad
Established Member
Posts: 8
Joined: Wed Oct 18, 2023 9:39 pm

Irregular performance on Mint w 5.15 kernel

Post by profquad »

Sometimes things are fine, sometimes I get clicks and even stuttering playback. It is not related to buffer size, I have tried unrespectable lengths to no avail.
My sense is that audio playback is just not a priority to my system.

OS: Linux Mint 21.1 Cinnamon 5.6.8
Kernel: 5.15.0-89-lowlatency
Interface: 1st gen Scarlett 2i2
CPU: i5-8250U
RAM: 24GB
DAW: Reaper 7.05
Sound Server-1: ALSA v: k5.15.0-89-lowlatency running: yes
Sound Server-2: JACK v: 1.9.20 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes

This happens with both JACK and ALSA when it happens. PipeWire is not supported by my DAW.
I have purged pulseaudio from this sacred place.

I think I'm missing something. I have downloaded ubuntustudio-installer, and might throw that in the mix, but I'm not sure what it will change for the better, and less sure what might change for the worse. Do I enable backports PPA if I proceed?

I really appreciate any tips on how to make this more smooth, I do live performance often, but I'm on a break to figure this out and write more music.
Thank you!

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Irregular performance on Mint w 5.15 kernel

Post by Impostor »

profquad wrote: Fri Nov 24, 2023 8:29 pm

tips

This is sufficient for my system (with the generic kernel, mint 20.2):
viewtopic.php?p=156187#p156187

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Irregular performance on Mint w 5.15 kernel

Post by autostatic »

Are you using the threadirqs kernel option? And your CPU governor is set to performance? And Reaper can set CPU DMA latency, see here, have you looked at that?

You could also try running rtcqs and post the output here. That would give an overview of what parts of your system could need improvement when it comes to audio performance.

profquad
Established Member
Posts: 8
Joined: Wed Oct 18, 2023 9:39 pm

Re: Irregular performance on Mint w 5.15 kernel

Post by profquad »

autostatic wrote: Sat Nov 25, 2023 9:47 am

Are you using the threadirqs kernel option? And your CPU governor is set to performance? And Reaper can set CPU DMA latency, see here, have you looked at that?

You could also try running rtcqs and post the output here. That would give an overview of what parts of your system could need improvement when it comes to audio performance.

Thanks! I had gone thru most of the rtcqs list before, but never did Spectre/Meltdown Mitigations because of the warnings about security. Is it really that dangerous? I do indeed have an intel processor.
I had missed adding adding the dma latency rules, and added those now. I wasn't getting threaded IRQ's before, but switched to liquorix.

Still getting a significant stutter when I seek during playback.

here's what's left on the list, besides Spectre/Meltdown mitigations:

Swappiness

==========
[ WARNING ] vm.swappiness is set to 60 which is too high. Set swappiness to a lower value by adding 'vm.swappiness=10' to /etc/sysctl.conf and run 'sysctl --system'. See also https://wiki.linuxaudio.org/wiki/system ... sysctlconf

Filesystems

===========
[ OK ] The following mounts can be used for audio purposes: /
[ WARNING ] The following mounts should be avoided for audio purposes: /run/user/1000/gvfs, /run/user/1000/doc. See also https://wiki.linuxaudio.org/wiki/system ... ilesystems

Swappiness seems irrelevant, since I have plenty of headroom.
I'm not sure why it's bringing up those mounts, probably because my phone is plugged in for internet tethering. I am pretty sure I'm just on the root? But this does feel like a filesystem problem, as it will smoothly play sections I've played already in-session..

In other news, since I opened the DMA latency flood gates, my CPU just shot up to 93 degrees Celsius with only Reaper and Firefox open..

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Irregular performance on Mint w 5.15 kernel

Post by bluebell »

You have an "U"-CPU which means that it's a power saving CPU, probably in a laptop computer.

The xruns and noises may stem from a throttled CPU because it's getting too hot. Cause can be a insufficient cooling system.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Irregular performance on Mint w 5.15 kernel

Post by autostatic »

profquad wrote: Sun Nov 26, 2023 1:42 am

Thanks! I had gone thru most of the rtcqs list before, but never did Spectre/Meltdown Mitigations because of the warnings about security. Is it really that dangerous? I do indeed have an intel processor.

It could be a security issue, especially when your workstation is also connected to the internet. But the performance gain will probably be marginal so I'd leave it for what it is.

profquad wrote: Sun Nov 26, 2023 1:42 am

I had missed adding adding the dma latency rules, and added those now.

Ok, cool! Over here it makes a noticeable difference on my i7 from the stone age. But in your case it might make your workstation run less stable because of what bluebell points out.

profquad wrote: Sun Nov 26, 2023 1:42 am

I wasn't getting threaded IRQ's before, but switched to liquorix.

Liquorix does not use threaded IRQ's by default so make sure to add the threadirqs kernel option to your Grub config and update the config.

profquad wrote: Sun Nov 26, 2023 1:42 am

Still getting a significant stutter when I seek during playback.

Bummer... Reaper does not have audio and/or video buffering options you can tweak?

profquad wrote: Sun Nov 26, 2023 1:42 am

here's what's left on the list, besides Spectre/Meltdown mitigations:
Swappiness seems irrelevant, since I have plenty of headroom.

Agreed. This check is on the edge of being removed from rtcqs.

profquad wrote: Sun Nov 26, 2023 1:42 am

I'm not sure why it's bringing up those mounts, probably because my phone is plugged in for internet tethering. I am pretty sure I'm just on the root? But this does feel like a filesystem problem, as it will smoothly play sections I've played already in-session.

It's bringing up those mounts because the output of the crude detection of what mounts are in use isn't filtered properly. Need to work on that too. You can disregard this output. What kind of hard drive are you using? How is it formatted?

profquad wrote: Sun Nov 26, 2023 1:42 am

In other news, since I opened the DMA latency flood gates, my CPU just shot up to 93 degrees Celsius with only Reaper and Firefox open..

Ouch... So that's not really an option... But maybe you can still get your system more stable by uisng threaded IRQs and prioritizing the right IRQ. Does your audio interface sit on a quiet port, so not shared with anything that could interfere? And did you try different USB cables?

profquad
Established Member
Posts: 8
Joined: Wed Oct 18, 2023 9:39 pm

Re: Irregular performance on Mint w 5.15 kernel

Post by profquad »

This happens even when I just use my laptop speakers, so it's not the interface..
Been switching between kernels, somehow PulseAudio got brought back from the dead in the process..

What I've noticed is, the slight pause before playing happens moreso with straight ALSA than with JACK, but both are subject to random clicks.
I've also noticed this is just a problem in Reaper, so I've been looking at my settings there.
Sample rate and bit depth are the same across Device, Project Settings, and media items.
With JACK at 256 and 3 periods, there are sometime little clicks, and at 128, even with a single track no fx, it is complete jittery garbage.
I really don't know why it's this bad and only seems to be getting worse :(
This is with temps in the 40s and 50s.

Post Reply