All apps become mute when certain apps are opened.

Bug #1325752 reported by Valentin Crone
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

Hello,
I have a problem with PulseAudio on Ubuntu 14.04 LTS. (This problem is not present for Ubuntu 12.04 LTS)

If you start a music, for example with VLC, a mp4 or a flac (or all others files), or a video on Youtube with the Adobe flash player, or all program who use PulseAudio.

If you start a program like Musescore or Mixxx, all others programs become mute. It's a bug, because the volume indicate the program have a volume of 100% but no sound.

If you exit Musescore or Mixxx, you can ear all others programs again. (Instantly)

On Ubuntu 14.04 LTS the bugs is produced each time.
If you use pavucontrol, you can see the volume of VLC or others apps freezed when Musescore is opened.

I haven't tested Mixxx on Ubuntu 12.04 LTS so I can't compare, but for Musescore it's certain that the problem had appear on Ubuntu 14.04 LTS.

(I have installed all updates, and I use only apps on the official repository of Ubuntu)

Version: pulseaudio 4.0
Thank you.
---
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: valentin 29817 F.... pulseaudio
 /dev/snd/pcmC1D0p: valentin 29817 F...m pulseaudio
 /dev/snd/controlC2: valentin 29817 F.... pulseaudio
 /dev/snd/controlC0: valentin 29817 F.... pulseaudio
DistroRelease: Ubuntu 14.04
InstallationDate: Installed on 2014-03-28 (65 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Beta amd64 (20140326)
NonfreeKernelModules: nvidia
Package: pulseaudio 1:4.0-0ubuntu11
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=fr_FR
 TERM=xterm
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.13.0-19.40-generic 3.13.6
PulseList:
 Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied
 No PulseAudio daemon running, or not running as session daemon.
Tags: trusty
Uname: Linux 3.13.0-19-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 01/20/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0806
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: H87-PLUS
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0806:bd01/20/2014:svnASUS:pnAllSeries:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnH87-PLUS:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: All Series
dmi.product.version: System Version
dmi.sys.vendor: ASUS

Revision history for this message
Valentin Crone (va-crone) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected trusty
description: updated
Revision history for this message
Valentin Crone (va-crone) wrote : BootDmesg.txt

apport information

Revision history for this message
Valentin Crone (va-crone) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Valentin Crone (va-crone) wrote : Dependencies.txt

apport information

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

Have you changed the settings on these programs? I don't have mixxx installed (studio doesn't install it by default) but I can run a youtube video and then start Musescore and hit play and it will play along with the video. Musescore seems to come with IO set to portaudio with the API set to alsa and the device set to "default" ( the default alsa device is PulseAudio unless you have changed that). I am not sure what mixxx would do with that.

Revision history for this message
Valentin Crone (va-crone) wrote :

Hello,
I use all defaults settings.
And I have just installed Musescore and have this bug immediately.

When I quit musescore, I have like a lag and the sound of others apps I here again.

On my screenshot, the music is playing in VLC.
I have opened pavucontrol, I see the volume of VLC move with the music.

But, when I open musescore, the volume is in pavucontrol is freezed, and I ear no sound of all others apps (same for notification sounds of Ubuntu)

When I quit musescore, the sound lag 1s and it can be ear again for all apps, the volume in pavucontrol move a with the music again.

I can test with others computer to test, but on the same computer I have try with my 2 sound cards and same if VLC use one card, and Musescore the other card, the problem persist.

Revision history for this message
Valentin Crone (va-crone) wrote :

Other attachement:
VLC without Musescore

Revision history for this message
Valentin Crone (va-crone) wrote :

My config of musescore:

Revision history for this message
Valentin Crone (va-crone) wrote :

My config of VLC:
(But, I precise, it's not a problem of VLC because all applications become mute if Musescore is opened)

Other problem: On Ubuntu 12.04 LTS, I can play sheets in musescore, on Ubuntu 14.04 LTS, Musescore will not read notes.
I suppose it's a problem between Musescore and it's configuration for the sound server. (Or a bug)

Verify that the config is correct, but with the config by default, or with this config, I problem persist.
Thank you :)

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

I installed both vlc and mixxx.
I can run a video on vlc, a youtube video and musescore all at the same time. My musescore is the same (or works when set the same). Anyway all three run. The audio from all three mix. SO far so good.

Now start mixxx... I already have jackdbus running and use jacksink as my pulse backend/device :) I know not very stock. Anyway, mixxx pretty much kills all the pulse sound. OK, mixxx is using jack directly and not trying to go through pulse audio at all. Pulse just looks like any other jack client and so the next thing is to try mixxx with another jack client... Hydrogen is handy and is not stopped by mixxx. Hmm. OK, lets see if /usr/bin/mixxx is a script that maybe runs pasuspender... No it is a binary.

I would still say the problem is with Mixxx. I suspect (but don't know how to find out) that mixxx sends a suspend to pulseaudio when it attempts to get it's output set up... Either start jack or grab the alsa port... unfortunately it does not let go of it after it has gotten it's port (as it should... at least jackdbus does so)

affects: pulseaudio (Ubuntu) → mixxx
affects: mixxx → mixxx (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mixxx (Ubuntu):
status: New → Confirmed
Revision history for this message
Valentin Crone (va-crone) wrote :

Hum, I have in priority repported the bug for pulseaudio and musescore.
Look, I use kazam (beautiful version of this app for Ubuntu 14.04 LTS :) ) to show the bug in screencast.

On the vidéo, you can see musescore be immediately closed, but it's not that, look the timer on VLC, the time move in the future.

In reality: I have start the screencast, and when I opened musescore, the sound was mute.
In pavu control, I have say the sound appears to be freezed.

So, kazam is freezed when musescore is opened, because he will record the sound and the sound is freezed.

To test, I had take several screencast.
I have uploaded 2 screencast.
On the 2 screencast I do the same thing, but, on the first Kazam record the sound, on the second Kazam doesn't record the sound.

You can show that Kazam is freezed when he record the sound when musescore or mixxx is opened. (on the vidéo, it's like the video was cut)
And when he doesn't record the sound, you can show all the screencast.

Theses screencast are the demonstration of the bug ;)

With sound recording, first screencast: http://dl.smglive.org/Crone123/PulseAudio/With-Sound.mp4
Without sound recording, second screencast: dl.smglive.org/Crone123/PulseAudio/Without-Sound.mp4

I think the bug affect Pulseaudio and not only mixxx/musescore ;)

Revision history for this message
jus (jus) wrote :

Mixxx suspends pulseaudio when started from the Mixxx .desktop (Mixxx shortcut) file.
More @ http://mixxx.org/forums/viewtopic.php?f=3&t=6368&p=22023&hilit=pasuspender#p22023

Revision history for this message
Valentin Crone (va-crone) wrote :

OK, but the problem is not for Mixxx because if mix is opened Mixxx can play it's musics.

 The problem is for Musescore, on Ubuntu 12.04 I have not this problem, but I have on Ubuntu 14.04 LTS and Musescore is mute like others apps.
- The sound (pulseaudio) of my computer is unusable
- Musescore is unusable.

Please look for Musescore and pulseaudio on Ubuntu 14.04 LTS. I use default settings (ALSA -> pulse) for Musescore

And, why the bug was attached to mixxx? Mixxx is an example of program who mute all others apps, but the real problem is for Musescore/Pulseaudio on Ubuntu 14.04 LTS.
Thank you

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

pulseaudio releasing a device because it is asked to do so, is not a bug. That is, it seems pulseaudio is acting correctly, if an application wants direct access to the audio device, Pulseaudio must give it up. There can be only one one application attached to an ALSA device at a time. The idea of pulseaudio (and other audio backends) was to get around that by adding a mixer with psuedo alsa ports. This allows more than one application to think it has access to a sound card. However, there are some kinds of applications that need direct access to an audio device to be useful. In order to accomodate these applications pulseaudio has a command to release the device or pause itself so that this application can run. When this happens all applications that are using pulseaudio to play sound will stop (in various ways). This is not a bug, but a nessessary feature needed for pulse to exist in the (semi)pro audio world.

My reason for attaching the bug to mixxx is that this is the only place I can reproduce it. And it tells me that Mixxx is using the pause pulseaudio command incorrectly. It should not pause pulse when it is not using an alsa device or starting jackd on it's own and it does. This is a bug because mixxx suggests that it can be used for Internet radio and one of the most common things done on radio is to take phone calls to air... on a computer that generally means Skype for a lot of people. Skype needs pulse to work and can be bridged to jackd(bus) but not with pulse paused.

I will look more closely at musescore and see if it does the same thing without using jack as my audio device.

Revision history for this message
Valentin Crone (va-crone) wrote :

Hello,
I have good news.
I have found what is the problem with musescore and pulseaudio (I have check the terminal)

It's not a problem of pulseaudio, and not a problem of musescore.
It's just a dependency problem of the package musescore
To work with pulseaudio, musescore require "gawk", and "gawk" is not installed by default.

After installing gawk, musescore say:
"PulseAudio found, but no need to suspend. Starting mscore.real..."

To prevent crash of musescore, we must delete his configuration: ~/.cache/MusE

So, start Musescore, VLC continue to play, and if you have no sound in musescore, go to Préférences and set:

→ Use internal synth
→Portaudio
API: ALSA : pulse

Apply, and now you have sound, just adjust the volume in musescore with the little dedicated window.

Screencast of my test: http://dl.smglive.org/Crone123/PulseAudio/work.mp4 (the bug with Unity in the video is only in the video, it's a problem with Kazam when recording a screencast with 30fps)

So, to fix the bug with musescore, just add gawk as dependency of musescore and set the settings "Portaudio", "ALSA", "pulse" by default in musescore.

For mixxx it's not a solution. Why mixxx doesn't use the standard sound server like all others programs?
(But, I not really use mixxx, I use Musescore for my partitions and I have just seen the problem with mixx because I have tested one time)

Thank you :)

Revision history for this message
Joan CiberSheep (cibersheep) wrote :

This is not abug (even I found it a bit annoying).
Mixx stops PulseAudio to get full control of sound. The only solutoin I found to make all sound at the same time is get all sound go through Jack.
Can't remember where I found how to do it but you can start:

 http://docs.fedoraproject.org/en-US/Fedora/16/html/Musicians_Guide/sect-Musicians_Guide-Integrating_PulseAudio_with_JACK.html

 https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_through_JACK

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hi -- to repeat what Jus said in #13 -- the Mixxx desktop shortcut runs:

$ pasuspender mixxx

Mixxx itself does not suspend Pulse. This is a workaround because pulse does not support low-latency audio well and pulse also claims the user's audio devices. I presume Pulse has improved in the 4 years since we added this -- if it has we can remove this in our next release.

A workaround for users affected by this: Run Mixxx from a terminal or by pressing Alt + F2 and typing mixxx in the box. This runs Mixxx without changing Pulse at all.

Revision history for this message
Owen Williams (ywwg) wrote :

It should not be necessary to run pasuspender. Pulseaudio releases its audio device following a short delay (5 sec?) after the last application using pulse stops producing sound. So, for instance, if I am playing a youtube video and run Mixxx, I will notice that my sound card is not available. If I close the tab with the video, wait a few seconds, and then Query Devices, my sound card appears and I can select it (no need to restart Mixxx!).

I think we should work on a feature to detect when pulseaudio has grabbed devices and show a warning, like "PulseAudio is using device [XXXX], please close [list of applications using pulse?] to allow Mixxx to access it."

Revision history for this message
Owen Williams (ywwg) wrote :

"stops producing sound" is often accurate. Sometimes just pausing a media player is enough for pulse to release the device. But not always -- it depends on the player.

Mathew Hodson (mhodson)
tags: added: amd64
removed: bug mute
Revision history for this message
sandro dentella (sandro-e-den) wrote :

I had the same problem and following #16 from Valentin I solved it. Thanks.

In my case I did have gawk but the preferences where set on 'sourrounding51' rather than 'pulse'.

Revision history for this message
Chloé AVRILLON (chloe-avrillon) wrote :

Simpler :
Try to open a video in your webbrowser (tested with firefox and chrome, ubuntu 15.04) and have Mixxx in the same time. cheers

Revision history for this message
elatllat (elatllat) wrote :

Similar issue for festival and VLC on Ubuntu 18.04

echo "You will not hear this if VLC is playing" | festival --tts

Revision history for this message
elatllat (elatllat) wrote :

OK, now I can't reproduce this. I'll look for other variables...

Revision history for this message
Logan John (logan-2k6) wrote :

i have similar issues with multiple apps.
First let me say that im using mint 19 witch is base on ubuntu 18.04. I know its not the same.
The issue is youtube (firefox - which use pulseaudio now) freeze when:
- wine game starts
- skype when calls are made. i'll have to try and see if this happens also during calls.
- open the sound controller (not pavucontrol)
- launching genymotion emulators

The situation seems to be less present in pulseaudio 12.2 and much stable than v11.x
But the general idea is simple: when two programs use pulse one will freeze for a short period of time before the app starts.
Also sometimes after the freeze is gone the sound is distorted (i don't know the exact word).
Sometimes pulse will revert from 7.1 to stereo and sound app will only show Analog Stereo Input and Analog Mono Input. Yes INPUT.
The solution to make the sound app to show the normval options is to select digital output and back to analog output
This is very very very very very very annoying. I've reach this page while searching google. I've noticed this freeze issue is quite old.

After i've read some "comments" and with my very little knowledge of linux in general i've came to wonder: why does pulseaudio even exists if it fails to do the most important thing: to allow more programs to use same device simultaneously?
I had no issue with alsa being use by more then 1 program. but since pulse started to grow in this present ugly thing, more and more programs also remove alsa support and move to pulseaudio only.
I have so many issues with pulseaudio now but the problem is i can't disable it without losing sound in some programs.
The sound app that comes with linuxmint is unable to unmoute the center/lfe channel since i've started to use mint (v15).
But if i remember correctly ubuntu was also unable to unmute center/lfe channel a long time ago.
i have to go alsaamixer and unmute it.

My audio card is creative x-fi fatality pro.

P.S: i'm mostly venting here after so many problems with pulse over so many years. Probably its not even ubuntu/mint problem/bug

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The issue can be visualized like this

sound hardware
 |
Alsa (only one client allowed)
 | | | L---Mixxx
 | | L-----Skype
 | L-------dmix
 |
pulse audio server
| | L---- Firefox
| L------ Clementine
L-------- pulse alsa bridge

The issue is that Alsa only allows one device at a time. Pulseaudio solves this, unfortunately not all applications have native pulsaudio output. Some are just two old, using the cross platform portaudio wrapper or just need direct hardware access for low latency.

There are two workarounds:

Installing dmix, which pretends exclusive alsa access but actually mixes the samples from mutable applications. https://ubuntuforums.org/showthread.php?t=1889375

Using the "pulse" alsa fake device, which pretends to be an alsa soundcard but actual passes the samples to the pulse audio server.

Revision history for this message
Logan John (logan-2k6) wrote :

skype is with pulseaudio.
firefox also with pulseaudio
So far all apps that conflict with each other use pulseaudio. Unfortunately my test is based on firefox cause its always playing youtube in background.
So why 2 applications conflicts with each other while trying to use pulse
Also, if dmix can do what pulse is suppose to do then why people created pulse?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

@27:
pulse has a ton more features than dmix, which is why most distros use it

If all of your apps are using pulseaudio then they shouldn't conflict with each other. This suggests there is a rogue app running pasuspender or somesuch (for example, the Mixxx desktop icon uses pasuspender by default, so this will conflict with everything. If you run mixxx from a terminal then it will not).

Revision history for this message
Be (be.ing) wrote :
affects: mixxx (Ubuntu) → ubuntu
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.