pulseaudio fails to release card to jack

Bug #1163638 reported by Kaj Ailomaa on 2013-04-03
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

[Impact]

jackd (jackd2) is unable to start when trying to acquire the same audio device used by pulseaudio. (jackd1 is currently not able to acquire the card through dbus).

Users are often unable to use jack at all, without disabling pulseaudio.

[Test Case]

 * First, make sure a pulseaudio client is actively playing audio through pulseaudio
 * Start qjackctl.
 * Select the same device that pulseaudio is using.
 * Start jack. Sometimes it takes a few attempts for the bug to appear. Eventually, jack will not start, and an error message like this will appear:

ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again

[Regression Potential]

The fix adds code that deals with reserving the card for pulseaudio, so if there's any regression, it should be around that functionality. To my knowledge, that would only come to play in dealing with jackd, which is the most likely application to try unreserve pulseaudio reserved cards.

Also this patch is taken from upstream, and thus already tested and working in 13.04 with no related regressions reported.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: pulseaudio 1:1.1-0ubuntu15.2
ProcVersionSignature: Ubuntu 3.2.0-39.41-lowlatency 3.2.39
Uname: Linux 3.2.0-39-lowlatency x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xfe300000 irq 16'
   Mixer name : 'Realtek ALC892'
   Components : 'HDA:10ec0892,1462d693,00100302'
   Controls : 43
   Simple ctrls : 20
Card1.Amixer.info:
 Card hw:1 'M66'/'M Audio Delta 66 at 0xd040, irq 21'
   Mixer name : 'ICE1712 - multitrack'
   Components : ''
   Controls : 60
   Simple ctrls : 38
Card2.Amixer.info:
 Card hw:2 'NVidia'/'HDA NVidia at 0xfe080000 irq 24'
   Mixer name : 'Nvidia GPU 0b HDMI/DP'
   Components : 'HDA:10de000b,10de0101,00100100'
   Controls : 24
   Simple ctrls : 4
Date: Wed Apr 3 02:45:46 2013
InstallationMedia: Ubuntu-Studio 12.04.1 "Precise Pangolin" - Release amd64 (20120818)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/15/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.8
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: 970A-G46 (MS-7693)
dmi.board.vendor: MSI
dmi.board.version: 2.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MSI
dmi.chassis.version: 2.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.8:bd06/15/2012:svnMSI:pnMS-7693:pvr2.0:rvnMSI:rn970A-G46(MS-7693):rvr2.0:cvnMSI:ct3:cvr2.0:
dmi.product.name: MS-7693
dmi.product.version: 2.0
dmi.sys.vendor: MSI

Related branches

Kaj Ailomaa (zequence) wrote :
Kaj Ailomaa (zequence) wrote :

I'm preparing a SRU for Precise and Quantal to fix this bug, which was fixed for the 3.0 release of pulseaudio.

David Henningsson (diwic) wrote :

@Kaj, please submit them as merge proposals against the ubuntu-audio-dev branches if so; there are usually other things we want to release at the same time as this bug fix if possible.

Kaj Ailomaa (zequence) on 2013-04-05
summary: - fails to release card to jack
+ pulseaudio fails to release card to jack
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Kaj Ailomaa (zequence) on 2013-05-17
tags: added: quantal
Raymond (superquad-vortex2) wrote :

how do pulseaudio know which sound card need to be released to Jack when you have three playback devices and two capture devices ?

Kaj Ailomaa (zequence) wrote :

To answer the precious question, it's the whole card that needs to be made available.

Kaj Ailomaa (zequence) wrote :

Ok, I've made a couple of merge requests. I've built and tried the fix myself on both Precise and Quantal, and it works.

David Henningsson (diwic) wrote :

Thanks, have you also tested the final built branches so you know that this is what is required to fix the problem?

David Henningsson (diwic) wrote :

Fixed in raring/saucy, right?

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
Changed in pulseaudio (Ubuntu Precise):
status: New → Incomplete
Changed in pulseaudio (Ubuntu Quantal):
status: New → Incomplete
David Henningsson (diwic) wrote :

Merged, but not yet uploaded.

Changed in pulseaudio (Ubuntu Precise):
status: Incomplete → Fix Committed
Changed in pulseaudio (Ubuntu Quantal):
status: Incomplete → Fix Committed
Luke Yelavich (themuso) wrote :

I uploaded this for precise and quantal, but have been asked to add a regression potential. Since I don't know enough about this bug fix to comment, could someone please add the required regression potential to the description to help with SRU verification etc.

Kaj Ailomaa (zequence) wrote :

I added a section on regression potential. Since I'm not that big of a coder, I can't really define the risk better than I did, but I hope that will do.

Thanks for the upload! Time for some testing then.

description: updated
description: updated
description: updated
description: updated

Hello Kaj, or anyone else affected,

Accepted pulseaudio into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/pulseaudio/1:2.1-0ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Hello Kaj, or anyone else affected,

Accepted pulseaudio into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/pulseaudio/1:1.1-0ubuntu15.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Kaj Ailomaa (zequence) on 2013-05-29
tags: added: verification-done
removed: verification-needed
Kaj Ailomaa (zequence) wrote :

Tested
1.1-0ubuntu15.3 in Precise
2.1-0ubuntu4.1 in Quantal
Works perfectly.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:1.1-0ubuntu15.3

---------------
pulseaudio (1:1.1-0ubuntu15.3) precise-proposed; urgency=low

  [ Kaj Ailomaa ]
  * 0127-reserve-card.patch:
    make pulseaudio let go of reserved cards when acquired by jack
    (LP: #1163638)
 -- Luke Yelavich <email address hidden> Thu, 23 May 2013 12:15:02 +1000

Changed in pulseaudio (Ubuntu Precise):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:2.1-0ubuntu4.1

---------------
pulseaudio (1:2.1-0ubuntu4.1) quantal-proposed; urgency=low

  [ Kaj Ailomaa ]
  * 0102-reserve-card.patch:
    make pulseaudio let go of reserved cards when acquired by jack
    (LP: #1163638)
 -- Luke Yelavich <email address hidden> Thu, 23 May 2013 11:51:56 +1000

Changed in pulseaudio (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.