Logitech MX Anywhere 2
Setting up a Logitech MX Anywhere 2 or a similar mouse over Bluetooth in a distro like Gentoo is not as easy as it looks, especially if you're running a custom kernel. Some kernel options might be missing, and BlueZ often doesn't set the polling interval correctly, so the cursor either moves choppily or doesn't move at all.
The steps below should cover everything needed to make the mouse work.
-
Make sure all the required kernel options are enabled:
Device Drivers ---> HID support ---> <*> HID bus support [*] Battery level reporting for HID devices <*> User-space I/O driver support for HID subsystem <*> Generic HID driver Special HID drivers ---> <*> Logitech devices <*> Logitech HID++ devices support -
Set
UserspaceHID=truein the/etc/bluetooth/input.conffile. -
Pair the device using either
bluetoothctlor the tool provided by your desktop environment, e.g. GNOME Bluetooth. -
Add or modify the following section in
/var/lib/bluetooth/<mac-of-your-adapter>/<mac-of-your-mouse>/info(adjust the path accordingly):[ConnectionParameters] MinInterval=6 MaxInterval=9 Latency=44 Timeout=216 -
Restart BlueZ:
sudo rc-service bluetooth restart