https://bugs.kde.org/show_bug.cgi?id=516170
Bug ID: 516170
Summary: Bluetooth backend is always active when kdeconnectd
starts
Classification: Applications
Product: kdeconnect
Version First 25.12.1
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: desktop-application
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Splitting this new bug in 25.12.1 from bug 513461: kdeconnectd logspam: "Cannot
find Bluez 5 adapter for device search false"
Disabling the Bluetooth backend at runtime (either from the settings dialog or
"kdeconnect-cli --disable-backend BluetoothLinkProvider") only works for that
session. Once kdeconnectd is restarted, the Bluetooth backend is active again.
I think commit d5223cc0daa6f9354eb1dfd549664487b52b43af from !886 should
reverted:
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -85,8 +85,8 @@ void Daemon::init()
d->m_linkProviders.insert(new LanLinkProvider(false,
disabledLinkProviders.contains(QStringLiteral("LanLinkProvider"))));
qCDebug(KDECONNECT_CORE) << "Constructed LanLinkProvider Backend";
#ifdef KDECONNECT_BLUETOOTH
- d->m_linkProviders.insert(new
AsyncLinkProvider(disabledLinkProviders.contains(QStringLiteral("BluetoothLinkProvider"))));
- qCDebug(KDECONNECT_CORE) << "Constructed
AsyncLinkProvider<BluetoothLinkProvider> Backend";
+ d->m_linkProviders.insert(new
AsyncLinkProvider(disabledLinkProviders.contains(QStringLiteral("AsyncLinkProvider"))));
+ qCDebug(KDECONNECT_CORE) << "Constructed
AsyncLinkProvider<AsyncLinkProvider> Backend";
#endif
#ifdef KDECONNECT_LOOPBACK
d->m_linkProviders.insert(new LoopbackLinkProvider());
because the original was correct. The debug output also doesn't make sense
afterwards with AsyncLinkProvider repeated.
To test, I manually changed ~/.config/kdeconnect/config to:
[General]
disabled_providers=AsyncLinkProvider
and now the Bluetooth backend is inactive when kdeconnectd next starts.
It appears that enabling/disabling the Bluetooth backend removes/adds
BluetoothLinkProvider to the disabled_providers list in the configuration file
but the initialisation code is erroneously looking for AsyncLinkProvider.
STEPS TO REPRODUCE
1. Disable the Bluetooth backend.
2. Restart kdeconnectd (manually or by logging out and logging back in)
3.
OBSERVED RESULT
KDE Connect settings and "kdeconnect-cli -b" both indicate that the Bluetooth
backend (BluetoothLinkProvider) is disabled but is actually enabled as on
systems without a Bluetooth interface this log entry is seen:
kdeconnectd[1486]: No local bluetooth adapter found
and the log entries from bug 513461 are filling the log.
EXPECTED RESULT
The Bluetooth backend to be really disabled, on systems without a Bluetooth
interface this log entry is NOT seen:
kdeconnectd[1486]: No local bluetooth adapter found
SOFTWARE/OS VERSIONS
Linux: Fedora 43
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
ADDITIONAL INFORMATION
Bug still present in KDE Gear 25.12.2.
--
You are receiving this mail because:
You are watching all bug changes.