From 93a822f69da85f267174887297863aa68cf4430c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 17 Sep 2026 14:18:23 -0700 Subject: [PATCH] bluetooth: resync adapter properties after subscribing to changes A new adapter's initial properties come from the InterfacesAdded snapshot, but its PropertiesChanged match rule is only installed afterwards, when the adapter object is constructed. Any change BlueZ emits in between is never delivered, so an adapter registered while powering on or off (e.g. after a controller swap) could stay stuck on a transitional PowerState forever. Issue a single GetAll once the snapshot has been applied. It is ordered after the match rule on the bus, so it picks up anything that was missed, and every later change is guaranteed to arrive as a signal. Signed-off-by: Rosen Penev --- changelog/next.md | 2 ++ src/bluetooth/adapter.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/changelog/next.md b/changelog/next.md index 589d7c327..7cd414c81 100644 --- a/changelog/next.md +++ b/changelog/next.md @@ -5,6 +5,8 @@ ## Bug Fixes +- Fixed `BluetoothAdapter.enabled` getting stuck on transitional power states when an adapter + is registered while it is still powering on or off. - Fixed main process crashes on pam subprocess misbehavior. - Fixed crashes when attempting to create or modify session locks reentrantly. - Fixed networking state breaking after restarting NetworkManager. diff --git a/src/bluetooth/adapter.cpp b/src/bluetooth/adapter.cpp index 7f70a279a..84cad2f19 100644 --- a/src/bluetooth/adapter.cpp +++ b/src/bluetooth/adapter.cpp @@ -98,6 +98,7 @@ void BluetoothAdapter::addInterface(const QString& interface, const QVariantMap& if (interface == "org.bluez.Adapter1") { this->properties.updatePropertySet(properties, false); qCDebug(logAdapter) << "Updated Adapter properties for" << this; + this->properties.updateAllViaGetAll(); } }