All of lore.kernel.org
 help / color / mirror / Atom feed
* git bluetoothd getting disconnected from dbus
@ 2020-05-10 18:06 Rafael Avila de Espindola
  2020-05-11 20:08 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael Avila de Espindola @ 2020-05-10 18:06 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

I compiled a new version of bluez to try help test an
issue
(https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/880), but
now bluetoothd is being disconnected from dbus.

This is on a fedora 32, so the dbus is actually
https://github.com/bus1/dbus-broker.

The bluz revision is 3146b7a0785758be2d4e894d44e99d29c0db983e.

The behavior is that I can start bluetoothd with

$ sudo ./src/bluetoothd -n --debug='*' -f ./src/main.conf

and pulse audio with

$ ./src/pulseaudio -p $(pwd)/src/ --daemonize=no -v -v -v

Everything looks fine until I turn on a bluetooth device that was
already paired and trusted. As far as I can tell, it connects correctly,
but then the bluetoothd log shows

May 10 10:18:41 raspberrypi.local bluetoothd[3127]: profiles/audio/transport.c:transport_update_playing() /org/bluez/hci0/dev_EC_81_93_4A_C7_7E/fd0 State=TRANSPORT_STATE_ACTIVE Playing=1
May 10 10:18:41 raspberrypi.local bluetoothd[3127]: Disconnected from D-Bus. Exiting.

I can't quite figure out what is going on, but dbus-monitor around the
time shows:

signal time=1589131121.073746 sender=org.freedesktop.DBus -> destination=:1.65 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string "org.bluez"
signal time=1589131121.073832 sender=org.freedesktop.DBus -> destination=(null destination) serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string "org.bluez"
   string ":1.65"
   string ""

Which is suspicious. I have attached the full logs starting just before
the bluetooth speaker is turned on.

What I have checked so far

* I removed the system bluez and pulse audio
* I checked that ./src/bluetooth.conf has been copied to /etc/dbus-1/system.d/bluetooth.conf

Any suggestions as to where I should look next?

Thanks,
Rafael



[-- Attachment #2: journalctl.log.gz --]
[-- Type: application/gzip, Size: 3468 bytes --]

[-- Attachment #3: dbus.log.gz --]
[-- Type: application/gzip, Size: 3011 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git bluetoothd getting disconnected from dbus
  2020-05-10 18:06 git bluetoothd getting disconnected from dbus Rafael Avila de Espindola
@ 2020-05-11 20:08 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2020-05-11 20:08 UTC (permalink / raw)
  To: Rafael Avila de Espindola; +Cc: linux-bluetooth@vger.kernel.org

Hi Rafael,

On Sun, May 10, 2020 at 11:11 AM Rafael Avila de Espindola
<rafael@espindo.la> wrote:
>
> I compiled a new version of bluez to try help test an
> issue
> (https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/880), but
> now bluetoothd is being disconnected from dbus.
>
> This is on a fedora 32, so the dbus is actually
> https://github.com/bus1/dbus-broker.
>
> The bluz revision is 3146b7a0785758be2d4e894d44e99d29c0db983e.
>
> The behavior is that I can start bluetoothd with
>
> $ sudo ./src/bluetoothd -n --debug='*' -f ./src/main.conf
>
> and pulse audio with
>
> $ ./src/pulseaudio -p $(pwd)/src/ --daemonize=no -v -v -v
>
> Everything looks fine until I turn on a bluetooth device that was
> already paired and trusted. As far as I can tell, it connects correctly,
> but then the bluetoothd log shows
>
> May 10 10:18:41 raspberrypi.local bluetoothd[3127]: profiles/audio/transport.c:transport_update_playing() /org/bluez/hci0/dev_EC_81_93_4A_C7_7E/fd0 State=TRANSPORT_STATE_ACTIVE Playing=1
> May 10 10:18:41 raspberrypi.local bluetoothd[3127]: Disconnected from D-Bus. Exiting.

I suspect this is due to fd hand over, I usually have to
SELINUX=disabled to disable SELinux policies when running bluetoothd
from source because it seems there is some policy the prevents fd
passing over D-Bus,  we should probably add this to HACKING if we
confirm that this is in fact SELinux policy.

> I can't quite figure out what is going on, but dbus-monitor around the
> time shows:
>
> signal time=1589131121.073746 sender=org.freedesktop.DBus -> destination=:1.65 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
>    string "org.bluez"
> signal time=1589131121.073832 sender=org.freedesktop.DBus -> destination=(null destination) serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
>    string "org.bluez"
>    string ":1.65"
>    string ""
>
> Which is suspicious. I have attached the full logs starting just before
> the bluetooth speaker is turned on.
>
> What I have checked so far
>
> * I removed the system bluez and pulse audio
> * I checked that ./src/bluetooth.conf has been copied to /etc/dbus-1/system.d/bluetooth.conf
>
> Any suggestions as to where I should look next?
>
> Thanks,
> Rafael
>
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-11 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-10 18:06 git bluetoothd getting disconnected from dbus Rafael Avila de Espindola
2020-05-11 20:08 ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.