I would highly recommend not installing a kernel from some unknown source, and building it yourself, if you want a realtime kernel.
The low latency kernel can be installed from the apt. Simply type apt-get install linux-lowlatency.
The building of a kernel is not difficult, unless you want to modify the kernel configuration options. This can be fun to experiment with, and in general doesn't risk any harm, the kernel will go into panic if there is some issue that means it is wrong for your machine. But in general you can copy over the configuration file from your installed o/s and, because it is generic - for all machines - it has the kernel config that will match your machine. Then it is only a matter of selecting the correct rt_preempt option to get the realtime kernel.
Because I'm lazy and forgetful, I tend to use the following set of instructions to build it.
https://askubuntu.com/questions/72964/h ... ime-kernel
Because you are using a generic kernel configuration, your build process will take a few hours, perhaps. What I do to speed things up, is to copy over the config file and then instead of running the command, 'make menuconfig' to edit the configuration by hand, I plugin the usb hardware, micro-sd cards etc, and anything else that loads a kernel module into the running kernel that I am currently using, and then run the command 'make localmodconfig'. This generates a kernel configuration file that contains all of the modules selected that exist in your running kernel. I then run 'make menuconfig' and select all the usb device drivers for sound cards and other hardware that I might use. I also, when I need to, check the net section to make sure that the firewall modules that I need are loaded. I copy these from a generic kernel configuration.
When editing the kernel config, search the different options online and inside the make menuconfig graphical editor be aware that you can press / to search and ? for help on some module or other. IF the help info for the particular module is not enough, then search online. If you are uncertain, then you can (and should in most cases) choose to compile some module as just that, a module, rather than compile it directly into the kernel image. Then, if it is incompatible it will not be loaded at boot time. If you are certain that some module works with your hardware, then you can choose to compile into the kernel which simply speeds up the boot time a little.
You will find that the position of some module within the tk menu editor is listed in the help info for that module. If you find yourself searching for a module that you cannot seem to find, then check in the help that its dependencies are selected, as otherwise it may not show up in the menu. The menu simply sets a text configuration file menu.config from memory, so you can always search and edit that if you really want to, but it is not sensible as you cannot see which dependencies might be missing.
The make localmodconfig technique saves a great deal of time when compiling the kernel. On an i7 2009 iMac it took well under an hour, perhaps even less than 30 minutes.
You can obtain processor information from the command 'cat /proc/cpuinfo' and adjust certain parameters or edit your CFLAGS for compilation, but I often don't bother. I used to examine an online database and check all the kernel config options manually, but it is a bit of a waste of time. Serious kernel compilation is for specialised situations like realtime critical apps such as the control of engineering lasers or other sensitively calibrated equipment or for onboard embedded systems etc.
The benefit of the instructions that I have linked to above are that the compilation process spits out deb files for the kernel and the headers. You can then keep them and install them for that machine if you reinstall.
Once ubuntu is installed though, and you have a kernel that you are happy with (and in most cases the linux low latency kernel is sufficiently good to work well), then you can install the kxstudio repositories to get a wealth of well maintained plugins and applications.
Follow the instructions, making certain that you install the gcc repos if necessary, and then tab complete the command 'sudo apt-get install kxstudio-meta-audio-' to see plugins and apps etc or just tab complete 'sudo apt-get install kxstudio' to see the other funky stuff available. Make certain to install cadence and Katia as a foundation, ardour as a daw and guitar if you like guitar fx and install kxstudio-meta-audio-plugins-all to obtain a huge amount of free lv2s and vsts etc. With ardour, make certain to read the manual - the availability of external sends and inserts makes it really powerful.
Any usb sound card, as long as it is cc mode compatible will work fine with ubuntu. Once plugged in, type 'ls /proc/asound/cards' to see that the card is listed and to obtain its name, but it should automatically be listed in cadence, though you might need its name if you use qjackctl.
I would recommend installing kxstudio-default-settings, as otherwise you will need to manually edit some files, such as /etc/security/limits.d/audio.conf and add yourself to the audio group.
- they use the 'realtime' group instead of audio group in this link.
The package kxstudio-menu is worth installing as well, if it works. It will add submenus and neatly organise installed packages. Alternatively, try installing ubuntustudio-menu for a similar configuration. If you are using gnome3 then perhaps don't worry, but I would recommend considering xfce or lxde as a desktop manager since these have lower memory requirements and often have less jitter (interference with the sound card).
Finally, having recently used avlinux for the first time, I notice that the maintainer is adding some kernel configuration commands to the boot line - you can try adding threadirqs and/or transparent_hugepage=never to increase efficacy. threadirqs will allow you to achieve realtime on a standard kernel, to some degree, and transparent_hugepages=never decreases jitter, I imagine. I currently don't use either, and get good results.
The only other thing that I do, is turn of unnecessary services that consume memory or increase jitter. Systemctl can be used to turn off things like avahi-daemon etc and cups, upowerd (if its not a laptop) and internet time daemon ntpd if it exists, and the settings app usually has a startup section in which you can disable things like unnecessary panel applications. You can even write a bash script to turn off all the guff before you start recording or doing anything else that is time critical.
At the minimum, install ubuntu, install the low latency kernel using apt, and then install the kxstudio repos, and you'll be fine.