[pulseaudio-tickets] [PulseAudio] #785: No or only random connections to PulseAudio server after `pulseaudio -k`.

PulseAudio trac-noreply at tango.0pointer.de
Tue Feb 2 05:31:14 PST 2010


#785: No or only random connections to PulseAudio server after `pulseaudio -k`.
--------------------------+-------------------------------------------------
  Reporter:  PaulePanter  |       Owner:  lennart
      Type:  defect       |      Status:  closed 
 Milestone:               |   Component:  daemon 
Resolution:  invalid      |    Keywords:         
--------------------------+-------------------------------------------------
Changes (by PaulePanter):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Replying to [comment:3 coling]:
 > Replying to [comment:2 PaulePanter]:
 > > Replying to [comment:1 coling]:

 […]

 > > > Both methods should fix up the X11 settings that the client uses
 when connecting... Not certain this is the problem, but I suspect it's
 something in this area.
 > >
 > > I think you were spot on and probably the instructions in the Wiki
 should be changed on how to start a PA server with a X server running.
 >
 > There is not much to tell here. I think you've managed to over analyse
 the problem somewhat by not doing pax11publish -r at the beginning as I
 suggested and then didn't really appreciate what all the various scripts
 etc were meant to do and where the x11 modules should be used.

 Thank you for your detailed response.

 > I guess it's valid to put this info on the Wiki, but it's not
 information you generally want regular users to see as a first port of
 call. 99.99% of users wont care or want to know about this. It's only when
 you get into problems and fiddle with configurations that you get into
 this situation.

 I meant the Wiki pages like [Wiki:Troubleshooting],
 [Wiki:Community#BugsPatchesTranslations Community] or on debugging where
 you are told to
 [http://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems#General_advice
 kill the PA server]. But it looks like that will not be necessary, because
 I think it is working and it was an error on my side.

 > So what I would do is this:
 >  1. Make sure your default.pa and daemon.conf are pristine and what we
 ship. Do not try to load X11 modules in there.

 No X11 modules are loaded from there and I never changed it, so they are
 pristine.

 >  2. Boot up normally.
 >  3. Before issuing your first pulseaudio -k, check {{{xprop -root | grep
 PULSE}}} to see what the values are and ensure that a socket path is
 indeed present, not just a hostname.

 As before everything is set. My problem was just that it did not work
 after killing the PA server to debug ticket:758.

 {{{
 $ xprop -root | grep PULSE
 PULSE_COOKIE(STRING) =
 "aa0cf9aa0ba2703f23be6741b64a9521bc460d6943b03c878fba145ce8823ff46253a04361b89cffd1a339293f09d1ae446297ca43129d58214f27e3acd54d643803da7cf9aca2455fac684f2323856b10d76186cdbbca8942e12d0c0f64f5202ac1d15714f6afc6335d6b3853ffe1024f1422e1d0390a44c4da8e4b02e56e270a23e4f0e95504cd22a1c0c080c01b9f3f7de653c8e5d25d0308e46d24439b66a5bc9363830eb8fe0b8e4e57483427437307e864528ea304d0f5f6c382e4113b7bed540371170ec1dab36f1d75dce14671c4a69871d8af336c47b1c1a0822a9d7066507aff52de158b7b796afcde280919a0dbce5a69fbc40cbc87d43edf1c20"
 PULSE_SERVER(STRING) =
 "{1572dc2ca76ca04c3351599547f539a6}unix:/home/joe/.pulse/1572dc2ca76ca04c3351599547f539a6-runtime/native"
 PULSE_SESSION_ID(STRING) =
 "1572dc2ca76ca04c3351599547f539a6-1265045213.7191-1110412686"
 PULSE_ID(STRING) = "1000 at 1572dc2ca76ca04c3351599547f539a6/3617"
 }}}

 >  4. Issue pulseaudio -k, pulseaudio -vvvv
 >  5. Things should still work (the socket path shouldn't change when
 stopping and restarting the PA server. If it does then this is where your
 problem lies).

 What?! Things are working now. But I am sure they did not when I tried it
 last time. Especially since I did not know about all those scripts/options
 before.

 The credentials for X server are also removed. (That is the same behavior
 as before.)

 {{{
 $ xprop -root | grep PULSE
 $
 }}}

 I think I know where I screwed up. I had `default-server=localhost:30002`
 set in `~/.pulse/client.conf` which I think was added by
 [http://www.x2go.org/ X2go client] for PA playback when I tried this
 feature. (I did not run a X2go client or a X2go session when having this
 problem and debugging it.) So that might be the reason why it did not work
 out in the beginning (initial post) and it could not connect. But I
 removed that line after seeing it with `pax11publish -d` and then I did
 not try to test again if it worked and only looked if the X11 credentials
 were set with `xprop -root | grep ^PULSE_` and ran `pax11publish -e` right
 after that. That was my error. I made the false assumption that those
 values have to be set. But that is not the case. The application’s PA
 plugin can find the PA server automatically. Sorry for that!

 >  6. If things do not work, issue {{{pax11publish -r}}} to *remove* the
 X11 properties. Confirm with xprop command.
 >  7. Do things work now?

 Sorry for not following your first suggestion. It made absolutely no sense
 to me that I should remove those credentials because `xprop -root | grep
 ^PULSE_` did not return anything before. That was my other false
 assumption that you meant to publish the X11 credentials with `-e` which
 does not seem to work correctly locally.

 >  8. If things do not work, try {{{start-pulseaudio-x11}}} (keeping the
 dameon running under -vvvv in your other terminal). The first time this
 script is run it should *not* produce any errors. Do things work now? If
 so, then the problem is very likely in your client.conf file (either
 /etc/pulse/client.conf or ~/.pulse/client.conf). It likely has a default-
 server specified. Under normal circumstances the X11 properties will take
 configuration precedence as part of a regular login. When you issue
 {{{pulseaudio -k}}} these properties will be deleted by the x11-publish
 module when it unloads. When you run {{{pulseaudio -vvvv}}} the properties
 will not be set (as expected) and as such we will fall back to the default
 case (check env vars, x11 props, client.conf then built in defaults). The
 built in defaults should work, but I'm guessing it's getting tripped up at
 the client.conf stage.

 You are spot on again. I screwed this all up by running `pax11publish -e`
 before.

 > I hope that make sense. It's long winded I appreciate and the
 configuration steps are a little confusing to get your head round. I wrote
 all this up here:
 > http://colin.guthr.ie/2009/08/sound-on-linux-is-confusing-defuzzing-
 part-2-pulseaudio/

 Nice post. Maybe this should be linked from somewhere.


 Thank you for your tremendous help everyone and sorry for all this and
 your time. I am closing this ticket as invalid.

 One last question. Should I open a separate ticket regarding
 `pax11publish` for a local PA server?

-- 
Ticket URL: <http://pulseaudio.org/ticket/785#comment:4>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list