Bluetooth Mouse Lag

9,785

Solution 1

Solution from reddit from @ashughes in an above comment -https://www.reddit.com/r/linuxquestions/comments/bc15f8/bluetooth_mouse_is_laggy_very_limited_pollrate/ez3ufhs/

sudo nano /var/lib/bluetooth/xx\:xx\:xx\:xx\:xx\:xx/yy\:yy\:yy\:yy\:yy\:yy/info

where xx:xx.... is pc bluetooth address and yy:yy... is the mouse bluetooth address.

In the file, I added the section at the end:

[ConnectionParameters]
MinInterval=6
MaxInterval=7
Latency=0
Timeout=216

You may also need to reconnect the mouse.

I also tracked this proposal on ubuntu bug here:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1824559?comments=all

Solution 2

I'm using Ubuntu 18.04 on a Dell Precision 7740 laptop and a Logitech MX Master 3 and had a pretty bad lag over Bluetooth. Setting the parameters as noted in @alenz316's answer did not make a difference for me.

However, @Eraph's settings in that thread DID work. I originally found the answer on https://forum.manjaro.org/t/logitech-mx-master-pointer-too-slow-and-laggy/105468.

To summarize,

  1. I edited /var/lib/bluetooth/XX:XX:XX:XXX:XX:XX/YY:YY:YY:YY:YY:YY/info as root, where XX:XX:XX:XX:XX:XX is the Bluetooth address of my computer's bluetooth interface, and YY:YY:YY:YY:YY:YY is the Bluetooth address of my Mouse's interface.

  2. added @Eraph's parameters to the bottom of that file as follows:

[ConnectionParameters]
MinInterval=6
MaxInterval=9
Latency=44
Timeout=216
  1. I restarted Bluetooth with sudo service bluetooth restart

Now the mouse works as well over Bluetooth as it does over the Logitech Unifying hub.

I'm not sure what will happen if I reboot or if I re-pair the mouse, but I assume I can just re-apply these steps.

Solution 3

I had two problems;

  1. Poor Wi-Fi speed, and;
  2. Bad BT mouse performance.

I solved problem #1 by exchanging my cheap Qualcomm WiFi card for a better Intel card in my Dell Laptop.

However, problem #2 was still there, until I realized that my Smartphone Samsung Galaxy S21+ 5G was laying on my desk too close to my mouse and likely interfering with it.

Now my phone is more than 1m away and the mouse is reacting much better.

Share:
9,785

Related videos on Youtube

Eraph
Author by

Eraph

Mildly hungover Scotsman in desperate need of a haircut living and working in Brisbane (Greatest City in World™). I get paid to muck about with C#, .Net, MVC, Razor, JavaScript, jQuery, and Bootstrap. Budding Unity game developer. I don't get paid for that.

Updated on September 18, 2022

Comments

  • Eraph
    Eraph over 1 year

    looking for help diagnosing bluetooth mouse lag. I'm using a Logitech MX Anywhere 2, I've had it a few years now and it's worked well on a number of Linux distros. I recently installed Debian 10 and set it up to use Sid repos. In this environment, the mouse does not work as responsively as normal. I'm on a laptop, and the touchpad works perfectly smoothly, and a wired mouse is also perfectly smooth. What I get with the bluetooth mouse is as if the sampling rate is maybe once every 3 or 4 frames.

    I still have Pop!_OS installed which is based on Ubuntu 19.04, the mouse works as expected in that environment. Forgetting the mouse and re-adding it offers no change to behaviour, same with reboots. I've updated to the latest state of the repos, no dice. I've also tried switching from Wayland to Xorg with no effect.

    My best guess would be that it's down to the iwlwifi module (it's a Lenovo Yoga 900 with an Intel Core i7 6560U with integrated Intel Wireless 8260), but no idea where to go from here.

    Cheers!

    • Ned64
      Ned64 over 4 years
      Please let us know whether the mouse is really connected by Bluetooth or a dongle by Logitech. Sometimes their mice can do both. If I am not mistaken iwlwifi only handles Wi-Fi, not Bluetooth. (Of course you will know whether you have a USB dongle by Logitech ("Unifying Receiver") in a USB port, but also check Bluetooth settings whether the device is listed as currently connected, while using it.)
    • Eraph
      Eraph over 4 years
      No dongle @Ned64, it's all bluetooth on this occasion. And I agree that it may not be iwlwifi at all, but that I mentioned it as a potential starting point.
    • ashughes
      ashughes over 4 years
      Are you still having this issue? I'm having the same problem with my Logitech MX Master on a new Dell Precision 5540 with Intel AX200 running Ubuntu 18.04.3 out of the box with kernel 4.15.0-1057-oem.
    • Eraph
      Eraph over 4 years
      I'm afraid so, @ashughes! While I'd prefer to use bluetooth I have just switched to using the dongle instead.
    • ashughes
      ashughes over 4 years
      @Eraph That's a bummer! I've tried to set bt_coex_active=0 as suggested at askubuntu.com/a/823316 but this has made no difference for me. :'(
    • ashughes
      ashughes over 4 years
      @Eraph I just tried reddit.com/r/linuxquestions/comments/bc15f8/… and it now appears to be working! I'm not a huge fan of the solution since it's very specific to the single bluetooth device...but so far it's good and it's based on the MAC address which isn't going to change.
    • Eraph
      Eraph over 4 years
      Thanks @ashughes, I'll give it a look!
    • BangTheBank
      BangTheBank about 4 years
      This is what it worked for me! It seems electronic noise from computer leading the bt receiver in error states worldcadaccess.com/blog/2014/03/…
    • Kostanos
      Kostanos over 2 years
      I have the same issue, but only when I connect the MX Master 3 through bluethose. It works well if I connect it with unify receiver. My is Ubuntu 20.04
  • Eraph
    Eraph over 4 years
    I'm marking this as a solution as I'm sure it works in some cases. For me, I was just about to test it when I found that it had fixed itself. For the record, that file has the following for me: [ConnectionParameters] MinInterval=6 MaxInterval=9 Latency=44 Timeout=216
  • Alan Wang
    Alan Wang over 4 years
    Worked for me! Much appreciated! Btw the folder needs root access so it's easier to just sudo su first then modify the info file.
  • user125867
    user125867 over 3 years
    Thank you, this worked for me too. I made a script to run at startup and add the values automatically, its at this gist if anyone is interested. gist.github.com/productiveme/8b39f5799fcb3e5681d0ef985884fb5‌​1
  • hurelhuyag
    hurelhuyag over 3 years
    @user125867 Can you tell me how to automate this script? I tried crontab, systemd service none of them not working
  • user125867
    user125867 over 3 years
    I run it manually after connecting the bluetooth devices. as it needs sudo and the devices connected ... haven't been able to automate it sorry