Ticket #135 (assigned enhancement)

Opened 1 year ago

Last modified 4 months ago

X11 connection is always opened

Reported by: timn Assigned to: lennart (accepted)
Priority: normal Milestone:
Component: libpulse Severity: normal
Keywords: Cc: kmeaw@kmeaw.com

Description

I installed PulseAudio on an old, small, fan-less x86 box that is close to the hi-fi system. On my home server I have a mpd installed that uses this audio sink box.

Now it always tries to open up a X11 connection as client. If I'm logged in such that the original display is available it will fail to play music just printing "X connection to localhost:11.0 broken (explicit kill or server shutdown)." or similar (DISPLAY variable may change) on the screen. Not that there is no local X installed on the box running the media player.

If I log out I can play music and get "E: client-conf-x11.c: XOpenDisplay() failed" in the log file. It seems that the client always tries to open an X11 connection, which is obviously not the right thing to do. At least there should be a configuration parameter in client.conf to turn this off. Also it should not abort at that point if it cannot open the X connection, but it should just try to play.

Doing an "unset DISPLAY" in the startup script just before mpd is started is a workaround.

Change History

10/09/07 20:45:11 changed by lennart

  • status changed from new to assigned.

Hmmm, if you set DISPLAY to a not existing display, I think it is only natural if the PA client fails to locate the proper PA server to use.

But you might be right, it might make sense to try other mechanisms for looking for a PA server, when the X11 configuration is borked.

03/28/08 19:58:46 changed by lennart

  • type changed from defect to enhancement.

05/05/08 12:32:34 changed by kmeaw

If -DHAVE_X11 is set, src/pulse/context.c calls pa_client_conf_from_x11. It reads DISPLAY and tries to retrieve pulse client configuration from the X11 root window. IMHO it shouldn't do it, if PULSE_SERVER environment variable is set, but currently it does.

05/05/08 12:32:56 changed by kmeaw

  • cc set to kmeaw@kmeaw.com.

05/05/08 22:56:24 changed by lennart

It's not that simple. PA also checks for the sink and source names to use by default. So even if you set $PULSE_SERVER it might still need to connect to X11 to look for $PULSE_SINK and $PULSE_SOURCE.