跑步根图Linux分布与内核4.9.16和蓝色5.43 有两个设备:罗技 MX Anywhere 2鼠标和罗技 K780键盘 两款设备均采用蓝牙 4.0 LE。无线网卡内置蓝牙适配器:英特尔双频无线 AC 8260
我遇到过一个非常有趣的用例。
sspmode
为蓝牙适配器启用。两台设备都可以单独配对并且工作得很好。
重新启动、睡眠或只是断开连接并重新连接设备后,我观察到以下情况:
先连接键盘,效果很好。之后连接鼠标,两个设备都运行良好,没有任何问题。
先连接鼠标,效果也很好。连接键盘后,它声称可以
connected
按bluetoothctl
和blueberry
小程序,但打字不起作用。
udevadm monitor
对这两种情况的监控显示以下内容:
首先对于键盘:
KERNEL[9704.383752] add /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:3585 (bluetooth)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:3585
DEVTYPE=link
SEQNUM=2576
SUBSYSTEM=bluetooth
KERNEL[9708.085453] add /devices/virtual/misc/uhid/0005:046D:B33B.0009 (hid)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009
HID_ID=0005:0000046D:0000B33B
HID_NAME=Keyboard K780
HID_PHYS=XX:XX:XX:XX:XX:XX
HID_UNIQ=XX:XX:XX:XX:XX:XX
MODALIAS=hid:b0005g0001v0000046Dp0000B33B
SEQNUM=2577
SUBSYSTEM=hid
KERNEL[9708.085644] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22 (input)
ABS=100000000
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22
EV=12001f
KEY=3007f 0 0 483ffff17aff32d bf54444600000000 1 130f938b17c007 ffe77bfad941dfff febeffdfffefffff fffffffffffffffe
LED=1f
MODALIAS=input:b0005v046DpB33Be0018-e0,1,2,3,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B0,B1,B2,B5,B6,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CE,CF,D0,D1,D2,D4,D8,D9,DB,DF,E0,E1,E4,E7,E8,E9,EA,EB,F0,F1,F4,100,161,162,166,16A,16E,172,174,176,178,179,17A,17B,17C,17D,17F,180,182,183,185,188,189,18C,18D,18E,18F,190,191,192,193,195,197,198,199,19A,19C,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1AF,1B0,1B1,1B7,1BA,240,241,242,243,244,245,246,250,251,r6,a20,m4,l0,1,2,3,4,sfw
MSC=10
NAME="Keyboard K780"
PHYS="XX:XX:XX:XX:XX:XX"
PRODUCT=5/46d/b33b/18
PROP=0
REL=40
SEQNUM=2578
SUBSYSTEM=input
UNIQ="XX:XX:XX:XX:XX:XX"
KERNEL[9708.085718] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/event16 (input)
ACTION=add
DEVNAME=/dev/input/event16
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/event16
MAJOR=13
MINOR=80
SEQNUM=2579
SUBSYSTEM=input
KERNEL[9708.085741] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::numlock (leds)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::numlock
SEQNUM=2580
SUBSYSTEM=leds
KERNEL[9708.085757] change /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::numlock (leds)
ACTION=change
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::numlock
SEQNUM=2581
SUBSYSTEM=leds
TRIGGER=kbd-numlock
KERNEL[9708.085772] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::capslock (leds)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::capslock
SEQNUM=2582
SUBSYSTEM=leds
KERNEL[9708.085787] change /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::capslock (leds)
ACTION=change
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::capslock
SEQNUM=2583
SUBSYSTEM=leds
TRIGGER=kbd-capslock
KERNEL[9708.085801] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::scrolllock (leds)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::scrolllock
SEQNUM=2584
SUBSYSTEM=leds
KERNEL[9708.085816] change /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::scrolllock (leds)
ACTION=change
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::scrolllock
SEQNUM=2585
SUBSYSTEM=leds
TRIGGER=kbd-scrolllock
KERNEL[9708.085830] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::compose (leds)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::compose
SEQNUM=2586
SUBSYSTEM=leds
KERNEL[9708.085842] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::kana (leds)
ACTION=add
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::kana
SEQNUM=2587
SUBSYSTEM=leds
KERNEL[9708.085857] change /devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::kana (leds)
ACTION=change
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/input/input22/input22::kana
SEQNUM=2588
SUBSYSTEM=leds
TRIGGER=kbd-kanalock
KERNEL[9708.085875] add /devices/virtual/misc/uhid/0005:046D:B33B.0009/hidraw/hidraw3 (hidraw)
ACTION=add
DEVNAME=/dev/hidraw3
DEVPATH=/devices/virtual/misc/uhid/0005:046D:B33B.0009/hidraw/hidraw3
MAJOR=249
MINOR=3
SEQNUM=2589
SUBSYSTEM=hidraw
首先针对鼠标
KERNEL[9746.385023] add /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:3586 (bluetooth)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:3586
DEVTYPE=link
SEQNUM=2615
SUBSYSTEM=bluetooth
因此,如果您不小心触摸了鼠标,第一个键盘将无法工作,除非您关闭鼠标并在连接键盘后再次打开它,否则会带来很多不便。
知道为什么会发生这种情况以及如何解决这个问题吗?