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!
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 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
Method 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,
-
I edited
/var/lib/bluetooth/XX:XX:XX:XXX:XX:XX/YY:YY:YY:YY:YY:YY/infoas root, whereXX:XX:XX:XX:XX:XXis the Bluetooth address of my computer’s bluetooth interface, andYY:YY:YY:YY:YY:YYis the Bluetooth address of my Mouse’s interface. - added @Eraph’s parameters to the bottom of that file as follows:
[ConnectionParameters] MinInterval=6 MaxInterval=9 Latency=44 Timeout=216
- 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.
Method 3
I had two problems;
- Poor Wi-Fi speed, and;
- 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.
Method 4
The issue you are facing is not related to the Bluetooth timeout but more likely the USB auto suspend feature built into the kernel.
I am running Ubuntu 22.04 LTS and i have a Logitech MX Anywhere 2S
This is how i went about fixing it:
- Run command to find out the id of your bluetooth module
$ lsusb -vt
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 5: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
ID 27c6:538d Shenzhen Goodix Technology Co.,Ltd.
|__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
ID 0bda:565a Realtek Semiconductor Corp.
|__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
ID 0bda:565a Realtek Semiconductor Corp.
|__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
|__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
The id of my bluetooth module is 8087:0aaa
- Create or update a udev rule to disable auto suspend for the module.
$ echo 'ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0aaa", ATTR{power/autosuspend}="-1"' >> /etc/udev/rules.d/50-usb_power_save.rules
After this reboot your pc and the lag should go away.
Note that idVendor was set to 8087 and idProduct was set to 0aaa to reflect my bluetooth settings
I used following links for reference.
https://wiki.archlinux.org/title/Power_management#USB_autosuspend
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0