https://bugs.kde.org/show_bug.cgi?id=435444

            Bug ID: 435444
           Summary: bluetooth is constantly scanning for services /
                    devices
           Product: Bluedevil
           Version: 5.21.3
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: now...@gmail.com
          Reporter: k...@kaishome.de
                CC: plasma-b...@kde.org
  Target Milestone: ---

SUMMARY

When the KDE session is running, my bluetooth dongle is constantly scanning for
services and devices. The timeout is around 10s but it will immediately start
again.

The effect of this is that some bluetooth-connected devices have problems
communicating correctly with my PC because inquiries are prioritized over other
bluetooth traffic with the effect it seems to completely dominate the bluetooth
connection.

One affected device is the Xbox Elite 2 controller: While KDE is running, it is
unstable and loses or delays input events. When KDE is stopped, the controller
works just fine.

After an [issue report in the Bluez Github
project](https://github.com/bluez/bluez/issues/123) I was told that it is
neither normal nor expected/recommended to have the dongle in permanent
scan/inquiry mode because that traffic is priorities above other traffic which
could explain my problem. It doesn't matter if I disable any KDE services
(kdeconnect, bluetooth events, ...): The dongle is constantly discovering for
10s, then immediately starts again in a loop. Sometimes after I rebooted, the
pattern may be different: 10s of discovering, 10s of non-discovering.

This also seems to affect how well different devices may be able to connect via
bluetooth: Without KDE running, my paired bluetooth devices connect
immediately, with KDE running, the connection may take 30-60s before it is
established.

STEPS TO REPRODUCE
1. Enable bluetooth
2. Watch the output of btmgmt or btmon
3. Try with KDE and without KDE running

OBSERVED RESULT

With KDE running, watch btmgmt to see "hci0 type 1 discovering on" / "... off"
is looping with 10s in "on" state, and <1s in "off" state.

Without KDE running, no such behavior can be observed.

Bluetooth devices have difficulties to properly communicate with low latency
while inquiries are running, this may have a HUGE impact on SOME devices,
especially devices requiring low latency (input, audio) come to mind here.

EXPECTED RESULT

KDE (or some component of it) should not constantly scan trying to discover
devices.

ADDITIONAL INFO

The "Add device" wizard is not running.

kdeconnect is running, it seems to have bluetooth integration.

kio may be involved:
https://github.com/KDE/bluedevil/blob/bb28472500c1292c9059b06af937ed51b4cb02f8/src/kio/bluetooth/kiobluetooth.cpp#L159
(the 10s timeout is quite an evidence)

I already tried disabling pulseaudio and other bluetooth-integrated services.
Only shutting KDE completely down resolves the issue.

Maybe related:
#308338, #401983

As per https://bugs.kde.org/show_bug.cgi?id=401983#c3 the kio thing looks
promising. But how would I identify the process which is hammering the
bluetooth:/ kio service?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to