HOWTO: jackd on Pine64 - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6) +--- Thread: HOWTO: jackd on Pine64 (/showthread.php?tid=4591) |
HOWTO: jackd on Pine64 - mauritslamers - 06-15-2017 As many people have found, the default jackd version that comes with the Pine64 Ubuntu image (which is version 1.9.10) will crash as soon as you start it with a bus error and a message in the kernel log about an aligment problem. (Edit: strangely enough this error still occurs even if you are using a more recent image with jackd2 v1.9.11.) In later versions of jackd this has been solved, but as there is no package, you're currently required to compile it by hand. This is not as difficult as it might sound, but it requires some tinkering in the terminal. Also: make sure that your pine64 board has enough power. If you use a 2.0A rated power supply, the board might crash in the middle of the process (as has happened to me). This tutorial assumes you are working with either the Ubuntu Basic Image, or the Ubuntu Mate image. If you are running a different image, the same process will apply, but you might need to adjust some actions. The first thing we need to do is to install the old version of jack, because we need to make the system think that jackd is installed. Code: sudo apt install jackd2 During the installation it will ask whether jackd should be run with real time priority. Answer yes on this question. Then install all the audio applications you're going to use, such as for example Ardour. Then we are going to clone the latest version of jackd from github. Open a terminal by selecting Applications > System Tools > Mate Terminal or something equivalent: Code: git clone git://github.com/jackaudio/jack2 If you get a message about unknown command, install git first by running Code: sudo apt install git . Then go into the jack2 directory as created by the git command: Code: cd jack2 . The compilation of jackd2 requires a few dependencies which we need to install: Code: sudo apt install libasound2-dev libexpat1-dev Now we can start the compilation preparation by giving the following command: Code: ./waf configure --alsa=yes --classic --prefix=/usr Depending on what kind of hardware you are going to use, you might need to add additional parameters to this line. Check for more info by adding Code: --help to the end of the line above. (In case I missed some dependency here, the process will warn you about it). We start the compilation by running Code: ./waf You will see now a lot of text scrolling over your screen. If everything went fine, you will get a Code: 'build' finished successfully message. We are now going to install this version of jackd by running: Code: sudo ./waf install Sadly we are not entirely there yet. The source install puts certain files in a different spot compared to the standard packages, so in order to make jack not use the original files, we delete the files from the original package: Code: sudo rm /usr/lib/aarch64-linux-gnu/libjack* Now test jackd by running Code: jackd -d alsa Jack should now output something similar to Code: pine64@pine64:~/jack2$ jackd -d alsa If it replies with a message about permissions, it is possible that your user is not part of the audio group. Add yourself by doing Code: sudo usermod -a -G audio [username] where you change Code: [username] for your user. If you do see the bit of text above, you now successfully installed jackd2 and it is running. You can now stop this process by pressing Ctrl-C. From here you can use qjackctl or any other tool to start jackd. A few considerations When using jack on the Pine64, be aware that how smaller the buffer size is the more work it has to do. The latency will go down, but keep in mind that as soon as the CPU-temperature goes over 80 degrees Celsius, the CPU will be throttled. The performance of the board is pretty good. I had 32 mono tracks smoothly playing in Ardour with a few plugins on the side and the temperature didn't rise above 57 degrees C. I managed to get jackd running in realtime with buffer sizes from 128 frames at a sample rate of 44100hz. Don't go lower as it will keep jackdbus hanging rather badly. I didn't test the upper limit well, but 192000Hz samplerate at 4096 frames buffer also seems to run fine. I also tried LMMS and found that a sample rate of 192k didn't work very nicely with synthesis, as that is rather heavy on the CPU. You will notice quickly enough if you hear too many sample drops. Troubleshooting I had a very weird problem where only one channel was playing of the two I saw playing in Ardour. I then used the builtin audio test of Mate and had the same problem there. It turns out that in my case the left channel was muted. I was able to solve this by using Code: alsamixer It turned out that the DACL Mixer AIF1DAOL port (which was the left stereo channel) was muted. It is a bit unclear why this happened, but if you happen to run into the same kind of problem, this is where you should be able to solve it. Credits Many thanks to Xalius for his help in getting to the bottom of this. This guide is also posted (and updated) on github: https://gist.github.com/mauritslamers/327dcd01a5110d340b9519bc19cb5e75 RE: HOWTO: jackd on Pine64 - xalius - 06-15-2017 Thanks for writing this up and posting to the forum! |