You are not logged in.

#1 2009-11-22 15:49:00

MrGone
Member
Registered: 2009-09-30
Posts: 23

Jack and Audacity/traverso can't run process in real time as user.

Hey,

So i'm trying to do some recording on my pc, arch64 using audacity. The only way I can get jack to start is by using root if I try to start it as a user it gives me the error `cannot use real-time scheduling (FIFO at priority 10) [for thread 429729536, from thread 429729536] (1: Operation not permitted)`.

I have tried the fix of adding `session        required    pam_limits.so` to /etc/pam.d/su but no joy it still won't run as user. I use entrance as a login manager and it says that it should use pam as default auth. My policykit is currently not working could this be a problem?

Also when I use audacity as root with jack I get a segfault as I try to record not sure if this is related to running as root or not. Traverso on the other hand will work fine as root.

Obviously this isn't ideal any body have any ideas why this might be i'm stumped and there seems to be little info in the wiki or forums about this that isn't fixed by what i've already tried.

Thanks.

Offline

#2 2009-11-30 14:49:16

Newreason
Member
Registered: 2009-11-30
Posts: 2

Re: Jack and Audacity/traverso can't run process in real time as user.

Hey, MrGone.

I'm a Debian user but I think that I had the same problems you are having now to start recording under jack. I think you did the right choices, Audacity is a great app, I'm starting using traverso and it looks also great.
The question about jack is that it only can use realtime if you are running it as root (I don't remember why), if you need to run jack as normal user install qjackctl and launch it on a terminal like this:
qjackctl -L
this option is the same as qjackctl --no-realtime  (in case of the first one doesn't work), you can also disable realtime option going to qjackctl's setup and unchecking it.
Another important thing is setting some values to be the same in jack and audacity, I use 44100Hz and 16bit, both in jack and audacity.
So here comes the "mistery", audacity uses the portaudio to be connected to jack, and (I think its a bug) it just appears on qjackctl connections (or patchage if you like it most) when you start playing or recording. What you should do is start jackd via qjackctl with the -L command and then start audacity, check both apps sample rate and format (I recommend the 44,100Hz with 16bit), press the pause button on audacity and after that the record button. Now go to qjackctl connections and you be able to see the portaudio in and out ports (that's audacity big_smile). Make your connections and hit audacity's pause button one more time, it's going to start recording.
One good alternative (or the simplest one) to record under jack is installing timemachine (jack-timemachine) but it saves your work into a w64 file that is a kind of (big) wave file but it just can be played on apps like audacity and sweep, but it also can be converted to tradicional wav file using sndfile (I don't have the command now but can check it later). Hope this ideias can help.
Good recordings!!! (Sorry for my bad English)

Last edited by Newreason (2009-12-01 11:42:06)

Offline

#3 2009-12-01 11:39:07

Newreason
Member
Registered: 2009-11-30
Posts: 2

Re: Jack and Audacity/traverso can't run process in real time as user.

Hi, again. If you choose to use timemachine the w64 file can be converted by sndfile-convert (it uses libsndfile - on my linux libsndfile1), if you have the lib instaled just tipe sndfile-convert --help and you will see something like this:

Usage : sndfile-convert [encoding] <input file> <output file>

    where [encoding] may be one of the following:

        -pcms8     : force the output to signed 8 bit pcm
        -pcmu8     : force the output to unsigned 8 bit pcm
        -pcm16     : force the output to 16 bit pcm
        -pcm24     : force the output to 24 bit pcm
        -pcm32     : force the output to 32 bit pcm
        -float32   : force the output to 32 bit floating point
        -ulaw      : force the output ULAW
        -alaw      : force the output ALAW
        -ima-adpcm : force the output to IMA ADPCM (WAV only)
        -ms-adpcm  : force the output to MS ADPCM (WAV only)
        -gsm610    : force the GSM6.10 (WAV only)
        -dwvw12    : force the output to 12 bit DWVW (AIFF only)
        -dwvw16    : force the output to 16 bit DWVW (AIFF only)
        -dwvw24    : force the output to 24 bit DWVW (AIFF only)

    The format of the output file is determined by the file extension of the
    output file name. The following extensions are currently understood:

        aif        : AIFF (Apple/SGI)
        wav        : WAV (Microsoft)
        au         : AU (Sun/NeXT)
        caf        : CAF (Apple Core Audio File)
        flac       : FLAC (FLAC Lossless Audio Codec)
        snd        : AU (Sun/NeXT)
        svx        : IFF (Amiga IFF/SVX8/SV16)
        paf        : PAF (Ensoniq PARIS)
        fap        : PAF (Ensoniq PARIS)
        gsm        : RAW (header-less)
        nist       : WAV (NIST Sphere)
        ircam      : SF (Berkeley/IRCAM/CARL)
        sf         : SF (Berkeley/IRCAM/CARL)
        voc        : VOC (Creative Labs)
        w64        : W64 (SoundFoundry WAVE 64)
        raw        : RAW (header-less)
        mat4       : MAT4 (GNU Octave 2.0 / Matlab 4.2)
        mat5       : MAT5 (GNU Octave 2.1 / Matlab 5.0)
        mat        : MAT4 (GNU Octave 2.0 / Matlab 4.2)
        pvf        : PVF (Portable Voice Format)
        sds        : SDS (Midi Sample Dump Standard)
        sd2        : SD2 (Sound Designer II)
        vox        : RAW (header-less)
        xi         : XI (FastTracker 2)

It will make your timemachine experience worthy.

By the way, I just tested traverso last night for recording and it works fine, I think I'm going to use it instead of audacity
I shows the CPU usage percentual during the process of playing and recording. I tested it striking qjackctl with no realtime, traverso and alsaplayer  (alsaplayer -o jack), connected alsaplayer out1 and out2 to the 2 primary traverso's tracks (and traverso to system playback), hit each track rec button on traverso and alsaplayer play button. Exported the project as wav. The result was a good quality wav file.
Have a nice day!

Last edited by Newreason (2009-12-01 11:44:33)

Offline

Board footer

Powered by FluxBB