4

OS, apps and hardware info

Linux local 5.0.0-23-lowlatency #24-Ubuntu SMP PREEMPT Mon Jul 29 16:17:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
jackdmp version 1.9.12 tmpdir /dev/shm protocol 8
Bitwig-studio version 3.0.1
USB2 Audio interface Tascam US16x02

Question

Is possible run audio application with max priority for this application? For best performance and lowest latency without cruckling/buffer problem for audio application.

Situation

I reinstalled Ubuntu studio 19.04, update, upgrade, install DAW Bitwig studio 3.0.1, then install indicator-cpufreq (for changing my cpu to best performance).

Then I ran jackd in this configuration.

/usr/bin/jackd -dalsa -dhw:US16x08 -r44000 -p128 -n2

I select in indicator-cpufreq applet Performance (for best performance), then checked via lscpu it is working.

Model name:          Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
CPU MHz:             3455.159
CPU max MHz:         3500,0000
CPU min MHz:         400,0000
NUMA node0 CPU(s):   0-3

Then I ran Bitwig studio. I tried do load some my older project.

Issue

When play the music in DAW, there are some crackling during the playing, and when I do something in DAW during playing (for example zooming or moving only), crackling is even worst.

Jackd log shows me many xruns.

I swear I had same configuration before reinstall OS and it was OK for this configuration, no crackling at all during playing even when working in DAW during playing or recording.

I tried install older versions of Ubuntu studio, no effect, crackling still present, same.

Why is now crackling due playing in DAW? Applet indicator-cpufreq changed to best performance, but seems not for DAW, no effect for CPU load in DAW when I selecting between Performance and Powersave in indicator-cpufreq, but lscpu shows me different CPU MHz.

What is the magic? Before I reinstalled OS, everything works fine. I found something about nice utility. Is it what I need to setup?

Thank you very much for any informations.

  • 2
    You don't need lowest latency for mixing, only for recording. I have no clue how to adjust that in nix, but the higher your audio buffer, the higher the latency, the more room the thing has to breathe = less break-up. – Tetsujin Aug 13 '19 at 8:40
  • @PiedPiper Yes, I asked there already. :) But no anwer. I study nice about linux, maybe this is the way. I will write here if I found something important. Thanks. – genderbee Aug 14 '19 at 10:32
  • @PiedPiper Thanks, updated. – genderbee Aug 19 '19 at 7:53
4

Solved

Solved, this is what I did to get best performance after fresh ubuntu install. Priority set is important.

Install low latency kernel.

sudo apt install linux-lowlatency

Add new lines to /etc/security/limits.conf.

sudo nano /etc/security/limits.conf

* - rtprio 70
* - memlock unlimited
* hard memlock unlimited
* soft memlock unlimited

Install some service to set cpu for best performance.

sudo apt install cpufrequtils
sudo cpufreq-set -r -g performance

or

sudo apt install indicator-cpufreq
(after reboot you will see applet in notification area for changing performance of cpu)

Reboot.

Install jackd2 if you don't have installed already.

sudo apt install jackd2

Get name of your hardware. For example, my hw: is PCH. Name of hw is in [].

cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xa1228000 irq 130

Run jackd2 with parameters you need.

/usr/bin/jackd -d alsa -d hw:PCH -r 48000 -p 192 -n 3

You can change periods -p, frames -n and sample rate -r parameter for lowest latency. If crackling is present, this is your limit. (Frames / Sample Rate ) * Periods = Latency in ms.

Run DAW.

That's all. I hope this info could be helpful.

Bye.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.