PulseAudio and Ubuntu Studio 11.10

David Henningsson david.henningsson at canonical.com
Fri May 20 07:29:54 UTC 2011

On 2011-05-20 02:28, Scott Lavender wrote:
> On Tue, May 17, 2011 at 12:59 AM, David Henningsson
> <david.henningsson at canonical.com
> <mailto:david.henningsson at canonical.com>> wrote:
>     Hmm, is that script still present? AFAIK it was removed in Maverick,
>     when PA and Jack implemented the device reservation protocol.
>     If I just run "qjackctl" from a terminal here, it does not suspend
>     PulseAudio.
> Interesting.  I tested this, but this time with a YouTube video playing
> in Firefox, with two methods.
> In the first test, I started video in YouTube then select qjackctl from
> the menu.  I have only started qjackctl, not jack, and video losses
> sound but starts again when qjackctl is shut down.
> Next, I start jackd via command line " jackd -dalsa -dhw:1 -r44100 -p512
> -n3" and the jackd will not start because "the playback device "hw:1" is
> already in use".

Note that you're recommended to use card names instead of indices, e g 
"hw:Juli" instead of "hw:1". You can see the card names in 
/proc/asound/cards - it's the names within square brackets.
This is because the indices often change between reboots.

> Keep in mind that I'm running Ubuntu Studio and the menu entry is
> calling "pasuspender /usr/bin/qjackctl" so this isn't really a script.
> The Ubuntu Studio team will need to address this once we sort out
> getting how jack and Pulse Audio and working together.

That seems like a bug to me, please start qjackctl without pasuspender. 
Are you talking about /usr/share/applications/qjackctl.desktop? I can 
verify the problem is present there. Seems like this was added for Natty 
as a response to bug #570379.

Btw, could you also make sure that the pulseaudio-module-jack package is 
installed? We should also probably make sure it's seeded in Ubuntu 
Studio if it isn't. If it isn't, that could explain why you're not 
seeing much of the functionality.

>     For the automatic stuff you want to make sure that Setup -> Misc ->
>     "Enable D-Bus interface" is checked as well.
>   I did that last night before the tests tonight and even verified that
> it was still enabled.

We should probably patch qjackctl to make that the default for Oneiric.

>     ...and start "jackdbus" instead of "jackd" here.
> I tried and it said that "jackdbus should be auto-executed by D-Bus
> message bus daemon.
> If you want to run it manually anyway, specify "auto" as only parameter"
> Trying "jackdbus auto" doesn't seem to do anything.  No comments back,
> just "scott at natty-studio:~$" at the next line waiting for a command.

Right. It is set to spawn when the first client calls instead, forgot 
that, sorry. (However this should be the case if pulseaudio actually 
connects to jack.)

>     Hmm, under this scenario, could you supply the output of "sudo fuser
>     -v /dev/snd/*"? It sounds like totem does not use pulseaudio but
>     goes to the sound card through some other path.
> scott at natty-studio:~$ sudo fuser -v /dev/snd/*
> [sudo] password for scott:
>                       USER        PID ACCESS COMMAND
> /dev/snd/controlC0:  scott      1489 F.... pulseaudio
> /dev/snd/controlC1:  scott      1489 F.... pulseaudio
> /dev/snd/pcmC1D0p:   scott      1489 F...m pulseaudio

I have tried the same thing here and it seems to be a timeout 
problem...? If I click Start (in qjackctl, without pasuspender) once, I 
get the "busy" error, if I try it again it works. It might be that some 
layer does not make sure the device is closed before reporting that it is.

>     Could you also check
>     1)  the "Connect" window in qjackctl and see if there are PulseAudio
>     sources and sinks there?
>     2) in the "pavucontrol" application, check that "Totem" is set to
>     output to the Jack sink?
>     Maybe they just need to be connected manually?
> I never saw any Pulse Audio sinks in the qjackctl "Connect" window under
> any of the tabs.
> I did not see a place to set the output to a jack sink in
> "pavucontrol".   Under the "Playback" tab I can see Totem playing the
> music but I can only choose to set it to either of my audio interfaces:
> Internal Audio Analog or ICE1712 [Envy24] PCI
> I should point out that I haven't loaded either of your modules yet.
> However, I am running Ubuntu Studio Natty with jackd2 installed.
> Lastly I want to point out that I appreciate your time and effort to
> helping me understand this so I can provide better functionality for our
> users.

Thanks. I wish I had more time for helping you folks out.

David Henningsson, Canonical Ltd.

More information about the Ubuntu-Studio-devel mailing list