It's nice to know they fixed the problem. At the same time it's a bit distressing that such a problem found its way in the release of a major Open Source project. As if they did not checked it out before releasing, such a basic thing as to choose another kernel provided by them. I did a 18.3 update using the 18.3 Update Manager, update that
did not include the kernel, and it messed up the grub configuration regarding something I did that had to do with moving LM17 away from a failing drive. Anyway I'm back at making my own Linux system like I use to do years ago, just to get back into that groove. Those systems where on the minimal side although hopefully I'll be able to build a system up to a major desktop environment and have a 'modern' audio production system running on it.
Haven't customized yet 18.3 to run all audio apps. I do not have xruns on LM 18. Or perhaps one in a while. I started to run LM for audio years ago and at that time I went through optimization with one goal being able to use headphones while recording acoustic guitar w/o any latency problems. So I checked it out by running an audio cable from one output of the soundcard to one of it's input and by running jack_iodelay to measure the latency. That was the first step, to see what's going on. After that there were a series of 'optimizations' and I can't tell presently which one would be more important than the other and how much of an interaction all of these produce to optimize the system. OTOH, I wrote notes at that time.
I'll take this opportunity to quickly go over these notes as I will be doing the same soon for the new LM 18.3. These are provided 'as is'.
The computer is i5-3570 CPU @ 3.40GHz, 16GB RAM, M-Audio 1010LT interface.
For jack_iodelay, if you want to test, some test examples:
Code: Select all
apt-get install jdelay
jack_iodelay
use qjackctl to connect jack_iodelay input and output
Use a RCA cable, only one, mono. Connect one end to a playback port
and the other end to a capture port. Launch jack_iodelay. Connect
using qjackctl. In this case, the RCA connection is from the
headphone white output jack to the # 6 red input jack of the 1010LT card.
Measurements for kernel 3.13.0-24-generic
stop qjackctl
/usr/bin/jackd -T -ndefault -dalsa -dhw:M1010LT -r44100 -p1024 -n2
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
start qjackctl
make connections
jack_iodelay
3133.532 frames 71.055 ms total roundtrip latency
stop qjackctl
/usr/bin/jackd -T -ndefault -dalsa -dhw:M1010LT -r44100 -p512 -n2
configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 2 periods
start qjackctl
make connections
jack_iodelay
1597.528 frames 36.225 ms total roundtrip latency
stop qjackctl
/usr/bin/jackd -T -ndefault -dalsa -dhw:M1010LT -r44100 -p256 -n2
configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 2 periods
start qjackctl
make connections
jack_iodelay
829.529 frames 18.810 ms total roundtrip latency
And then a series of customizations.
This one is outdated but the principle might still remain today.
Code: Select all
% apt install linux-tools-common
% apt install linux-tools-4.4.0-72-lowlatency
% cpupower frequency-set -g performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
And other customizations:
Code: Select all
3a) Adjustements scaling governor
echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
Code: Select all
4) Add real time IRQ prcoessing for the sound card 1010LT
4a) install rtirq-init
4b) In /etc/default/rtirq, put the name of the sound card
#RTIRQ_NAME_LIST="rtc snd usb i8042"
#modification, commented above, added below
RTIRQ_NAME_LIST="snd_ice1712"
4c) check priority (this will be executed automatically at each boot)
% /etc/init.d/rtirq start
Setting IRQ priorities: start [snd_ice1712] irq=18 pid=547 prio=90: OK.
This is for using pulse audio along with jackd. I guess it could be optional.
Code: Select all
6a) Install Pulseaudio-module-jack, pavucontrol
Add to /etc/pulse/default.pa :
### Load audio drivers statically
load-module module-jack-sink
load-module module-jack-source
6b) Create a ~/.jackdrc file that contains the command line to execute jackd:
/usr/bin/jackd --sync -T -P95 -ndefault -dalsa -dhw:M1010LT -r44100 -p64 -n4
It is the loading of these modules by pulseaudio that will result
in launching jackd automatically at startup
Code: Select all
- In /etc/security/limits.d/audio.conf :
@audio - rtprio 95
@audio - memlock unlimited
- dpkg-reconfigure -p high jackd
- User is part of the audio group:
% cat /etc/group | grep audio
audio:x:29:pulse,mevla
Test example, for priority settings using 'top -H' :
Code: Select all
PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
-6 0 5782316 2,825g 133576 S 18,9 18,4 41:52.87 mixbus-3.1.66
-6 0 5782316 2,825g 133576 S 18,6 18,4 41:49.34 mixbus-3.1.66
-6 0 5782316 2,825g 133576 S 18,6 18,4 41:54.50 mixbus-3.1.66
20 0 1223108 339364 103676 S 5,6 2,1 9:29.98 renoise
20 0 5782316 2,825g 133576 S 4,0 18,4 11:51.23 mixbus-3.1.66
9 -11 219472 90804 83556 S 2,7 0,6 5:31.81 jackd
-6 0 5782316 2,825g 133576 S 2,0 18,4 3:50.16 mixbus-3.1.66
Code: Select all
Installation of rtirq-init
Change the following in /etc/default/rtirq:
#RTIRQ_NAME_LIST="rtc snd usb i8042"
#RTIRQ_NAME_LIST="rtc snd_ice1712"
RTIRQ_NAME_LIST="snd_ice1712"
Then run:
% cd /etc/init.d/
% ./rtirq start
Setting IRQ priorities: start [snd_ice1712] irq=18 pid=547 prio=90: OK.
% chrt -f -p 85 547
Code: Select all
Current:
% cat /proc/irq/18/smp_affinity
f
Modified:
% echo 2 > /proc/irq/18/smp_affinity
% cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 28 0 0 0 edge timer
1: 3 0 0 0 edge i8042
4: 0 0 0 2 edge
8: 0 1 0 0 edge rtc0
9: 0 3 0 0 fasteoi acpi
12: 3 1 0 0 edge i8042
18: 476281 151882 127790 60568 fasteoi snd_ice1712
23: 117 12720 2133 42 fasteoi ehci_hcd:usb1, ehci_hcd:usb2
% ./rtirq status
PID CLS RTPRIO NI PRI %CPU STAT COMMAND
87 FF 90 - 130 0.0 S irq/8-rtc0
547 FF 90 - 130 1.2 S irq/18-snd_ice1
Misc.
Code: Select all
Identifications
Sound card
% lspci
05:01.0 Multimedia audio controller: VIA Technologies Inc. ICE1712
[Envy24] PCI Multi-Channel I/O Controller (rev 02)
Driver
% lsmod | grep -i ICE1712
snd_ice1712 77824 2
snd_ice1712 is used in configuring rtirq