Comment 11 for bug 1341256

Revision history for this message
Vladimir Hulagov (vhulagov) wrote : Re: Press caps lock on bluetooth keyboard then the keyboard go death

Same issue with Gembird KB-316BT on Ubuntu 15.04.

Error reproduces on fresh compiled kernel 4.4.0-rc8+ from git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
and 4.5.0-rc1+ from Torvalds repository.
And bluez ver. 5.37.

In dmesg after keyboard was connected:
[121633.384618] calling hidp_init+0x0/0x20 [hidp] @ 16917
[121633.384628] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[121633.384638] Bluetooth: HIDP socket layer initialized
[121633.384648] initcall hidp_init+0x0/0x20 [hidp] returned 0 after 14 usecs
[121633.386807] hid-generic 0005:04E8:7021.001C: unknown main item tag 0x0
[121633.387265] input: Bluetooth v3.0 keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:768/0005:04E8:7021.001C/input/input40
[121633.388196] hid-generic 0005:04E8:7021.001C: input,hidraw4: BLUETOOTH HID v0.01 Keyboard [Bluetooth v3.0 keyboard] on 7c:7a:91:eb:67:f6

strace for bluetoothd stuck on:
10:28:39.270670 read(3, "\3\0\0\0\0\0\0\0", 16) = 8
10:28:39.275259 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
10:28:39.275588 read(8, "\21\0\0\0\10\0\220_\25&,\334\0\5", 512) = 14
10:28:39.275915 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
10:28:39.276167 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
10:28:39.276386 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
10:28:39.276603 write(3, "\1\0\0\0\0\0\0\0", 8) = 8
10:28:39.276866 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=21, events=0}, {fd=20, events=POLLIN}, {fd=19, events=POLLIN}, {fd=23, events=0}, {fd=17, events=POLLIN}, {fd=9, events=POLLIN}, {fd=24, events=POLLIN}, {fd=7, events=POLLIN}, {fd=25, events=0}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=26, events=0}, {fd=26, events=POLLOUT}, {fd=8, events=POLLIN}, {fd=22, events=POLLIN}], 22, 4294967295) = 1 ([{fd=3, revents=POLLIN}])
10:28:39.277599 read(3, "\5\0\0\0\0\0\0\0", 16) = 8
10:28:39.281864 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=16, events=POLLIN}, {fd=18, events=POLLIN}, {fd=21, events=0}, {fd=20, events=POLLIN}, {fd=19, events=POLLIN}, {fd=23, events=0}, {fd=17, events=POLLIN}, {fd=9, events=POLLIN}, {fd=24, events=POLLIN}, {fd=7, events=POLLIN}, {fd=25, events=0}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=26, events=0}, {fd=26, events=POLLOUT}, {fd=8, events=POLLIN}, {fd=22, events=POLLIN}], 22, 4294967295

When keyboard connected and Caps Lock was pressed, but if i turn off the keyboard strace shows fall of POLLIN/POLLOUT events in infinite cycle...

debugfs shows events with lag from 3 to 20 sec:
$ cat /sys/kernel/debug/hid/0005:04E8:7021.0026/events
report (size 8) (numbered) = 03 6a dc 2c 26 15 5f 90
GenericDeviceControls.BatteryStrength = 106
 00
Keyboard.00e0 = 0
Keyboard.00e1 = 0
Keyboard.00e2 = 0
Keyboard.00e3 = 0
Keyboard.00e4 = 0
Keyboard.00e5 = 0
Keyboard.00e6 = 0
Keyboard.00e7 = 0
Keyboard.0017 = 0

but wireshark continue recieving characters without any lag from bluetooth (bnep0) after issue occur, so i suggest that problem not in btintel/btusb kernel modules subsystem, but in hid-core probably.