How to debug lag using Bluetooth connected mouse and A2DP headset?

Posted by gertvdijk on Ask Ubuntu See other posts from Ask Ubuntu or by gertvdijk
Published on 2012-09-17T11:30:10Z Indexed on 2012/09/19 21:50 UTC
Read the original article Hit count: 308

Filed under:
|
|

I own a Logitech M555b mouse (since a week) for use with my HP Elitebook 8570w laptop running Kubuntu 12.04. Works fine right after connecting using the KDE Bluetooth control module.

However, after some time (seemingly random), it starts to lag. Movements are being delayed for roughly 500ms for a short period of time. Usually it recovers after some time too, but it can take minutes. All actions are being delayed: movements, click, scrolls. Additionally, the movements can be choppy during these times.

A workaround that always works for the same short period of time is to disconnect an re-connect the mouse. This can be done using the same KDE Bluetooth control module.

What did I try already?

  • Running this at boot time:

    echo on > `readlink -f /sys/class/bluetooth/hci0`/../../../power/level
    

    To disable any power saving features on the Bluetooth hci0 device.

  • Check the mouse's batteries (it's just a week old, other new batteries: same result)

  • Checking logs and kernel messages about Bluetooth-related entries: none aside the expected messages on connect time.
  • I'm running kernel 3.5.0-13-generic as provided in the xorg-edgers PPA. Booting the regular 3.2 Precise kernel results in the same behaviour.

Some other information that may help:

  • It happens when no other Bluetooth connections are active on the machine.
  • Similar symptoms also occur on my Bluetooth stereo (A2DP) headset, but then it's audio lagging and skipping. Swapping Bluetooth profiles as described here then helps. Conclusion: it's not the mouse that's faulty.
  • The headset always worked fine using my now dead Thinkpad T61p with built-in Bluetooth.
  • The bluetooth module in my laptop is connected via USB and shows up as

    Bus 002 Device 003: ID 0a5c:21e1 Broadcom Corp. 
    

I'm mobile and several people around me are using Bluetooth at work (A2DP mostly). It also occurs at home, where my neighbours are probably using Bluetooth as well. It could just be radio interference, but I think Bluetooth connections should just hop to another channel. And, moreover, it just works properly instantly when re-connecting.

Therefore I think it's a software driver issue and I'd like to debug it. Is there any way to get more verbose logging on the Bluetooth(-hid) modules?

© Ask Ubuntu or respective owner

Related posts about bluetooth

Related posts about input-devices