Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wiki:system_configuration [2020/03/17 20:47] – [The kernel] autostatic | wiki:system_configuration [2021/01/16 22:10] – autostatic | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== How do I build a real-time audio workstation on Linux? ===== | ===== How do I build a real-time audio workstation on Linux? ===== | ||
+ | |||
+ | The [[https:// | ||
+ | |||
+ | A good starting point for optimizing your system for real-time audio on GNU/Linux, is the QuickScan script below (as a newbie you might want to ignore the hardware timers settings first). | ||
+ | |||
+ | After adjusting your system using the recommendations of the QuickScan and with JACK (QjackCtl) and a2jmidid installed, the basics should be there for a well performing real-time audio system (depending on your hardware too of course). | ||
==== Preliminary ==== | ==== Preliminary ==== | ||
Line 62: | Line 68: | ||
This is only needed for so-called generic kernels, ie. standard kernels that are not tweaked for lowlatency performance. You can check if your kernel already includes this option with the following command: | This is only needed for so-called generic kernels, ie. standard kernels that are not tweaked for lowlatency performance. You can check if your kernel already includes this option with the following command: | ||
- | $ grep -e " | + | $ grep -e " |
- | If it returns '' | + | If it returns '' |
Open ''/ | Open ''/ | ||
Line 74: | Line 80: | ||
Now reboot and you should have threaded IRQs. | Now reboot and you should have threaded IRQs. | ||
+ | |||
+ | === Disabling Spectre and Meltdown mitigations === | ||
+ | :!: Warning: disabling these mitigations will make your machine less secure! Use with caution! | ||
+ | |||
+ | To work around the Spectre and Meltdown vulnerabilities several mitigations were built into the kernel. These mitigations can have a negative impact on the performance of your machine. To disable those mitigations and get the most out of your CPU's again you can add the following kernel parameter to your Grub configuration: | ||
+ | |||
+ | mitigations=off | ||
=== Installing a real-time kernel === | === Installing a real-time kernel === | ||
Line 85: | Line 98: | ||
== Debian == | == Debian == | ||
- | Since Debian Wheezy an RT variant is also available in the [[https:// | + | Since Debian Wheezy an RT variant is also available in the [[https:// |
- | + | ||
- | deb http:// | + | |
== Arch == | == Arch == | ||
Line 95: | Line 106: | ||
== Gentoo == | == Gentoo == | ||
- | RT kernels are vailable in the pro-audio overlay | + | An audio overlay |
=== Build your own real-time kernel === | === Build your own real-time kernel === | ||
- | If your distribution isn't any help, you can compile and install a real-time kernel manually. The examples assume building a RT kernel based on the 3.2 kernel version but they should generally apply fo other kernel versions too provided that there is a RT patchset available for the used kernel. | + | If your distribution isn't any help, you can compile and install a real-time kernel manually. The examples assume building a RT kernel based on the 4.8 kernel version but they should generally apply for other kernel versions too provided that there is a RT patchset available for the used kernel. |
Install the necessary packages, on Debian and Ubuntu this is: | Install the necessary packages, on Debian and Ubuntu this is: | ||
- | sudo apt-get install kernel-package fakeroot build-essential | + | sudo apt-get install kernel-package fakeroot build-essential |
- | Download the kernel sources and the RT patchset (this example uses the 3.18 branch, you're free to use another kernel branch for which there is a RT patch set available): | + | Download the kernel sources and the RT patchset (this example uses the 4.8 branch, you're free to use another kernel branch for which there is a RT patch set available): |
mkdir -p ~/ | mkdir -p ~/ | ||
cd ~/ | cd ~/ | ||
Line 200: | Line 211: | ||
- | Then you can compile... | + | Then you can compile. |
make clean | make clean | ||
make deb-pkg | make deb-pkg | ||
Line 476: | Line 487: | ||
=== Hardware timers === | === Hardware timers === | ||
- | :!: //Using hardware timers to achieve more accurate MIDI timing is questionable. Applications that use ALSA MIDI (via either the Sequencer or the Raw MIDI Interface) may be affected by using hardware timers but it might be better to rely on a high resolution software-based timer like the '' | + | :!: //Using hardware timers to achieve more accurate MIDI timing is questionable. Applications that use ALSA MIDI (via either the Sequencer or the Raw MIDI Interface) may be affected by using hardware timers but it might be better to rely on a high resolution software-based timer like the '' |
Some MIDI sequencers or DAWs that rely on ALSA MIDI might benefit from being able to use hardware timers like the [[http:// | Some MIDI sequencers or DAWs that rely on ALSA MIDI might benefit from being able to use hardware timers like the [[http:// |