GNOME Bugzilla – Bug 564311
"Connection failed" when PA drops off
Last modified: 2010-01-05 16:27:58 UTC
If PA crashes (as it did on my machine), then the applet is unusable. It should retry connecting, and at least show through its interface that the connection has been broken.
A probably related case: my pulse audio is started by gnome-session and it looks like pulse is not entirely "up" when gnome-volume-control-applet is started, so it does not see any sound hardware. In this case, I do not see any tray icon. I have to kill the applet process and start it again to get the tray icon to show up. So it would be nice if the running applet would detect new sound hardware that becomes available in pulse.
What Michael describes seems to be happening to Ubuntu users too. The applet and Pulseaudio are both started in the same phase but Pulseaudio is not fully up by the time the applet loads.
I've experienced this issue using Fedora rawhide, as well. If I restart pulseaudio, the volume control applet no longer does anything. Any changes made to it are not kept, and it does not affect the volume at all.
There is a new flag NOFAIL that will wait in connecting state until PulseAudio comes up on one of the buses. However, the dialog would be insensitive during that time: is it really what we want?
(In reply to comment #4) > There is a new flag NOFAIL that will wait in connecting state until PulseAudio > comes up on one of the buses. > > However, the dialog would be insensitive during that time: is it really what we > want? That's not the problem. The volume applet had start ordering problems, and should work just fine waiting for PA to show up the first time. That should already have been fixed. The problem is when PA goes away once we've connected once. The other problems mentioned have nothing to do with this particular problem, and should be filed separately if they still occur.
I misunderstood what the NOFAIL flag was all about. Here's what Lennart told me: <mezcalero> hadess: the idea is to create a pa_contex with NOFAIL set <mezcalero> that way you get a pa_context that won't return "connection refused" when pa is not running instead it will just sit there and waituntil pa is started up and then when it is started it will connect and proceed normally and when pa dies you should free the context and create a new context with NOFAIL and again it will just sit there and when pa becomes available again it will do the connection and so on <mezcalero> hadess: i guess i don't have to mention that freeing the pa_context makes all pa_stream and other objects created from that invalid... Quite a bit of work...
Created attachment 136585 [details] [review] Bug 564311 – "Connection failed" when PA drops off
If you stress-test PulseAudio start/kill, you can notice that client side can get stuck in connect(): Resource temporarily unavailable (11). Lennart said it is supposed to be handled correctly by pulse (client side). PULSE_LOG=5 src/gnome-volume-control-applet also, this code doing NOFAIL is sub-optimal apparently, I wonder who did it... hum!
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
*** Bug 587231 has been marked as a duplicate of this bug. ***