• OpenSuSE as a Digital Audio Workstation

    Basicconfiguration and tips to set-up
    OpenSuSEas a Digital Audio Workstation
    Written by: https://forums.opensuse.org/members/f_sauce.html


    Audiousers group
    CPU frequencyscaling
    Analysisand visualising tools
    Effect-boxesand amplifiers
    Harddrive recorders, HDR, and MIDI-sequencers
    Mixingand mastering tools
    Notationand tablature writers/editors
    Utilitiesand libraries
    Variousfree and commercial software
    Start-upselection suggestion
    Testof a synthesiser
    Advancedconfiguration and testing
    Hardware,kernel and IRQ.
    Monitoringtools and commands
    Somefinal tips


    Thisdocument will explain how to set-up a basic digital audio workstation, DAW, using OpenSuSE. There will be manyadjustments and improvements one further may do to optimise thesystem in regards real-time audio which this guide not will cover,however, links will be provided in-text when relevant and at the endfor more in-depth reading, if one wish to enter deeper into thematerial.

    Thatsaid, the settings and configuration explained here should be sufficient to get a decent foundation and starting point to buildupon, both concerning system set-up and knowledge. Note also thatthis guide will not make use of PulseAudio; if one wish touse PulseAudio most of the configuration explained in thisdocument will still be relevant, and there will be references onemay consult on how to proceed further to tune the system when usingPulseAudio alongside JACK.

    Thisdocument will mainly use OpenSuSE 12.2 as reference, but in regard configuration and system settings it should be quite version independent.


    Thisdocument will assume that the reader is familiar with the basics of GNU-Linux and in particular OpenSuSE, i.e.directory structure, how to operate as super-user/root,using YaST, installing packages, creating and editingconfiguration files etc.

    Thedocument will also assume that one has an up and running OpenSuSEsystem with one or several audio-devices functioning.

    Otherwise,open a terminal and type in this command to find out which sound-devices which are installed on the computer:

    • #cat /proc/asound/cards

    andconsult this link to see if the sound-device is supported:

    andthese links for setting up the SuSEbox for multimedia usage:

    (notethat this link points to the present [as of 08.03.2013] OpenSuSEversion, 12.2)


    Oneshould have enabled these repositories:

    Standardofficial repositories:

    • OSS,
    • Non-OSS
    • Update,
    • Update-Non-OSS

    (Theseshould have already been added to YaST as software repository sources)


    Addthe link which correspond to ones version of OpenSuSE;
    copythe URL and add it as a YaST source, read the link below if you don't know how to proceed.

    Itis advised to disable both multimedia repositories after one hasfinished installing from this repository, and it would also be good practise to look through the dependency added software; check Installation Summary in YaST Software Management and see which repository they inherit from; a basic rule should be to only useapps and libs from these two repoes when they are not suppliedfrom the official ones, or from Packman. Use these precautions toavoid package version mix-up and possible system inconsistency.

    Lookhere for more about repositories:

    Makesure the following packages are installed:

    • pam (installed by default in most cases)
    • jack (use the -oss version, not Packman, this applies to all jack related apps when available)
    • qjackctl
    • yast2-power-management
    • perl
    • kernel-desktop, or kernel-rt if available.

    (kernel-defaultis not a low-latency kernel, thus not suited for our purpose)

    Makesure that PulseAudio is disabled:

    • go to: YaST Control Centre > Hardware > Sound
      click on Other > PulseAudio Configuration
      PulseAudio is installed by default, however, it is not a necessity to use this framework, whether or not one wish to set up the system as a DAW or not;
      deinstall it if one wish.


    Audiousers group:

    • go to: YaST Control Centre > Security and Users > User and Group Management, click on Edit on the Users tab, change tab to Details and tick the audio box under Additional Groups.


    • open the file-manager in root mode, navigate to /etc/security and open the file limits.confwith a text editor; add the following two lines:

    @audio - rtprio 90
    @audio - memlock unlimited

    Thiswill give the audio users group, in which one now belong, importantreal- time priority that will prevent the real-time processes frombeing interrupted, and give those processes priority on RAM. Onemight experiment with these values; maximum recommended value forrtprio is 99; the memlock value could be adjusted by setting anumber which correspond to amount of memory one wish to dedicatefor this purpose in KB, (8GB RAM approximately correspond to 8000000KB).

    CPUfrequency scaling:

    Checkwhat frequency governor which is currently active on the system,type in a terminal the following:

    Thedefault governor is ondemand,thismodus will cause trouble. Change the governor here:YaST Control Centre > System > Power Management, select LowLatency Computing

    Thefrequency scaling daemon may cause interrupts on the real-timeprocess by failing to increase the CPU frequency in accordance towhat is demanded by the load of DSP quick enough. There is also aproblem with synch between JACK and a dynamic CPU frequency settingwhen using a CPU with several cores, so one has to set a staticfrequency. Note also that one may switch between default andperformance (Low Latency Computing) as one likes, if one wish to save power when doing other tasks than audio work.


    Itis recommended to use either ext3 or ext4; ReiserFSis said to be a poor choice, however, this seems to be debatable.And at this point the file-system has already been selsected, sojust proceed and see how it works with whatever file-system beingused.

    Theimportant thing now is that one mounts the partitions with thenoatime parameter (No Access Time):

    • Go to: YaST Control Centre > System > Partitioner, right click on each of the partitions belonging to the system in turn (apart from SWAP) and select Edit, then click on FstabOptions and tick the No Access Time box.


    By default the swappiness valueis set to 60, this is considered too high; set the swappiness to10:

    • test the current swappiness value on your system, in terminal type:
      • # cat /proc/sys/vm/swappiness

    • open a file-manager session in root mode, navigate to the /etc directory and open the file sysctl.confwith a text editor and add the following line at the bottom:
      • vm.swappiness = 10

    Swappinessis a feature, controlled by the kernel, which controls when ones system should start writing to SWAP. This feature has aconfigurable value: 0-100. A low value which means that the SWAPis not used until memory is inversely proportionally full is whatone wants, as frequent SWAP writing decreases system performance.

    Hardware timers:

    Make sure the audio user haspermission to use the real-time clock and HPET:

    • open a file-manager session in root mode, navigate to /etc/udev/rules.d, create a new text file and call it 40-timer-permissions.rules, open it with a text editor and add the following two lines:
      • KERNEL=="rtc0", GROUP="audio"
        KERNEL=="hpet", GROUP="audio"

    Havethe above timers used with a higher frequency than the default 64:

    • see which frequency is set; in a terminal type in these two commands (one at a time):
      • # cat /proc/sys/dev/hpet/max-user-freq
        # cat /sys/class/rtc/rtc0/max_user_freq

    • open a file-manager session in root mode, navigate to /etc/rc.d/, open the file boot.localwith a text editor and add the following two lines:
      • echo 2048 > /sys/class/rtc/rtc0/max_user_freq
        echo 2048 > /proc/sys/dev/hpet/max-user-freq

    To activate the changes done tothe system a re-boot is required


    OpenQjackCtl,click on Setupand on the tab Settings;here there are a lot of options to adjust, and one may experienceas one like at a later stage, but first concentrate on thefollowing:

    • tick the box labelled Realtime(this is usually set already)
    • set the Priority of jackd to 70
    • adjust Frames/Period, Periods/Buffer and Sample Rate:
      • Sample Rate: this should be adjusted according to the capabilities of the sound-device and the user's preferences, and, preferably, also be uniform among the various audio apps used with JACK. Default frequency is 48000.
      • Periods/Buffer: set this to 2 which is also the default value; some suggest the value 3if using external USB based sound-devices and if using certain on-board chip types.
      • Frames/Period: adjust this setting so that you get a Latency between 5and10 msec,128or256 should be close to it.

        Latency is displayed at the bottom right and is a value composed from the three variables above.

    Thevarious variables settings and parameters which one may start theJACK server with are dependent on many factors to be working ornot; this includes the sound-device, CPU, RAM, software, systemconfiguration and so on, so it is not possible to suggest somesetting that will work on every system.


    A software recommendation forreal-time audio use. Some packages are not provided in the setrepositories but may be found in OpenSuSEBuildService:OBSsearch;some software are not pre-built for OpenSuSE and requires amanual installation.
    Much of the categorisation thatfollows is a bit by random, as many of these application would fitin to more than one of the categories created. At the end of thisparagraph there is a suggestion for a basic start set-up softwareselection.

    Analysisand visualising tools:


    Effect-boxesand amplifiers:

    Hard drive recorders, HDR, andaudio/MIDI-sequencers:

    Mixing and mastering tools:



    Notationand tablature writers/editors:


    Utilitiesand libraries:

    Sound-fonts (.sf2, .gig, .gus,.h2drumkit, .sfz etc), and
    audio-samples (.wav, .aif, .flacm.m.):

    Various free and commercialsoftware:

    Start-up selection suggestion:

    If new to Linux andunfamiliar with the software assortment available, reading throughthe package list above and then deciding which packages to startwith, might be a bit exhausting; the package collection proposalbelow might constitute a decent foundation; take it for what it is,just a suggestion made by the author:

    • ardour, a professional hard-drive recorder; Ardour v3 also comes with a sequencer.
    • audacity, an audio editor and recorder.
    • ladspa or lv2 (LADSPA v2), various plug-ins collection packages.
    • lmms or rosegarden or qtractor, sequencers and notation editors may be the main tool if one wish to compose and/or programme music with the computer.
    • qsynth, a front-end to Fluidsynt which is a sample based synthesiser; you need a sound-font, download it here:
      Fluid GM r3.sf2, or install it system wide fluid-soundfont (multimedia:apps).
    • synthv1, a synthesiser.
    • yoshimi, a synthesiser.
    • xsynth-dssi, a synthesiser which uses the DSSI API
    • dssi: 'DSSI (pronounced "dizzy") is an API for audio processing plugins, particularly useful for software synthesis plugins with user interfaces.', http://dssi.sourceforge.net/.
    • hydrogen, a drum machine.
    • sooperlooper, a live sampler.
    • vkeybd, a virtual MIDI keyboard.

    Test of a synthesiser:

    Openup QjackCtland click on Start,this starts JACK (jackd);start the synthesisersynthv1andthen start the virtual keyboard Vkeybd;look at QjackCtlagain and click on Connect,one now views the Audioconnection table, here one needs to connect the OutputPortsof synthv1totheInputPortsonthesystem; thereafter, click on the tab ALSAto go to the ALSA(midi)connectiontable and connect vkeybd(output)tosynthv1(input), the virtual MIDIkeyboard is now connected to synthesiser and should be able tohave the synthesiser produce sound.

    (I chose to use synthv1 in thistest as it neither auto-connect to the system or has its ownkeyboard, thus, including several steps to exemplify a possible virtual cabling procedure; use this test with Qsynth instead ifyou like.)

    Advanced configuration andtesting:

    This paragraph will mainly be arelevant place to consult if you wish to do more advancedconfiguration to your system, though also if the guide so far hasproved insufficient and hence a need for some alternative approachesto set up the system as a DAW are required. However, the followingsection, the running of the realTimeConfigQuickScan script, is astep which one should go through, as it checks the configuration steps explained above and test whether they have been activated orif something has gone wrong in the process; further down, there willalso be some relevant tips on monitoring tools which might be ofinterest.

    The topics mentioned below aremostly beyond the scope of this document and just briefly examined,it is therefore advised to consult the reference sources as thesubject matter is complex and quite technical, so to get a betterunderstanding of them if one wish to make further adjustments;besides, bear in mind that real-time audio on Linux is andhas been a field in frequent development and change.

    Download this script, and itsbelonging modules, to check the configured system:https://github.com/raboof/realtimeconfigquickscan;place all the files, script [.pl], modules [.pm], license, readme,in a directory called realTimeConfigQuickScan,create this directory somewhere in
    /home/(user).Open a terminal and navigate to the realTimeConfigQuickScandirectory e.g.: #cd /home/[user]/realTimeConfigQuickScan
    # perlrealTimeConfigQuickScan.pl
    Readthrough the terminal output, most of the concept which follows thereshould now be familiar; check for results goodor not good
    Most tests should be confirmed aspositive, good, but you will
    most likely still have these two:
    Kernelwith Real-Time Preemption... not found -not good,
    Checking checking sysctl inotifymax_user_watches... < 524288 - not good
    The first one confirms whetherone has a running real-time kernel or not; regarding the secondoutput, whether or not increasing this value has any effect in thecontext of real-time audio processing seems doubtable, so justignore it:

    Hardware, kernel and IRQ:
    With Linux kernel version3.x.x and onwards much of the real-time processing issues which thert-patch addressed are incorporated into the kernel itself, thus,the need for a kernel-rt (real-time kernel) is no longer pressing.Test which kernel which is currently running on the system with thiscommand, in a terminal type:
    # uname -a

    If the system runs kernel versionpre 2.6.39, one should consider upgrading, or build a kernel-rt: https://rt.wiki.kernel.org/index.php/Main_Page
    OpenSuSE did ship, thoughnot included on the downloadable DVD, with a kernel-rt around the time of versions 11.0 – 11.3; you might find one in adiscontinued repository.

    Kernelversion 2.6.39 introduced the threadedIRQ, acore part of the rt- patch; test if the kernel is capable and bootedwith the threadirqsoption enabled, in terminal type (thisis one long command):

    • # grep -e CONFIG_IRQ_FORCED_THREADING=y -e CONFIG_PREEMPT=y /boot/config-`uname -r`

    With default kernel-desktopon OpenSuSE 12.2 the output of that command shouldstate:
    This outputconfirms that the kernel is running with threadirqsenabled.
    One might end up with only:
    In that case use the bootparameter:
    (type thiscommand into grub at boot time, with grub2 see link below)
    Ifone ends up with none, the kernel is not capable of using threaded IRQs, suggestion would be to switch to kernel-desktop,if available, build a kernel-rt or upgrade the system; which optionthat would be most suitable and relevant depends on preferences andpriorities, currently running OS and kernel. #the_kernel

    Use this command to check if yoursound-device is sharing IRQ with other devices; sharing IRQ withother devices might cause x-runs:
    #cat /proc/interrupts
    Uselspci to list information about devices on the system, lspci has tobe run as root:
    'lspciis a utility for displaying information about PCI buses in the system and devices connected to them', manpage lspci.
    Moreon IRQ and /proc/interuptshere:
    IRQstands for interrupt request level:
    In a terminal type this to see alist of running threads, and their priorities:
    # ps axHouser,lwp,pid,rtprio,ni,command
    More on IRQ device/threadpriorities here:

    (Learning how to adjust priorityof devices or even how to unbind devices might be essential in somecases, in particular when audio-devices are sharing IRQ with otherdevices; lifting the priority of the audio-device/irqthread if itshares IRQ with e.g. a USB port in use could be very a importantstep towards getting rid of x-runs. I did not include this as astep in the configuration paragraph as I do not know enough aboutit; it is a complex area and it varies what, and if, are requiredto the various systems, so I found it difficult to suggest a general approach to the topic.)

    PCI bus hogging might also be anissue to address:
    (I am unsurewhether there is a close interconnection with this topic andirqthreading, though it seems to address a different approachfor improving performance.)

    One should carefully read thelinks provided above if one wish to start experimenting withirqthreading priorities and PCI bus latency; it might also beadvised to consider possible impacts it might have on other aspectsof the systems day to day activity, i.e. consider how dedicated thesystem should be tuned in regards real-time audio processing.

    Advanced JACKconfiguration:
    It may sometimes be required todo more advanced tuning in QjackCtl to get proper sound quality;some might also find it easier to start JACK from a terminal andexperiment with various parameters and variables that way, learnabout them here:
    http://linux.die.net/man/1/jackd(I find it easier to read manpages here)
    Twonice articles on JACK:
    Monitoring tools and commands:

    Use topto monitor system load, process name, pid, memory, processpriorities, owner, mother process etc., type in a terminal:
    # top
    UseLatencyTopto find out which processes which causessystem latency, open terminal and become superuserand type:
    TryCyclicTestwith this command in terminal, cyclictest measures kernel latency:
    #cyclictest -t1 -p 80 -n -i10000 -l 10000 -m
    List what audioapplications/processes are connected with the
    # lsof/dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*
    dsp,audio and mixer are related to OSS [open sound system] in theabove command; starting with OpenSuSE 12.1 [if I remember correctly] the OSS module(s) is not loaded at boot time, so you may get an error message concerning that
    #lsmod | grep snd
    lsmodlists currently loaded modules, snd is ALSA related, you can swapsnd with oss, audio or mix etc.,
    #fuser /dev/snd/*
    #fuser /dev/dsp
    olav@DDAmt:~>fuser /dev/snd/*
    /dev/snd/controlC0: 1578 3045
    /dev/snd/controlC1: 1578 3045
    /dev/snd/controlC2: 1578 3045
    /dev/snd/controlC3: 1578 3045
    olav@DDAmt:~>fuser /dev/dsp
    /dev/dsp: 28307
    olav@DDAmt:~>ps aux | grep 28307
    olav 28307 4.2 0.1 169192 18096 ? Sl 21:50 0:01/usr/bin/zynaddsubfx
    olav 29559 0.0 0.0 8260 872 pts/1 R+ 21:50 0:00 grep--color=auto 28307
    Anillustration of using fuser and ps to identify which sound modules are in use, the process using the different modules and the common name of that process.
    All of the above programmestakes various parameters, read the help section and the man pagesfor tips and information, e.g.:
    #man latencytop

    Using PulseAudio:
    'Basicallyall modern distros come with PulseAudio installed. PulseAudio (PA)is a sound server (like JACK) that takes care of mixing the output of all applications that can output sound. Since PulseAudio is designedto work in as much situations and with as much hardware as possibleit is not the best choice for a real-time, low-latency Linuxaudio set-up. In other words PulseAudiois more suited for consumer audio and JACK is more suited for proaudio.', #pulseaudio.
    Also,the use of PulseAudiomight easily get in your way working with real-time audio;PulseAudio and JACKhas been known not to work very well together, one server blockingthe other from accessing the audio-device, although there seems tobe some development in this regard. Ifone persists wanting to use PulseAudioalongside or on the same system as JACKhere are some information which should be useful:

    Benchmark tests:


    Some final tips:

    • Disable screen-saver when doing audio production:
      open the file-manager and navigate to the directory
      /home/[user]/bin, create a new text file and name it ScreenBlankOFF; open the file with a text editor and type in the following lines, save it:

    # This script, if run, willprevent blanking of the
    # screen for the currentsession.
    xset -dpms &
    xset s noblank &
    xset s off &
    Run the script:
    firstly one should make thescript executable, open a terminal and navigate to/home/[user]/bin:
    # cd/home/[user]/bin
    thereafter,type in the following:
    # chmodu+x ScreenBlankOFF
    Youshould now be able to start ScreenBlankOFFby clicking on it, you could also start it like this:

    • End processing intensive tasks which does not relate to the audio work; be conscious to which programmes run on the system, particularly processes and daemons running in the background. Use a system monitor e.g. top, or issue this terminal command
      to list running processes:
      • # ps -F -e | less

    • NetworkManager and WiFi might cause x-runs, buffer under-runs or over-runs, as the NetworkManager daemon keeps scanning for network in the background; consider disabling it while working or set up your network using ifup.

    • Consider using a lightweight DE, desktop-environment, or just a plain WM, window-manager; especially if there are limited hardware resources available on the system e.g. processor speed, amount of memory; DEs like KDE and GNOME might be demanding too much of these resources, alternative candidates might be: IceWM, Openbox, Fluxbox, Enlightnment16, LXDE and TWM.

    This document has beenextensively relying on information from the LinuxMusicianswiki; however, the text has also been dependent on other sources:
    http://www.linuxmusicians.com/viewto...t=10301&p=33241 &hili

    Comments 4 Comments
    1. vazhavandan's Avatar
      vazhavandan -
      Ultra cool. Thanks Sauce
    1. Bezoutsidentity's Avatar
      Bezoutsidentity -
      Great, but don't forget qmmp player, the best audio player IMHO.
    1. F_Sauce's Avatar
      F_Sauce -
      Thanks guys!

      The document didn't transform easily onto the web; use the PDF instead if it was hard to understand, it is more tidy.

    1. F_Sauce's Avatar
      F_Sauce -
      An interesting video here, no need to swap distro though
      AV Linux, Install...Create