hi all
could someone point me in the direction to a guide on setting up rt-kernel
on ubuntu jaunty. i'm having trouble getting qjackctl started in realtime
mode despite the fact that i am running 2.6.28-3-rt #12-Ubuntu SMP PREEMPT
RT. i've done this in other distros but i must be missing something here.
thanks.
t
Hi,
A few people have been discussing the status of jack support with
pulseaudio at pulseaudio-discuss.
I thought that it would be useful to post the main details for people
here and also to have a more complete overview in the search engines,
I am following up on the dbus situation in regards to legacy jack.
However the scripts below should be useful for people who use non dbus
jack and still want to run pulseaudio at the same time. They can be
called from qjackctl for convenience.
++++++++
> > I would like to get some feedback on why exactly PA is not currently
> > able to autoreconfigure itself to play nicely with jack out of the
> > box.
Recent PA versions do just that. If you have a recent dbus'ified
version of JACK and PA 0.9.15 then PA will give up access to the
device when JACK asks for it and take it back afterwards. JACK is king
and PA obeys.
++++++++++
As mentioned we have two modules to connect PA to JACK. Called
module-jack-sink and module-jack-source. Presumably those are the
modules included in that package.
> Ok so not running both at the same time. But how do you stop
pulseaudio from
> > running and restart it after you used JACK?
Newer PA and JACK versions cooperate in this way
automatically. If you fire up JACK PA will go out of the way for that
device. And after JACK is done PA takes the device back. JACK is king
and PA will comply.
In older versions you can use a tool like "pasuspender". It will
suspend PA's access to the audio devices temporarily as long as child
process is running. If you make that child process JACK you have a
neat way to make JACK and PA not fight for device access.
A more brutal way is to stop PA with "pulseaudio -k" before you run
JACK and then start PA with "pulseaudio -D" afterwards. But that
probably won't work that nicely since PA is configured to autospawn in
most cases these days -- which you can disable however by editing
/etc/pulse/client.conf
+++++++++++
> Do you or anyone else have a specific reasoning for using only the
jackdbus
> > version? Is is just because the person who wrote the code wrote it
to work
> > with jackdbus?
> >
> > Is this something that could be handled in a different way to give
legacy
> > jack users this feature?
I don't use Jack myself (anymore), but from what I understand, this
feature is tied to jackdbus, because D-Bus is the protocol Jack and PA
use to communicate with each other. When PA is running and Jack is
started, Jack can't force PA to release the device, if PA doesn't want
to cooperate (well, it could use the "kill" command or something...).
PA cooperates by listening for device release requests using D-Bus, so
Jack has to use D-Bus too. And apparently jackdbus is the only
implementation that does that.
++++++++++++
Currently what I'm doing, which is just a bit hackish, is to use pactl
list to get the IDs of the alsa sink/source, unloading them via pactl
unload-module, then starting JACK and loading the appropriate
module-jack-sink/source.
In the reverse, again pactl list to get the relevant IDs, unload via
pactl unload-module, then loading the ALSA modules.
This actually works most of the time, but there's a segmentation fault
that I've encountered recently when unloading the jack modules while
sound is playing. The bug report with traces has been submitted at
http://www.pulseaudio.org/ticket/560 and Lennart will be getting round
to it.
> Can you provide a command line for this that works for you please? I
> > would like to test it here.
Okay. As I warned, it IS rather hackish. There's two scripts, the first
one I name pulse-nojack, the second I name pulse-withjack. Sequence of
events is as follows:-
1. Start pulseaudio (I comment out every HAL/alsa-related line
in /etc/pulse/*.pa, so pulse just starts with a null sink if it hasn't
yet). Using the --start means if pulse is already started nothing will
be done (use current server).
2. Check for modules needing to be unloaded. Just pactl with some greps
and sed, then pactl unload-module.
3. Check for jackd (this may need to be changed once jack2 comes out,
I've been monitoring the jackdbus conversations and things are in real
flux there), kill/start if needed.
4. Load the modules which need loading.
Please note there's probably some wrapping problems with this code.
Please check it out, should not be hard to figure out what to do.
FIRST SCRIPT: PULSE-NOJACK----------------------------------------------
#!/bin/bash
# ORIGINAL SCRIPT FROM:
#http://ubuntuforums.org/showthread.php?t=904379&highlight=bash+ping
# edited by edmondt in: http://ubuntuforums.org/showthread.php?t=939183
# edited by ngoonee, Feb 2009
# Start pulseaudio if it hasn't already been started
pulseaudio --start
# Name the module to be unloaded.
MODULE="alsa"
# The line used to startup JACK.
JACKSTART="/usr/bin/jackd -R -dalsa -r44100 -p64 -n3 -D -Chw:0 -Phw:0"
SINKID=$(pactl list | grep -B 1 "Name: module-$MODULE-sink" | grep
Module | sed 's/[^0-9]//g')
SOURCEID=$(pactl list | grep -B 1 "Name: module-$MODULE-source" | grep
Module | sed 's/[^0-9]//g')
if [ -e $SINKID ]; then
echo $MODULE sinks/sources not loaded, proceeding....
else
echo $MODULE sinks/sources are loaded, ID of $MODULE sink is $SINKID
ID of $MODULE source is $SOURCEID...
echo Unloading module $SINKID and $SOURCID
pactl unload-module $SINKID
pactl unload-module $SOURCEID
fi
if [ $( pidof jackd ) ]; then
echo JACK is running, nothing to be done.
else
echo JACK is not running, starting JACK...
$JACKSTART &
sleep 3
fi
JACKSINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep
Module | sed 's/[^0-9]//g')
JACKSOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" | grep
Module | sed 's/[^0-9]//g')
if [ -e $JACKSINKID ]; then
echo JACK sinks/sources not loaded, loading now...
pactl load-module module-jack-sink
pactl load-module module-jack-source
else
echo JACK sinks/sources are loaded, ID of JACK sink is $JACKSINKID
ID of JACK source is $JACKSOURCEID...
fi
exit 0
------------------------------------------------------------------------
SECOND SCRIPT: PULSE-WITHJACK-------------------------------------------
#!/bin/bash
# ORIGINAL SCRIPT FROM:
# http://ubuntuforums.org/showthread.php?t=904379&highlight=bash+ping
# edited by edmondt in: http://ubuntuforums.org/showthread.php?t=939183
# edited by ngoonee, Feb 2009
# Start pulseaudio if it hasn't already been started
pulseaudio --start
# Name the module to be unloaded.
MODULE="alsa"
# The line used to startup JACK.
JACKSTART="/usr/bin/jackd -R -dalsa -r44100 -p64 -n3 -D -Chw:0 -Phw:0"
SINKID=$(pactl list | grep -B 1 "Name: module-$MODULE-sink" | grep
Module | sed 's/[^0-9]//g')
SOURCEID=$(pactl list | grep -B 1 "Name: module-$MODULE-source" | grep
Module | sed 's/[^0-9]//g')
if [ -e $SINKID ]; then
echo $MODULE sinks/sources not loaded, proceeding....
else
echo $MODULE sinks/sources are loaded, ID of $MODULE sink is $SINKID
ID of $MODULE source is $SOURCEID...
echo Unloading module $SINKID and $SOURCID
pactl unload-module $SINKID
pactl unload-module $SOURCEID
fi
if [ $( pidof jackd ) ]; then
echo JACK is running, nothing to be done.
else
echo JACK is not running, starting JACK...
$JACKSTART &
sleep 3
fi
JACKSINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep
Module | sed 's/[^0-9]//g')
JACKSOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" | grep
Module | sed 's/[^0-9]//g')
if [ -e $JACKSINKID ]; then
echo JACK sinks/sources not loaded, loading now...
pactl load-module module-jack-sink
pactl load-module module-jack-source
else
echo JACK sinks/sources are loaded, ID of JACK sink is $JACKSINKID
ID of JACK source is $JACKSOURCEID...
fi
exit 0
------------------------------------------------------------------------
--
Patrick Shirkey
Boost Hardware Ltd
I am seeing lots of hard lock ups with Ubuntu Studio 9.04 too
I have seen it on two my computers and two of my sons. These machines are all
different ages and have different hardware.
We tried to debug it for a little while, but since it was happening on such a
wide variety of hardware *and* since it was happening soon after boot up (i.e.
no heavy processing, sometimes even before starting jack) we gave up
In fact, we are giving Arch Linux a try. We figure that if we have more
control over the configuration that maybe we can (finally) get a stable /
flexible Linux audio box Dont get me wrong we are big fans of Linux audio
but we want to spend some time making music too
Hi,
Seems to be bad news on the Jacklab forums:
http://forum.jacklab.net/viewtopic.php?f=22&t=963
The project will be closed... sad for the OpenSuse users and sad for
linux audio community :(
Please don't let all the useful wiki and forum information go to trash.
Could someone from linuxaudio.org prevent that and maybe provide a
temporarily spot on the internet for that information?
Btw are there no people who wants to take over this project and do a
restart?
Regards,
\r
I don't know about RAID 1 (mirroring).. but I have been using striping (RAID 0)
on lesser systems without any apparent impact on latency or CPU load.
On Mon May 25 19:40 , Brent Busby sent:
>I wondered what the prevalent opinion was about setting up a software
>raid mirror of two sata drives under Linux LVM. This is on a 3.2GHz
>quad core AMD system that almost certainly has plenty of free CPU. Will
>this provide extra disk i/o that could be usefully applied to getting
>more simultaneous tracks, or will using a software mirror interfere with
>the RT kernel or cause latency issues/instability somewhere?
>
>--
>+ Brent A. Busby + "We've all heard that a million monkeys
>+ UNIX Systems Admin + banging on a million typewriters will
>+ University of Chicago + eventually reproduce the entire works of
>+ Physical Sciences Div. + Shakespeare. Now, thanks to the Internet,
>+ James Franck Institute + we know this is not true." -Robert Wilensky
>_______________________________________________
>Linux-audio-user mailing list
>Linux-audio-user(a)lists.linuxaudio.org
>http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
>)
I wondered what the prevalent opinion was about setting up a software
raid mirror of two sata drives under Linux LVM. This is on a 3.2GHz
quad core AMD system that almost certainly has plenty of free CPU. Will
this provide extra disk i/o that could be usefully applied to getting
more simultaneous tracks, or will using a software mirror interfere with
the RT kernel or cause latency issues/instability somewhere?
--
+ Brent A. Busby + "We've all heard that a million monkeys
+ UNIX Systems Admin + banging on a million typewriters will
+ University of Chicago + eventually reproduce the entire works of
+ Physical Sciences Div. + Shakespeare. Now, thanks to the Internet,
+ James Franck Institute + we know this is not true." -Robert Wilensky
Crypto escribió:
>
>To me it seems that it could be well suited for what I need, but the manual is
>in Spanish which I cannot understand ;-)
>
>The author himself did not want to translate the manual into English (he said
>that it was because he could not write in English well enough), but seemed to
>welcome people who could do that for him. Maybe this is something that could
>be done by someone on this list?
>
If you can wait two weeks I'll do a translation for you while I'm on the plane back home to Colombia. (42 damned hours of planes and airports to fill in).
If anyone else starts an english translation, please let me know so I don't double up the effort.
- shane
David Baron wrote:
> On Wednesday 20 May 2009 18:26:15 you wrote:
>
>> David Baron wrote:
>>
>>> I have been unable to compile it
>>>
>>> external.o: In function `get_temp_filename':
>>> /home/david/denemo-0.8.4/src/external.c:119: warning: the use of
>>> `tempnam' is dangerous, better use `mkstemp'
>>> audiocapture.o: In function `pa_main':
>>> /home/david/denemo-0.8.4/src/audiocapture.c:348: undefined reference to
>>> `Pa_GetDefaultInputDevice'
>>> audiocapture.o: In function `play_pitch':
>>> /home/david/denemo-0.8.4/src/audiocapture.c:143: undefined reference to
>>> `Pa_IsStreamActive'
>>> /home/david/denemo-0.8.4/src/audiocapture.c:154: undefined reference to
>>> `Pa_GetDefaultOutputDevice'
>>>
>> I'll guess you don't have an up-to-date Portaudio2 (v19) installed. This
>> morning I compiled and installed it on Ubuntu Studio 9.04. Tests ran fine.
>>
>> Best,
>>
>> dp
>>
>
> Installed the v19-dev package (dependencies of the v19 library should have
> done this!) and that compiled. Now I get:
>
> libtool: link: cannot find the library `/usr/lib/libjack.la' or unhandled
> argument `/usr/lib/libjack.la'
>
> The Debian libjack packages do not, apparently, include the .la (I do have a
> libjack.a). What can I do short of compile jack myself?
>
>
What distro are you running ? This problem is becoming a real Linux
audio annoyance.
I've cc'd this reply back to LAU for more eyes on the problem.
Best,
dp
Hi
I tried measuring my latency with jdelay. Started in on the commandline,
first it said
Signal below threshold...
Then I connected it's input to the output of system:capture_1 with my
microphone connected and it output to the input of system:playback_1+2.
Now I get a squareish tone and when "singing" into the microphone I get
reading like these:
22442.483 Inv
58010.411 ??
43602.390 ?? Inv
43474.474
43474.474 ?? Inv
Signal below threshold...
Signal below threshold...
Signal below threshold...
25549.731 ??
25549.731 ?? Inv
37749.225 ??
37749.225 ?? Inv
37749.225 ??
24653.357 ??
24653.228 ?? Inv
25677.165 ??
11013.134 ?? Inv
25677.153 ??
2821.046 ?? Inv
2821.046 ??
The man page says the values are in samples, so for instance a value of
37749.225 should be 0.77 seconds at 48000, right? This seems bogus
(qjackctl reports 10 ms).
What am I doing wrong?
--
Atte
http://atte.dkhttp://modlys.dk
To whom it may concern: (again)
Jackdmp 1.9.2, Qjackctl 0.3.4
I do the following:
- Log in.
- Start a jack app.
- The app starts jackd, but using the wrong card,
and things don't work as expected.
Questions:
1. Which parameters are used for such an autostart ?
Certainly not the ones in ~/.jackdrc, these would
have been correct.
2. Qjackctl also ignores ~/.jackdrc, so what is the
purpose of this file ?
- I terminate the app. Check with ps, there is no
more jackd running.
- I start qjackctl. It immediately shows a running
jackd, but his has restarted the previous wrong one.
- Click Stop, Start in qjackctl. Get the same wrong
jackd again.
- Verify qjackctl's Setup window. This shows the
settings for the right jackd, while it is running
another one.
This is *madness*
One more: you can't terminate qjackctl without
terminating jackd as well. Why not ? Killing
qjackctl does the right thing.
A request to the jackdmp and qjackctl devs:
PLEASE REMOVE THAT DBUS MADNESS
Ciao,
--
FA
Io lo dico sempre: l'Italia è troppo stretta e lunga.