Bug 579

Summary: Pulseaudio produces only one sound output with multiple applications running
Product: Mageia Reporter: Dimitris Tsiamasiotis <dtsiamasiotis>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: balcaen.john, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: pulseaudio CVE:
Status comment:

Description Dimitris Tsiamasiotis 2011-03-28 20:19:55 CEST
Description of problem:
If you have pulseaudio enabled and start more than one sound applications, you hear sound only from one of them. With pulseaudio disabled this problem doesn't occur.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Have pulseaudio enabled in control center
2.Start one application that produces sound(i.e. a youtube video in firefox) and then start another one(i.e. a track in amarok). The second one doesn't output any sound.
3.


Reproducible: 

Steps to Reproduce:
Comment 1 John Balcaen 2011-05-06 02:16:02 CEST
It's probably related to flash in fact.
Could you reproduce when using for example amarok & dragon player ?

CC: (none) => balcaen.john

Comment 2 Ahmad Samir 2011-05-06 23:11:22 CEST
Attach to this report, the .txt file resulting from executing:
pacmd ls > /tmp/pacmd.txt

Keywords: (none) => NEEDINFO
Assignee: bugsquad => mageia
Source RPM: (none) => pulseaudio

Comment 3 Dimitris Tsiamasiotis 2011-05-08 15:44:54 CEST
I can reproduce it using amarok and vlc at the same time. Pacmd says "No PulseAudio daemon running, or not running as session daemon." . Pulseaudio is enabled in control center and when I start pulseaudio volume control it says "Establishing connection to Pulseaudio.Please wait..." and nothing happens.
Comment 4 Colin Guthrie 2011-05-09 11:03:22 CEST
(In reply to comment #3)
> I can reproduce it using amarok and vlc at the same time. Pacmd says "No
> PulseAudio daemon running, or not running as session daemon." . Pulseaudio is
> enabled in control center and when I start pulseaudio volume control it says
> "Establishing connection to Pulseaudio.Please wait..." and nothing happens.

How are you:
 a) running pavucontrol (as your user or as root?)
 b) checking for PA running (ps aux | grep pulse?)


When running applications and such like you should run them as the same user as is running PA.

Please provide the output of:
 1. ps aux | grep pulse
 2. PULSE_LOG=99 pactl stat

Thanks.
Comment 5 Dimitris Tsiamasiotis 2011-05-09 14:27:28 CEST
I run pavucontrol as a normal user. 

ps aux|grep pulse outputs this
dimitris 14238  0.0  0.0   4276   728 pts/1    S+   15:11   0:00 grep --color pulse

PULSE_LOG=99 pactl stat outputs this

Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
Trying to connect to /home/dimitris/.pulse/40ae0aa22e5ef2ea38eaad09000000b3-runtime/native...
connect(): No such file or directory (2)
Trying to connect to /home/dimitris/.pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
Trying to connect to tcp4:127.0.0.1...
connect(): Connection refused
Trying to connect to tcp6:[::1]...
connect(): Connection refused
Trying to autospawn...
D: caps.c: Cleaning up privileges.
Connection failure: Connection refused
Comment 6 Colin Guthrie 2011-05-09 18:25:46 CEST
This is very strange. It suggests that ~/.pulse/ folder (or perhaps the /tmp or $HOME/tmp) folder is cleaned out after you launch pulseaudio for the first time.

I suspect that /home/dimitris/.pulse/40ae0aa22e5ef2ea38eaad09000000b3-runtime exists and is a symbolic link pointing to a folder in ~/tmp (or - less likely - /tmp) that is ultimately cleaned by some other process/system somewhere.

I don't think this is a default thing to do, so it would be worth looking to see if this is some kind of housekeeping task that you perform manually or something?

But I suspect strongly that this is the issue at hand.
Comment 7 Dimitris Tsiamasiotis 2011-05-10 18:32:45 CEST
Colin you're right, I see a pulse-... folder in /tmp but it's empty and it shouldn't. I ran lsof to that folder but it returned nothing. Maybe those two files that are supposed to be found in that folder are never created?
Comment 8 Colin Guthrie 2011-05-10 19:03:32 CEST
I'm pretty sure that the files in that folder will have been created properly but subseuqently deleted.... the code in PA has to bind to the the socket file for the startup to succeed.

You can try:

 killall pulseaudio


and then it should autospawn again automatically (best to start it manually with start-pulseaudio-x11 too to set certain properties on the root X11 window...)

You need ot use the killall rather than the more graceful "pulseaudio -k" as the latter needs the socket to work to ask the daemon to exit gracefully!


This might recreate a different /tmp/pulse-* folder so make sure you check them all.

If this seems to work, then I think something else is to blame... perhaps msec cleaning out /tmp too rigorously or similar?

Out of curiosity is your home direction strange in any way? Normally $TMPDIR points to $HOME/tmp rather than /tmp. If NFS homedir then $TMPDIR is usually /tmp, so this could explain it but it would be nice to know why :)

Cheers
Comment 9 Dimitris Tsiamasiotis 2011-05-11 13:24:35 CEST
Pulseaudio was broken, so reinstalling it solved the problem. Colin thanks for your help.
Comment 10 Colin Guthrie 2011-05-11 13:29:06 CEST
Yes, just for the record, this was a problem related to (I think) the installer. Draksound was used before PA was installed and thus it did some things which ultimately created the default.pa file (and a few others) when it shouldn't. When pulseaudio was actually installed, these dummy (empty) files prevented the installation of default.pa properly and thus prevented PA starting up.

I need to look at draksound code to see if this can be made better/safer.
Comment 11 Marja Van Waes 2011-10-07 23:25:37 CEST
(In reply to comment #10)

> 
> I need to look at draksound code to see if this can be made better/safer.

@ Colin

Any news?

Keywords: NEEDINFO => (none)
CC: (none) => marja11

Comment 12 Colin Guthrie 2011-10-10 10:26:02 CEST
Oh sorry, I forgot to update this bug.

Yes I made several changes to draksound:
http://svnweb.mageia.org/soft/drakx/trunk/perl-install/harddrake/sound.pm?view=log

(commits 1380, 1381, 1384, 1385, 1386)

The actual fix to this problem was in 1384:
http://svnweb.mageia.org/soft/drakx/trunk/perl-install/harddrake/sound.pm?r1=1381&r2=1384

I think therefore this bug can be resolved.

Thanks for pinging me Marja :D

Status: NEW => RESOLVED
Resolution: (none) => FIXED