batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
1.9k stars 491 forks source link

No dbus bluetooth.conf file #12076

Closed samyeda closed 1 month ago

samyeda commented 1 month ago

Batocera build version

v40

Your architecture

Khadas VIM4

Your Graphic Processor Unit(s) (GPU)

Integrated

Issue description

After a clean build, the target does not contain /etc/dbus-1/system.d/bluetooth.conf leading to bluetooth-agent failure

Detailed reproduction steps

make a3gen2-cleanbuild

Details of any attempts to fix this yourself

No response

Details of any modifications you have made to Batocera.

Added the /etc/dbus-1/system.d/bluetooth.conf from v39 to board/batocera/amlogic/a3gen2/fsoverlay/etc/dbus-1/system.d/ and rebuilt the target. This is not the right way but needed this file to test the VIM4 Bluetooth fix for which I will be creating a PR.

Logs and data

Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 177, in activate_name_owner return self.get_name_owner(bus_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 361, in get_name_owner return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 652, in call_blocking reply_message = self.send_message_with_reply_and_block( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.bluez': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/batocera-bluetooth-agent", line 491, in obj = bus.get_object("org.bluez", "/org/bluez") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 241, in get_object return self.ProxyObjectClass(self, bus_name, object_path, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/proxies.py", line 250, in init self._named_service = conn.activate_name_owner(bus_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 182, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python3.11/site-packages/dbus/bus.py", line 277, in start_service_by_name OK return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 652, in call_blocking reply_message = self.send_message_with_reply_and_block( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

No response

samyeda commented 1 month ago

I think the option --disable-datafiles introduced in https://github.com/batocera-linux/buildroot/commit/67fab86a0a77010c1602f340996541f1349c0812 prevents bluez5-utils from installing bluetooth.conf

dmanlfc commented 1 month ago

i assume this is closed from the PR which I accepted which added hciattach to load the bt firmware for the service etc.

samyeda commented 1 month ago

They are separate issues but both are needed for successful Bluetooth operation. The PR makes the builtin Bluetooth adapter available for the batocera-bluetooth-agent to use. However batocera-bluetooth-agent is failing because the 'org.bluez' is not registered with dbus. My temporary workaround is to copy the 'bluetooth.conf' from bluez5-util package to the /etc/dbus-1/system.d/

My guess is this issue may be affecting all boards Bluetooth operation

The permanent fix can be to add the 'bluetooth.conf' to board/batocera/fsoverlay/etc//dbus-1/system.d/

dmanlfc commented 1 month ago

other boards are working fine...

dmanlfc commented 1 month ago

ok @samyeda rebase & rebuild the board or package. you may need to delete the /etc/bluetooth directory in you host folder if dirty building.

samyeda commented 1 month ago

@dmanlfc I can confirm that with 3b332c4, dbus bluetooth.conf is now installed. Verified with dirty and full build.

Appreciate you looking into this and prompt resolution.

This can be closed.