From e5eb35cb1a71c397b3eddbb41fa2179eb3746e54 Mon Sep 17 00:00:00 2001 From: Edouard Durand Date: Sun, 23 Aug 2026 00:12:18 +0800 Subject: [PATCH] rocknix: start the bluetooth agent with bluetoothd bluetooth-agent.service declares PartOf=bluetooth.service so it follows bluetoothd down, and WantedBy=bluetooth.service so it comes back up with it. Only the first half is in effect: the unit is never passed to enable_service, so the bluetooth.service.wants symlink is absent from the image and nothing pulls the agent in. PartOf also propagates restarts, so systemctl restart bluetooth keeps the agent alive and hides this. What does not survive is a discrete stop followed later by a start, which is exactly the shape of the suspend path: sleep.sh stops bluetooth in its pre hook and starts it again in post. From the first resume onward bluetoothd runs with no agent behind it. Scanning still lists devices, so the adapter looks healthy, but pairing from the UI goes nowhere because nothing answers the confirmation request. rocknix-bluetooth enable, which starts both units by name, only runs from autostart at boot, so the gap lasts until the next reboot. Reproducible without suspending: systemctl stop bluetooth systemctl start bluetooth systemctl is-active bluetooth-agent # inactive Enable the unit so the WantedBy symlink ships. Note that systemctl is-enabled still reports disabled for units enabled this way, as it only looks at the config paths; the symlink under /usr/lib/systemd/system/bluetooth.service.wants is what matters. --- projects/ROCKNIX/packages/rocknix/package.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/ROCKNIX/packages/rocknix/package.mk b/projects/ROCKNIX/packages/rocknix/package.mk index 2075344a3c9..e00d8a78664 100644 --- a/projects/ROCKNIX/packages/rocknix/package.mk +++ b/projects/ROCKNIX/packages/rocknix/package.mk @@ -78,6 +78,9 @@ EOF ### Take a backup of the system configuration on shutdown enable_service save-sysconfig.service + ### Bluetooth pairing agent, brought up with bluetoothd + enable_service bluetooth-agent.service + sed -i "s#@DEVICENAME@#${DEVICE}#g" ${INSTALL}/usr/config/system/configs/system.cfg ### Defaults for community builds.