AVL-MXE 5.11-rt kernel?

Help on all MX Re-spins
Post Reply
Message
Author
Zaphod118
Posts: 3
Joined: Sun Jun 06, 2021 4:47 pm

AVL-MXE 5.11-rt kernel?

#1 Post by Zaphod118 »

Hey there!

Big fan of AV Linux, it's really made getting my studio setup running on Linux WAY easier. Quick question on the AVL realtime kernel. Is there any estimate on when a 5.11-rt kernel might be available? Unfortunately my interface (MOTU m4) requires a 5.11 kernel to function. I have been using the Liquorix kernel, but it's not quite stable enough at the latency settings I would prefer to use. I've just started getting into playing MIDI drums, so I'm particulary sensitive to it. Latency is where I want it at a sample rate of 48K and a buffer size of 64, even 128 is acceptable. However with the Liquorix kernel, I get tons of overruns when I try and record anything. I can record with zero overruns at a buffer size of 512, which is perfect for everything except virtual instruments.

Not a big deal and I can totally wait, just curious if there was a time-line out there or if I should look into building my own kernel in the mean time.

Thanks!

User avatar
AVLinux
Posts: 2005
Joined: Wed Jul 15, 2020 1:15 am

Re: AVL-MXE 5.11-rt kernel?

#2 Post by AVLinux »

Zaphod118 wrote: Sun Jun 06, 2021 5:06 pm Hey there!

Big fan of AV Linux, it's really made getting my studio setup running on Linux WAY easier. Quick question on the AVL realtime kernel. Is there any estimate on when a 5.11-rt kernel might be available? Unfortunately my interface (MOTU m4) requires a 5.11 kernel to function. I have been using the Liquorix kernel, but it's not quite stable enough at the latency settings I would prefer to use. I've just started getting into playing MIDI drums, so I'm particulary sensitive to it. Latency is where I want it at a sample rate of 48K and a buffer size of 64, even 128 is acceptable. However with the Liquorix kernel, I get tons of overruns when I try and record anything. I can record with zero overruns at a buffer size of 512, which is perfect for everything except virtual instruments.

Not a big deal and I can totally wait, just curious if there was a time-line out there or if I should look into building my own kernel in the mean time.

Thanks!
Hi and thanks!

I don't really have a definitive answer at the moment: (a) the Kernels are usually compiled and uploaded by Trulan Martin as he is the only other person involved with AVL and he maintains the Kernel repo and we have not corresponded in a while or discussed an update.. (b) The next big fish for me to fry is getting ready for moving to Debian 11 bullseye, and (c) It seems other that in an increasingly number of cases the RT Kernel is becoming more of a PITA than its worth, it flat out doesn't work reliably at all with some newer hardware (including my own), the nVidia driver question is a constant issue and many (certainly not all) people seem to get the low latency performance they need from lowlatency and liquorix Kernels.

I guess in a nutshell if you are comfortable compiling your own 5.11 RT I would probably suggest doing that for now anyway. A very nice thing these days is that aufs is not needed for Snapshotting and Remastering any more so there is really not a lot of magical differences between the AV Linux kernel and one you roll yourself!

Zaphod118
Posts: 3
Joined: Sun Jun 06, 2021 4:47 pm

Re: AVL-MXE 5.11-rt kernel?

#3 Post by Zaphod118 »

AVLinux wrote: Mon Jun 07, 2021 3:03 pm
Hi and thanks!

I don't really have a definitive answer at the moment: (a) the Kernels are usually compiled and uploaded by Trulan Martin as he is the only other person involved with AVL and he maintains the Kernel repo and we have not corresponded in a while or discussed an update.. (b) The next big fish for me to fry is getting ready for moving to Debian 11 bullseye, and (c) It seems other that in an increasingly number of cases the RT Kernel is becoming more of a PITA than its worth, it flat out doesn't work reliably at all with some newer hardware (including my own), the nVidia driver question is a constant issue and many (certainly not all) people seem to get the low latency performance they need from lowlatency and liquorix Kernels.

I guess in a nutshell if you are comfortable compiling your own 5.11 RT I would probably suggest doing that for now anyway. A very nice thing these days is that aufs is not needed for Snapshotting and Remastering any more so there is really not a lot of magical differences between the AV Linux kernel and one you roll yourself!
Thanks for the reply! That’s totally fair, wasn’t sure if there was a set release cadence or not. Good to know there’s not a whole lot of secret sauce in the kernel. I’ve got some experience with Gentoo so I’m no stranger to compiling my own kernel. Seems like that’s the way to go then. Thanks for the heads up on potential issues. Luckily the 5.9-rt kernel seemed to work with everything in my system except my interface so hopefully 5.11-rt will be similar. Since I’ve got you here might as well ask :) - anything obvious I should be aware of in configuring the kernel that’s not covered in the various Linux real-time audio guides?

Thanks again!

User avatar
AVLinux
Posts: 2005
Joined: Wed Jul 15, 2020 1:15 am

Re: AVL-MXE 5.11-rt kernel?

#4 Post by AVLinux »

Zaphod118 wrote: Mon Jun 07, 2021 7:14 pm
AVLinux wrote: Mon Jun 07, 2021 3:03 pm
Hi and thanks!

I don't really have a definitive answer at the moment: (a) the Kernels are usually compiled and uploaded by Trulan Martin as he is the only other person involved with AVL and he maintains the Kernel repo and we have not corresponded in a while or discussed an update.. (b) The next big fish for me to fry is getting ready for moving to Debian 11 bullseye, and (c) It seems other that in an increasingly number of cases the RT Kernel is becoming more of a PITA than its worth, it flat out doesn't work reliably at all with some newer hardware (including my own), the nVidia driver question is a constant issue and many (certainly not all) people seem to get the low latency performance they need from lowlatency and liquorix Kernels.

I guess in a nutshell if you are comfortable compiling your own 5.11 RT I would probably suggest doing that for now anyway. A very nice thing these days is that aufs is not needed for Snapshotting and Remastering any more so there is really not a lot of magical differences between the AV Linux kernel and one you roll yourself!
Thanks for the reply! That’s totally fair, wasn’t sure if there was a set release cadence or not. Good to know there’s not a whole lot of secret sauce in the kernel. I’ve got some experience with Gentoo so I’m no stranger to compiling my own kernel. Seems like that’s the way to go then. Thanks for the heads up on potential issues. Luckily the 5.9-rt kernel seemed to work with everything in my system except my interface so hopefully 5.11-rt will be similar. Since I’ve got you here might as well ask :) - anything obvious I should be aware of in configuring the kernel that’s not covered in the various Linux real-time audio guides?

Thanks again!
No, not that I'm aware of... always have a look at the 'staging drivers' section often there is up and coming support for newer interfaces in there (or there used to be anyway). For years I had an April annual release but I am fairly new to MX which necessitated some interim releases and now we're seeing a new Debian Stable release soon which will probably require yet another interim release..

Here is a quick n' dirty Kernel guide for using GIT and building Debian Packages:
*SUGGESTED GUIDE TO BUILDING AN RT KERNEL WITH GIT

1. You should determine what the most recent RT Patch is and for which kernel version it applies.. Look at this web page:
https://mirrors.edge.kernel.org/pub/lin ... ojects/rt/

2. Let's use 5.9.1-rt19 as an example.. So first fetch the kernel source code with 'git clone':
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux

3. When the cloning of the Stable Kernel source has completed, change directory to the 'linux' directory:
cd linux

4. In order to build the kernel with RT Preemption we need to add a git remote for the RT Source code:
git remote add rt-stable https://git.kernel.org/pub/scm/linux/ke ... ble-rt.git
git remote add rt-devel https://git.kernel.org/pub/scm/linux/ke ... -devel.git

5. Now fetch the RT remote sources to your 'linux' directory:
git fetch --all

6. Then checkout the source code for the kernel which in our example is 5.9.1-rt19:
git checkout v5.9.1-rt19

7. When the checkout has completed successfully you will likely want to import the configuration of your current kernel:
cp /boot/config-`uname -r`* .config

8. If you want to browse or make changes to the current config then run the configuration utility 'xconfig'
make xconfig

9. Once configuration is complete you can build your kernel and create Debian packages:
make deb-pkg

cinclus
Posts: 104
Joined: Sun Mar 13, 2016 5:35 am

Re: AVL-MXE 5.11-rt kernel?

#5 Post by cinclus »

I tried a xanmod 5.12.9-xanmod1-cacule kernel
https://xanmod.org/
and did some latency tests
https://support.digium.com/s/article/Ho ... tency-test
on my system

Code: Select all

Snapshot created on: 20210610_0243
System:    Host: <filter> Kernel: 5.12.9-xanmod1-cacule x86_64 bits: 64 compiler: N/A 
           parameters: hwclock=local lang=de_DE tz=Europe/Berlin quiet nosplash splasht 
           Desktop: Openbox 3.6.1 info: xfce4-panel dm: SLiM 1.3.6 Distro: AVL-MXE 
           base: Debian GNU/Linux 10 (buster) 
Machine:   Type: Desktop System: ASUS product: All Series v: N/A serial: <filter> 
           Mobo: ASUSTeK model: H97M-PLUS v: Rev X.0x serial: <filter> 
           UEFI [Legacy]: American Megatrends v: 3602 date: 04/08/2018 
CPU:       Topology: Quad Core model: Intel Core i5-4590S bits: 64 type: MCP arch: Haswell 
           family: 6 model-id: 3C (60) stepping: 3 microcode: 7 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24001 
           Speed: 3001 MHz min/max: 800/3700 MHz Core speeds (MHz): 1: 3001 2: 3000 3: 3000 
           4: 3001 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, STIBP: disabled, RSB filling 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort 
           status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics 
           vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0412 
           Display: x11 server: X.Org 1.20.10 driver: modesetting unloaded: fbdev,vesa 
           compositor: compton v: 0.1~beta2+20150922 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.3.4 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: ASUSTeK 
           driver: snd_hda_intel v: kernel bus ID: 00:03.0 chip ID: 8086:0c0c 
           Device-2: Intel 9 Series Family HD Audio vendor: ASUSTeK driver: snd_hda_intel 
           v: kernel bus ID: 00:1b.0 chip ID: 8086:8ca0 
           Sound Server: ALSA v: k5.12.9-xanmod1-cacule 
Network:   Device-1: Intel Ethernet I218-V vendor: ASUSTeK driver: e1000e v: kernel port: f080 
           bus ID: 00:19.0 chip ID: 8086:15a1 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 14.62 GiB used: 3.94 GiB (27.0%) 
           ID-1: /dev/sdd type: USB vendor: SanDisk model: Extreme size: 14.62 GiB block size: 
           physical: 512 B logical: 512 B serial: <filter> rev: 0001 scheme: MBR 
Partition: ID-1: / raw size: N/A size: 12.21 GiB used: 64.3 MiB (0.5%) fs: overlay 
           source: ERR-102 
           ID-2: swap-1 size: 20.00 GiB used: 0 KiB (0.0%) fs: swap swappiness: 10 (default 60) 
           cache pressure: 50 (default 100) dev: /dev/sda6\040(deleted) 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C 
           Fan Speeds (RPM): N/A 
Repos:     Active apt repos in: /etc/apt/sources.list 
           1: deb http://liquorix.net/debian/ buster main
           2: deb http://www.bandshed.net/kernels/apt/ buster main
           3: deb [trusted=yes] https://cinelerra-gg.org/download/pkgs/debian10/ buster main
           4: deb https://dl.winehq.org/wine-builds/debian/ buster main
           No active apt repos in: /etc/apt/sources.list.d/connectify.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian/ buster-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian/ buster main contrib non-free
           2: deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
           3: deb-src http://deb.debian.org/debian/ buster main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/kxstudio-debian-ppas.list 
           1: deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu/ bionic main
           2: deb http://ppa.launchpad.net/kxstudio-debian/music/ubuntu/ bionic main
           3: deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu/ bionic main
           4: deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu/ bionic main
           5: deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu/ bionic main
           Active apt repos in: /etc/apt/sources.list.d/kxstudio-external.list 
           1: deb [arch=amd64,i386] https://kx.studio/repo/ stable free
           2: deb [arch=amd64,i386] https://kx.studio/repo/ gcc5 free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ buster main non-free
           2: deb http://ftp.halifax.rwth-aachen.de/mxlinux/packages/mx/repo/ buster ahs
           Active apt repos in: /etc/apt/sources.list.d/spotify.list 
           1: deb http://repository.spotify.com/ stable non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list 
           Active apt repos in: /etc/apt/sources.list.d/xanmod-kernel.list 
           1: deb http://deb.xanmod.org releases main
Info:      Processes: 215 Uptime: 20m Memory: 15.33 GiB used: 497.9 MiB (3.2%) Init: SysVinit 
           v: 2.96 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: quick-system-in 
           running in: quick-system-in inxi: 3.0.36 

Code: Select all

demo@mx1:~/rt-tests
$ sudo chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.08 0.14 0.17 1/499 13686           

T: 0 (10817) P:80 I:10000 C:  46764 Min:      1 Act:    2 Avg:    1 Max:      41

Code: Select all

demo@mx1:~/rt-tests
$ sudo hdparm -t /dev/sdc1
/dev/sdc1:
 Timing buffered disk reads: 704 MB in  3.00 seconds = 234.39 MB/sec
These are good figures. But how do they relate to Qjackctl settings of say Frames/Period - 128 , Sample Rate 44100? Periods/Buffer 2 in

cinclus
Posts: 104
Joined: Sun Mar 13, 2016 5:35 am

Re: AVL-MXE 5.11-rt kernel?

#6 Post by cinclus »

Same test with the AVL-rt-kernel 5.9.1-rt20avl1:

Code: Select all

alt_user@avlmx:/usr/src/rt-tests
$ sudo chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 2.85 1.40 0.81 1/498 7290          

T: 0 ( 6973) P:80 I:10000 C:  11880 Min:      1 Act:    2 Avg:    1 Max:       6

cinclus
Posts: 104
Joined: Sun Mar 13, 2016 5:35 am

Re: AVL-MXE 5.11-rt kernel?

#7 Post by cinclus »

N.B.: There is a XANMOD-RT-kernel which I did not test.

cinclus
Posts: 104
Joined: Sun Mar 13, 2016 5:35 am

Re: AVL-MXE 5.11-rt kernel?

#8 Post by cinclus »

Here the results for the XANMOD real-time Linux kernel (PREEMPT_RT)

Code: Select all

$ uname -r
5.10.41-rt42-xanmod1

Code: Select all

$ sudo chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 3.20 1.62 0.72 1/334 5082          

T: 0 ( 4748) P:80 I:10000 C:  12583 Min:      1 Act:    1 Avg:    1 Max:      10

Zaphod118
Posts: 3
Joined: Sun Jun 06, 2021 4:47 pm

Re: AVL-MXE 5.11-rt kernel?

#9 Post by Zaphod118 »

AVLinux wrote: Mon Jun 07, 2021 3:03 pm
… It seems other that in an increasingly number of cases the RT Kernel is becoming more of a PITA than its worth, it flat out doesn't work reliably at all with some newer hardware (including my own)…
I think I am finding out firsthand exactly what you mean here :) I successfully compiled the 5.11-rt kernel (thanks to your helpful quick guide!) by just copying the 5.9-rt-avl config. Compiled fine and installed everything, but rebooting with the new kernel turned my machine into a stuttering mess. Like several seconds of lag between pressing a key and seeing the letters appear on screen. I don’t have anything crazy either, I’m using a 10th gen i7 with integrated graphics. Is this the kind of thing you have seen? It’s odd because the 5.9-rt kernel worked fine except for my interface.

I’m thinking this might all be moot as in the meantime I have discovered that Reaper is much more stable at smaller buffer sizes than ardour.

Thanks again for your time and help!

User avatar
pianokeyjoe
Posts: 403
Joined: Thu Jan 31, 2019 12:08 pm

Re: AVL-MXE 5.11-rt kernel?

#10 Post by pianokeyjoe »

I am reading this along to see what if any updates there were to this question. Sigh.. So basically any newer MIDI/AUDIO interfaces are going to need the latest kernel? If so, why? I am also mostly recording MIDI and midi synth virtual instruments so this does apply to me too. I will keep an eye on this thread.. I am sticking with my old stuff and AVL-MXE 19.3(the second update released in 2020)until things are sorted..
Pianokeyjoe
Intel i5 3.10ghz ,8GB ram, Intel onboard everything, 500GB HDD, MX-LINUX 19.3 :penguin:

Post Reply

Return to “MX Respins”