The problem:
I've been using Ubuntu 22.04 for a few months now, and I use the Logitech K380 keyboard which has always worked perfectly. However, a few days ago I started having problems with delayed and/or repeated keystrokes, and I noticed that the delay varies, being greater or lesser depending on the moment. I've tested the same keyboard on another laptop (one with Mac OSX), and it works perfectly on that one. On the laptop with Ubuntu, the integrated keyboard also works perfectly.
Other information:
- I use Redmi Airdots 3 earphones and they work very well;
- I have two other earphones that also work well;
- Note that I've been using this keyboard here for months without any problems... I also used it on Ubuntu 20.04 before and had no problems either.
What I've tried so far?
Not much, just uninstalling and reinstalling Bluetooth:
➜ sudo apt-get remove --purge bluetooth
➜ sudo apt-get remove --purge gnome-bluetooth
➜ sudo apt-get remove --purge bluez
➜ sudo apt-get remove --purge bluez-tools
➜ sudo apt autoremove
➜ sudo rm -rf /var/lib/bluetooth/
➜ sudo rm -rf /etc/bluetooth
After that, I restarted the computer and reversed the process, installing the packages I uninstalled.
System information
➜ hciconfig -a
hci0: Type: Primary Bus: USB
BD Address: 00:45:E2:97:44:30 ACL MTU: 1021:6 SCO MTU: 255:12
UP RUNNING PSCAN ISCAN INQUIRY
RX bytes:143499 acl:4353 sco:0 events:4000 errors:0
TX bytes:913247 acl:1381 sco:0 commands:1795 errors:0
Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: PERIPHERAL ACCEPT
Name: 'dev-ubuntu'
Class: 0x6e010c
Service Classes: Networking, Rendering, Capturing, Audio, Telephony
Device Class: Computer, Laptop
HCI Version: 5.1 (0xa) Revision: 0x19b7
LMP Version: 5.1 (0xa) Subversion: 0x6d7d
Manufacturer: Realtek Semiconductor Corporation (93)
➜ sudo service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-05-08 19:39:17 -03; 1min 2s ago
Docs: man:bluetoothd(8)
Main PID: 14828 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 11680)
Memory: 956.0K
CPU: 129ms
CGroup: /system.slice/bluetooth.service
└─14828 /usr/lib/bluetooth/bluetoothd
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/sbc
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/sbc
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/sbc_xq_453
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/sbc_xq_453
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/sbc_xq_512
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/sbc_xq_512
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/sbc_xq_552
mai 08 19:39:17 dev-ubuntu bluetoothd[14828]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/sbc_xq_552
mai 08 19:39:17 dev-ubuntu systemd[1]: Started Bluetooth service.
mai 08 19:39:43 dev-ubuntu bluetoothd[14828]: /org/bluez/hci0/dev_9C_19_C2_23_31_FF/sep2/fd0: fd(30) ready
➜ bt-device -l
Added devices:
Keyboard K380 (F4:73:35:5A:54:B3)
Redmi AirDots 3 (9C:19:C2:23:31:FF)
➜ bluetoothctl --version
bluetoothctl: 5.64