[pulseaudio-discuss] dbus interface trouble
Chris Morgan
chmorgan at gmail.com
Thu Jun 25 12:02:05 PDT 2015
On Thu, Jun 25, 2015 at 2:04 PM, Chris Morgan <chmorgan at gmail.com> wrote:
> Hello.
>
> Pulseaudio 6.0 here.
>
> I was working on some code to interface to pulseaudio via module-dbus-protocol.
>
> Recently upgrading to F22 has broken the code I had working, it looks
> like org.PulseAudio.ServerLookup1 isn't present on the session bus. I
> did notice that there is now a separate slice where the pulseaudio
> server lives. Does anyone know how I'm supposed to reach this instance
> in order to find the pulseaudio dbus server?
>
> With the same code on an embedded system (built with yocto) I'm seeing
> the same thing, no org.PulseAudio.ServerLookup1, except I'm running
> the server as root.
>
> In both cases it looks like the dbus-protocol module is loaded:
>
> Module #11
> Name: module-dbus-protocol
> Argument:
> Usage counter: n/a
> Properties:
> module.author = "Tanu Kaskinen"
> module.description = "D-Bus interface"
> module.version = "6.0-dirty"
>
>
> I think I know why F22 isn't working with the F21 to F22 upgrade, but
> I'm not sure why the embedded Linux setup of the same thing isn't
> working.
>
> On the embedded side it looks like there is a socket file:
>
> ls /var/run/pulse/ -l
> srwxrwxrwx 1 pulse pulse 0 Jun 25 15:14 dbus-socket
> srwxrwxrwx 1 pulse pulse 0 Jun 25 15:14 native
> -rw------- 1 pulse pulse 4 Jun 25 15:14 pid
>
>
> Is there a different approach I should be taking to control volume
> externally? The source app is a node app so dbus made sense vs. some
> of the apparently unmaintained npm modules that could be used.
>
> Chris
Alright, so I think I must not have tested on the embedded side, or I
changed some configuration there.
It looks like I'm not seeing the dbus interface because of this code
in daemon/main.c:
if (!conf->system_instance) {
if ((server_lookup = pa_dbusobj_server_lookup_new(c))) {
if (!(lookup_service_bus = register_dbus_name(c, DBUS_BUS_SESSION,
"org.PulseAudio1")))
goto finish;
}
}
And because my /etc/pulse/daemon.conf contains:
system-instance = yes
How do I find the dbus bus address in the case where I don't have
org.PulseAudio1 to look it up from?
Even though this is an embedded system with a single instance of
pulseaudio, should I not be setting system-instance=yes? I tried but
it reported:
pulseaudio[10638]: W: [pulseaudio] main.c: This program is not
intended to be run as root (unless --system is specified).
Jun 25 19:00:39 localhost pulseaudio[10638]: W: [pulseaudio]
server-lookup.c: Unable to contact D-Bus:
org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon
autolaunch was disabled at compile time, set your
DBUS_SESSION_BUS_ADDRESS instead
Jun 25 19:00:39 localhost pulseaudio[10638]: W: [pulseaudio] main.c:
Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported:
Using X11 for dbus-daemon autolaunch was disabled at compile time, set
your DBUS_SESSION_BUS_ADDRESS instead
Chris
More information about the pulseaudio-discuss
mailing list