Pulseaudio not working while jackd is running

Bug #480103 reported by sgrandi
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
jack-audio-connection-kit (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: jackd

Alsa works fine on my laptop, but when I start jack I don't hear any sound. Then when I stop jack the sound is working fine.
Hardware : HP DV6-1119el
Ubuntu: release 9.10 32 bit
Soundcard:
description: Audio device
                product: R700 Audio Device [Radeon HD 4000 Series]
                vendor: ATI Technologies Inc
                physical id: 0.1
                bus info: pci@0000:01:00.1
                version: 00
                width: 32 bits
                clock: 33MHz
                capabilities: bus_master cap_list
                configuration: driver=HDA Intel latency=0
                resources: irq:17 memory:da010000-da013fff

Package : alsa_base release 1.0.20+dfgsubuntu5
Package: jackd 0.116.1-4ubuntu2

I don't have further information, I don't know if it is a problem originated by alsa, oss or jackd.

If I can be helpful to discover the problem let me know.

Thank you
Stefano

Revision history for this message
Emmet Hikory (persia) wrote :

Could you provide a detailed explanation of precisely which activities you are engaging in that make and don't make sound? There are a few reasons this may happenn, and I'm not sure I understand enough right now to guess at a fix for the bug.

Changed in jack-audio-connection-kit (Ubuntu):
status: New → Incomplete
Revision history for this message
sgrandi (stefano-grandi) wrote : Re: [Bug 480103] Re: Alsa not working while jackd is running

I'll try to explain:

1) reboot the system
2) play a movie with totem (command line : "totem PublicEnemies.avi" - the sound works, i hear the soundtrack
3) close totem
4) launch qjackctl
5) play a movie with totem (command line : "totem PublicEnemies.avi" - the sound doesn't work, i don't hear the soundtrack -- the volume icon on totem is also disabled

Additional info:

ps -ef |grep jack

shark 7672 1 0 15:55 ? 00:00:00 gksudo /usr/bin/qjackctl
root 7673 7672 0 15:55 ? 00:00:00 /bin/sh /usr/bin/qjackctl
root 7681 7673 0 15:55 ? 00:00:01 /usr/bin/qjackctl.bin
root 7689 7681 0 15:55 ? 00:00:00 /usr/bin/jackd -R -m -dalsa -dhw:0 -r44100 -p1024 -n2 -Xseq

ps -ef |grep totem

shark@shark-laptop:~/Desktop$ ps -ef |grep totem
shark 7865 1 12 15:58 ? 00:00:02 totem /home/shark/Desktop/Public.Enemies.2009.BRRip.XviD.AC3-DTS-CaLLioPE_MoNTEDiaZ.dp.avi

It seems to me that jack daemon takes exclusive control of alsa sound, but i'm not sure.

Let me know if i can give other details.

Thanks
Stefano

----- Messaggio originale -----
Da: Emmet Hikory <email address hidden>
A: <email address hidden>
Inviato: Ven 12 febbraio 2010, 01:34:29
Oggetto: [Bug 480103] Re: Alsa not working while jackd is running

Could you provide a detailed explanation of precisely which activities
you are engaging in that make and don't make sound? There are a few
reasons this may happenn, and I'm not sure I understand enough right now
to guess at a fix for the bug.

** Changed in: jack-audio-connection-kit (Ubuntu)
       Status: New => Incomplete

--
Alsa not working while jackd is running
https://bugs.launchpad.net/bugs/480103
You received this bug notification because you are a direct subscriber
of the bug.

Status in “jack-audio-connection-kit” package in Ubuntu: Incomplete

Bug description:
Binary package hint: jackd

Alsa works fine on my laptop, but when I start jack I don't hear any sound. Then when I stop jack the sound is working fine.
Hardware : HP DV6-1119el
Ubuntu: release 9.10 32 bit
Soundcard:
description: Audio device
                product: R700 Audio Device [Radeon HD 4000 Series]
                vendor: ATI Technologies Inc
                physical id: 0.1
                bus info: pci@0000:01:00.1
                version: 00
                width: 32 bits
                clock: 33MHz
                capabilities: bus_master cap_list
                configuration: driver=HDA Intel latency=0
                resources: irq:17 memory:da010000-da013fff

Package : alsa_base release 1.0.20+dfgsubuntu5
Package: jackd 0.116.1-4ubuntu2

I don't have further information, I don't know if it is a problem originated by alsa, oss or jackd.

If I can be helpful to discover the problem let me know.

Thank you
Stefano

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/ubuntu/+source/jack-audio-connection-kit/+bug/480103/+subscribe

Revision history for this message
Emmet Hikory (persia) wrote : Re: Alsa not working while jackd is running

OK. I understand now. ALSA is working fine, but totem isn't able to get to the output channels. More specifically, jack is controlling the card directly, so other clients cannot use it. Totem may be attempting to send data to alsa, or to pulseaudio, or to gstreamer, or even to xine, depending on how it is configured. None of these will allow it to access the sound card controlled by jack.

The workaround for now is to use two audio interfaces: have JACK control one, and leave the other for general sounds (probably managed through pulseaudio).

In the future, it may be that JACK interfaces for gstreamer or pulseaudio can be built that would allow this to work.

I'm marking this "Won't Fix" against the jack-audio-connection-kit package, as there is nothing in JACK that will change to support this feature. There are outstanding bugs to address some of these issues, but they may not completely address them (needs testing), and in any case, are not yet available.

If this issue persists in 10.04 after release, please file a new bug against totem (or other specific affected software) requesting that they be made to work with JACK.

Changed in jack-audio-connection-kit (Ubuntu):
status: Incomplete → Won't Fix
Revision history for this message
Thomas E Jenkins (thomas-jenkins) wrote :

qjackctl is started by the /usr/bin/qjackctl script that detects if pulseaudio is running and if it is it starts /usr/bin/qjackctl.bin using the pasuspender utility that suspends pulseaudio until qjackctl is closed. Totem, via gstreamer, by default is configured to output using pulseaudio which of course won't work while pulseaudio is suspended.

Revision history for this message
Emmet Hikory (persia) wrote :

Good point. Moving back to triaged, as I'd forgotten about the pasuspender call. I'm not sure how we can set up the packages in a way that works well for all use cases without being able to compile pulse-jack: suggestions welcome.

summary: - Alsa not working while jackd is running
+ Pulseaudio not working while jackd is running
Changed in jack-audio-connection-kit (Ubuntu):
status: Won't Fix → Confirmed
importance: Undecided → Low
Revision history for this message
raboof (arnouten) wrote :

Looks like this issue actually consists of 2 parts:

1) jackd takes total control over a device. This is desirable for performance reasons, but leaves non-jack-aware apps (like pulseaudio applications) out in the cold. The ideal solution would be to include module-jack-sink in pulseaudio and switch pulseaudio to that whenever jackd is running for a given sound card.

2) a workaround until (1) is implemented, is to use 2 sound cards, one for pro audio and one for other sounds. Problem with this workaround is that starting qjackctl suspends pulseaudio when it starts anyway. What we'd really need here is a way for qjackctl to say 'please clear hw:0, I want to claim it exclusively' when qjackctl (or jackd) is started: this would have to suspend pulseaudio *only* if it's bound to the specified device, and leave it running otherwise.

Revision history for this message
Paul Perkins (catmatist) wrote :

Is this an example of a bug which becomes much easier to fix now that jackd has been moved into "main"? That is, many things, including PulseAudio, have code to be able to run "on top of" jackd in the sound stack, but that code could not be enabled when jackd was not in the "main" repository. If PulseAudio is built with jackd support enabled, then we are in sight of being able to have jackd insert itself "under" PulseAudio instead of pausing it. In sight, but not actually there until the script is written to make it so.

Revision history for this message
Daniel Ellis (danellisuk) wrote :

Using the following guide I have managed to configure my system (Ubuntu 10.04) so that jack restarts PulseAudio so that sound from PulseAudio clients is routed through jack. It works marvellously.

See http://sync-signal.com/2009/12/configuring-jack-and-pulseaudio-on-ubuntu-9-10/

In summary:

1. Install pulseaudio-module-jack
2. Copy the default.pa configuration file and edit the new version to only load the two jack modules
3. Configure client.conf so that pulse audio does not automatically restart
4. Update the jack startup/shutdown commands to kill PulseAudio and restart it with the custom PulseAudio configuration file

These are the four commands I used in the jack configuration dialogue:-

Execute script on Startup: pulseaudio -k
Execute script after Startup: pulseaudio -DnF ~/.pulse/pulsejack.pa
Execute script on Shutdown: pulseaudio -k
Execute script after Shutdown: killall jackd; pulseaudio --start

(This differs slightly from the guide, due to 'pulse-session' not existing, so I replaced it with 'pulseaudio --start')

Now we have a working solution, we need to determine how we can get Ubuntu to work like this out of the box.

1. pulseaudio-module-jack could be marked as a recommended dependency of jackd.
2. A default pulse-jack configuration file could be included somewhere on the system
3. This is the tricky part, as I don't think disabling PulseAudio's auto-restart feature will be a suitable option.
4. Change the default jack startup/shutdown settings (the default settings are invalid anyway, as it attempts to run 'artsshell' which is not installed and so leaves an error in the message log).

So please report back if this solution works, and please also let us know if you think of a better solution than disabling the auto-restart feature of PulseAudio. Then lets see if we can find a suitable proposal for getting this to work out of the box!

Revision history for this message
Hveem (krbjhvee) wrote :
Download full text (4.3 KiB)

I have the same problem with Pulseaudio blocking access to the soundcard, so jackd does not work from the box.

Jackd error output:

Tue Feb 26 20:01:59 2013: Starting jack server...
Tue Feb 26 20:01:59 2013: JACK server starting in realtime mode with priority 10
Tue Feb 26 20:01:59 2013: ERROR: Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Tue Feb 26 20:01:59 2013: control device hw:0
Tue Feb 26 20:01:59 2013: control device hw:0
Tue Feb 26 20:01:59 2013: ERROR: Failed to acquire device name : Audio0 error : Method "RequestRelease" with signature "i" on interface "org.freedesktop.ReserveDevice1" doesn't exist

Tue Feb 26 20:01:59 2013: ERROR: Audio device hw:0 cannot be acquired...
Tue Feb 26 20:01:59 2013: ERROR: Cannot initialize driver
Tue Feb 26 20:01:59 2013: ERROR: JackServer::Open failed with -1
Tue Feb 26 20:01:59 2013: ERROR: Failed to open server
Tue Feb 26 20:02:00 2013: Saving settings to "/home/haaken/.config/jack/conf.xml" ...
20:02:11.229 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
20:10:31.231 D-BUS: JACK server could not be started. Sorry
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Tue Feb 26 20:10:30 2013: Starting jack server...
Tue Feb 26 20:10:31 2013: JACK server starting in realtime mode with priority 10
Tue Feb 26 20:10:31 2013: ERROR: Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Tue Feb 26 20:10:31 2013: control device hw:0
Tue Feb 26 20:10:31 2013: control device hw:0
Tue Feb 26 20:10:31 2013: ERROR: Failed to acquire device name : Audio0 error : Method "RequestRelease" with signature "i" on interface "org.freedesktop.ReserveDevice1" doesn't exist

Tue Feb 26 20:10:31 2013: ERROR: Audio device hw:0,4 cannot be acquired...
Tue Feb 26 20:10:31 2013: ERROR: Cannot initialize driver
Tue Feb 26 20:10:31 2013: ERROR: JackServer::Open failed with -1
Tue Feb 26 20:10:31 2013: ERROR: Failed to open server
Tue Feb 26 20:10:33 2013: Saving settings to "/home/haaken/.config/jack/conf.xml" ...
20:10:36.416 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
20:14:37.491 D-BUS: JACK server could not be started. Sorry
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Tue Fe...

Read more...

Revision history for this message
Kaj Ailomaa (zequence) wrote : Re: [Bug 480103] Re: Pulseaudio not working while jackd is running

On Tue, 26 Feb 2013 20:28:21 +0100, Håken Hveem
<email address hidden> wrote:

> I have the same problem with Pulseaudio blocking access to the
> soundcard, so jackd does not work from the box.
>

This bug was about qjackctl blocking pulseaudio, not PA blocking jack.

There is in fact a bug in PA that makes it hard for jack to grab the audio
device from PA.
There are different solutions:

1. have PA use another device, if you have multiple. Jack will always be
able to grab
2. disable PA when starting jack, either by
  * using the tool pasuspender, like so: pasuspender -- sleep 30
  * turning of pulseaudio autospawn, and killing pulseaudio

This has been fixed in pulseaudio 3.0, so no need to report a new bug.
Hopefully an SRU(stable release update) of the bugfix can find it's way to
12.10 and 12.04 shortly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.