1

By "sometimes laggy", I mean that it works fine for a minute, then it is choppy for a few minutes, fine for a minute again, then choppy, etc. I have tried a lot of the already given solutions such as editing the /var/lib/bluetooth/mac-pc/mac-mouse/info to add the connection parameters and one more similar solutions which edits seperate files.

I also ran a few diagnostics the info is down below.

The main thing i find weird is that when i run bluetooth manager and right click setup the mouse it runs fine for a few seconds before getting slugish again. There is another way to replicate this situation which was using hciconfig scan command in terminal made it run smooth for a few seconds.

$ dmesg | grep -I blue

[   30.120183] Bluetooth: Core ver 2.22
[   30.120198] Bluetooth: HCI device and connection manager initialized
[   30.120201] Bluetooth: HCI socket layer initialized
[   30.120202] Bluetooth: L2CAP socket layer initialized
[   30.120204] Bluetooth: SCO socket layer initialized
[   31.395146] Bluetooth: hci0: BCM: chip id 70
[   31.396141] Bluetooth: hci0: BCM: features 0x06
[   31.412156] Bluetooth: hci0: dell-Inspiron-3543
[   31.416150] Bluetooth: hci0: BCM43142A0 (001.001.011) build 0341
[   34.019178] Bluetooth: hci0: BCM43142A0 (001.001.011) build 0341
[   34.035256] Bluetooth: hci0: BCM43142A0 Generic USB Class 2 NonUHE @ 20 MHz
[   39.041570] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   39.041572] Bluetooth: BNEP filters: protocol multicast
[   39.041575] Bluetooth: BNEP socket layer initialized
[   52.617208] Bluetooth: RFCOMM TTY layer initialized
[   52.617213] Bluetooth: RFCOMM socket layer initialized
[   52.617217] Bluetooth: RFCOMM ver 1.11
[   76.147097] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   76.147106] Bluetooth: HIDP socket layer initialized
[   76.150103] input: Bluetooth Mouse M336/M337/M535 Mouse as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0002/input/input21
[   76.150611] input: Bluetooth Mouse M336/M337/M535 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0002/input/input22
[   76.150912] input: Bluetooth Mouse M336/M337/M535 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0002/input/input25
[   76.151558] hid-generic 0005:046D:B016.0002: input,hidraw1: BLUETOOTH HID v12.03 Mouse [Bluetooth Mouse M336/M337/M535] on ac:d1:b8:c3:50:48
[ 1862.205868] input: Bluetooth Mouse M336/M337/M535 Mouse as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0003/input/input26
[ 1862.206117] input: Bluetooth Mouse M336/M337/M535 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0003/input/input27
[ 1862.206250] input: Bluetooth Mouse M336/M337/M535 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0003/input/input30
[ 1862.206567] hid-generic 0005:046D:B016.0003: input,hidraw1: BLUETOOTH HID v12.03 Mouse [Bluetooth Mouse M336/M337/M535] on ac:d1:b8:c3:50:48
[ 1983.198141] input: Bluetooth Mouse M336/M337/M535 Mouse as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0004/input/input31
[ 1983.198493] input: Bluetooth Mouse M336/M337/M535 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0004/input/input32
[ 1983.198698] input: Bluetooth Mouse M336/M337/M535 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0004/input/input35
[ 1983.199155] hid-generic 0005:046D:B016.0004: input,hidraw1: BLUETOOTH HID v12.03 Mouse [Bluetooth Mouse M336/M337/M535] on ac:d1:b8:c3:50:48
[11971.835681] input: Bluetooth Mouse M336/M337/M535 Mouse as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0005/input/input36
[11971.836087] input: Bluetooth Mouse M336/M337/M535 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0005/input/input37
[11971.836309] input: Bluetooth Mouse M336/M337/M535 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0005/input/input40
[11971.836838] hid-generic 0005:046D:B016.0005: input,hidraw1: BLUETOOTH HID v12.03 Mouse [Bluetooth Mouse M336/M337/M535] on ac:d1:b8:c3:50:48
[12319.290163] input: Bluetooth Mouse M336/M337/M535 Mouse as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0006/input/input41
[12319.290374] input: Bluetooth Mouse M336/M337/M535 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0006/input/input42
[12319.290469] input: Bluetooth Mouse M336/M337/M535 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.6/1-1.6:1.0/bluetooth/hci0/hci0:11/0005:046D:B016.0006/input/input45
[12319.290724] hid-generic 0005:046D:B016.0006: input,hidraw1: BLUETOOTH HID v12.03 Mouse [Bluetooth Mouse M336/M337/M535] on ac:d1:b8:c3:50:48
$ sudo service bluetooth status

bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-03-02 10:40:40 IST; 24min ago
       Docs: man:bluetoothd(8)
   Main PID: 8765 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 9385)
     Memory: 1.2M
     CGroup: /system.slice/bluetooth.service
             └─8765 /usr/lib/bluetooth/bluetoothd

Mar 02 10:40:40 dell-Inspiron-3543 systemd[1]: Starting Bluetooth service...
Mar 02 10:40:40 dell-Inspiron-3543 bluetoothd[8765]: Bluetooth daemon 5.53
Mar 02 10:40:40 dell-Inspiron-3543 systemd[1]: Started Bluetooth service.
Mar 02 10:40:40 dell-Inspiron-3543 bluetoothd[8765]: Starting SDP server
Mar 02 10:40:40 dell-Inspiron-3543 bluetoothd[8765]: Bluetooth management interface 1.14 initialized
Mar 02 10:40:40 dell-Inspiron-3543 bluetoothd[8765]: Endpoint registered: sender=:1.34 path=/MediaEndpoint/A2DPSink/sbc
Mar 02 10:40:40 dell-Inspiron-3543 bluetoothd[8765]: Endpoint registered: sender=:1.34 path=/MediaEndpoint/A2DPSource/sbc
$ hciconfig scan

hci0:   Type: Primary  Bus: USB
    BD Address: AC:D1:B8:C3:50:48  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING PSCAN ISCAN 
    RX bytes:1217978 acl:71784 sco:0 events:6538 errors:0
    TX bytes:85561 acl:61 sco:0 commands:5974 errors:0

2 Answers 2

2

Generally when I've seen this it is because the Bluetooth device's power management settings are far too aggressive. The solution that I've had the most success with is to disable auto-suspend for the Bluetooth device via btusb.enable_autosuspend.

This is how it's done:

  1. Open Terminal (if it's not already open)
  2. Edit your grub file as root:
    sudo vi /etc/default/grub 
    
    Note: Feel free to use a different text editor if you prefer.
  3. Add btusb.enable_autosuspend=0 to the GRUB_CMDLINE_LINUX_DEFAULT line. The end result may look like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash btusb.enable_autosuspend=0"
    
    Note: You may have more items in this line, which is fine. You can add the new flag anywhere between the quotes as order does not matter.
  4. Save the file
  5. Update Grub:
    sudo update-grub
    
  6. Reboot

This will disable power-saving mode for your Bluetooth radio. If you are in a situation where you do not need to use Bluetooth and would like to use less power, simply disable the Bluetooth radio via the power toggle.

2
  • Thanks for the answer Matigo but it does not seem to solve the problem. I think it's related to the power management of bluetooth or the polling rate but not related to the autosuspend. Thanks again for the help the answer, and formatting my question. Mar 2, 2021 at 7:04
  • Man I think that this solution points in the right direction, though it didn't fix the problem: my mouse has still got some delay before "restarting", when I don't move it for around 10 seconds. I'm sure about a bluetooth issue, because the internal touch pad doesn't suffer of the same problem. Anyway, maybe it's just an impression, but your solution seems to have reduced the lagging a little. Thanks
    – funder7
    Nov 15, 2021 at 14:59
1

I have not been able to fix the problem by itself but I was going through some more problems similar to this and found someone suggesting the bluetooth uses same 2.4Gz band as the wifi which might be causing this problem and it worked. Switching to an ethernet connection and turning off the wifi instantly fixed a great deal of the lag I was faceing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .