Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] Enable D-Bus activation of bluetooth.service
@ 2026-09-11 21:32 Grant Moyer
  2026-09-11 21:32 ` [PATCH BlueZ 1/1] org.bluez.service: enable " Grant Moyer
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Moyer @ 2026-09-11 21:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Grant Moyer

D-Bus can automatically launch programs on demand when a message is sent to their bus name. Bluez provides src/org.bluez.service for this purpose, but it writes "dbus-org.bluez.service" for the Systemd service name, while the Systemd service is actually named bluetooth.service (generated from src/bluetooth.service.in). The Systemd service defines an alias named dbus-org.bluez.service, but Systemd aliases only come into effect once a unit is enabled.

Effectively, this means that instead of launching bluetoothd on demand whenever it's requested, D-Bus activation is only used if the service is enabled but happens to not be running, such as the first time it's enabled or if it crashes.

Grant Moyer (1):
  org.bluez.service: enable D-Bus activation of bluetooth.service

 src/org.bluez.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 61a2b3d93897b04fb921a4fb229c0831d13807a8
-- 
2.55.0


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

* [PATCH BlueZ 1/1] org.bluez.service: enable D-Bus activation of bluetooth.service
  2026-09-11 21:32 [PATCH BlueZ 0/1] Enable D-Bus activation of bluetooth.service Grant Moyer
@ 2026-09-11 21:32 ` Grant Moyer
  2026-09-11 22:16   ` Bastien Nocera
  2026-09-11 23:56   ` Enable " bluez.test.bot
  0 siblings, 2 replies; 4+ messages in thread
From: Grant Moyer @ 2026-09-11 21:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Grant Moyer

D-Bus was configured to activate dbus-org.bluez.service, which is only
an alias for bluetooth.service, and so isn't resolvable unless the
service is already enabled. This means D-Bus cannot launch bluetoothd
on demand in most cases (for example when running bluetootctl without
the bluetoothd systemd unit configured to run at startup). This changes
the D-Bus configuration to activate bluetooth.service itself, so that
bluetoothd can be launched by D-Bus on demand.
---
 src/org.bluez.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/org.bluez.service b/src/org.bluez.service
index dd7ae8f1c..2a3b05758 100644
--- a/src/org.bluez.service
+++ b/src/org.bluez.service
@@ -2,4 +2,4 @@
 Name=org.bluez
 Exec=/bin/false
 User=root
-SystemdService=dbus-org.bluez.service
+SystemdService=bluetooth.service
-- 
2.55.0


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

* Re: [PATCH BlueZ 1/1] org.bluez.service: enable D-Bus activation of bluetooth.service
  2026-09-11 21:32 ` [PATCH BlueZ 1/1] org.bluez.service: enable " Grant Moyer
@ 2026-09-11 22:16   ` Bastien Nocera
  2026-09-11 23:56   ` Enable " bluez.test.bot
  1 sibling, 0 replies; 4+ messages in thread
From: Bastien Nocera @ 2026-09-11 22:16 UTC (permalink / raw)
  To: Grant Moyer, linux-bluetooth

On Fri, 2026-09-11 at 17:32 -0400, Grant Moyer wrote:
> D-Bus was configured to activate dbus-org.bluez.service, which is
> only
> an alias for bluetooth.service, and so isn't resolvable unless the
> service is already enabled. This means D-Bus cannot launch bluetoothd
> on demand in most cases (for example when running bluetootctl without
> the bluetoothd systemd unit configured to run at startup). This
> changes
> the D-Bus configuration to activate bluetooth.service itself, so that
> bluetoothd can be launched by D-Bus on demand.

Which would mean that bluetoothd would get started on system where it
is disabled, but somebody runs bluetoothctl as you mention?

Then that's a no. We do not want bluetoothd to get started unless the
system configuration says that bluetooth.service is enabled. Otherwise
it effectively makes it impossible to disable bluez without
uninstalling bluez, which is very very complicated for integrated
desktops.

> ---
>  src/org.bluez.service | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/org.bluez.service b/src/org.bluez.service
> index dd7ae8f1c..2a3b05758 100644
> --- a/src/org.bluez.service
> +++ b/src/org.bluez.service
> @@ -2,4 +2,4 @@
>  Name=org.bluez
>  Exec=/bin/false
>  User=root
> -SystemdService=dbus-org.bluez.service
> +SystemdService=bluetooth.service


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

* RE: Enable D-Bus activation of bluetooth.service
  2026-09-11 21:32 ` [PATCH BlueZ 1/1] org.bluez.service: enable " Grant Moyer
  2026-09-11 22:16   ` Bastien Nocera
@ 2026-09-11 23:56   ` bluez.test.bot
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-09-11 23:56 UTC (permalink / raw)
  To: linux-bluetooth, dev

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

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1163256/

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       PASS      0.32 seconds
BuildEll                      PASS      20.00 seconds
BluezMake                     PASS      380.72 seconds
CheckSmatch                   PASS      296.26 seconds
bluezmakeextell               PASS      95.41 seconds
IncrementalBuild              PASS      383.42 seconds
ScanBuild                     PASS      1141.33 seconds



https://github.com/bluez/bluez/pull/2520

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-09-11 23:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 21:32 [PATCH BlueZ 0/1] Enable D-Bus activation of bluetooth.service Grant Moyer
2026-09-11 21:32 ` [PATCH BlueZ 1/1] org.bluez.service: enable " Grant Moyer
2026-09-11 22:16   ` Bastien Nocera
2026-09-11 23:56   ` Enable " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox