Ubuntu – Bluetooth Keyboard and mouse disconnect when idle for a few seconds and reconnects when moved / typed on Ubuntu 20.04

20.04bluetoothkeyboardmouse

I have a keyboard K850 and a M720 Triathlon mouse both from Logitech. They work correctly but get disconnected when idle.

The behaviour seems to be like an auto suspend function where the device disconnects after a few seconds and reconnects when there is interaction. It makes the use of these device tedious, specially the keyboard as it does not remember the key strokes when it reactivates and it takes a few secs to become responsive again.

I researched online and found a few solutions related to autosuspend of bluetooth and usb. For instance I tried the following line in grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash btusb.enable_autosuspend=n usbcore.autosuspend=-1 usbcore.autosuspend_delay_ms=-1"

Which does not work for me.

This is a session with bluetoothctl:

root@balearics:~# bluetoothctl
Agent registered
[CHG] Controller 5C:87:9C:35:87:83 Pairable: yes
[M720 Triathlon]# devices
Device C9:58:68:E2:1A:D9 M720 Triathlon
Device DA:95:18:89:C3:30 Keyboard K850
[CHG] Device C9:58:68:E2:1A:D9 ServicesResolved: no
[CHG] Device C9:58:68:E2:1A:D9 Connected: no
[CHG] Device C9:58:68:E2:1A:D9 Connected: yes
[CHG] Device C9:58:68:E2:1A:D9 ServicesResolved: yes
[CHG] Device DA:95:18:89:C3:30 ServicesResolved: no
[CHG] Device DA:95:18:89:C3:30 Connected: no
[CHG] Device DA:95:18:89:C3:30 Connected: yes
[CHG] Device DA:95:18:89:C3:30 ServicesResolved: yes
[M720 Triathlon]#

As you can see after idling it gets disconnected and when I touch it / type it gets connected again.

Any help would be appreciated

Best Answer

You didn't make it clear if you'd gone through the GUI and power settings, so I'll take a stab at this.

Open your power settings and disable the ability to suspend Bluetooth devices to save power.

Ubuntu 20.04 power management - bluetooth

Related Question