Apple Magic Trackpad 1 - 每隔几分钟就会“停止工作”

Apple Magic Trackpad 1 - 每隔几分钟就会“停止工作”

我刚刚购买了 Apple Magic Trackpad 1,并将其连接到我的 Ubuntu 15.10(现在为 16.04)系统。一切都运行正常。

连接后,触控板每隔几分钟就会“停止工作”。我不知道它是与蓝牙断开连接还是自动关闭。我只知道我可以通过按下触控板上的电源按钮让它重新工作。有时我必须按两次甚至三次,但之后它就会再次工作。

我尝试了一些常见的方法,例如更换电池、从蓝牙中删除它并再次添加它、重新启动系统并重新添加它。

如果我整夜保持设备连接,当我早上回来时,触摸触控板就会唤醒系统。

> lsusb

Bus 003 Device 002: ID 8087:8001 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2a Intel Corp. 
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 058f:3820 Alcor Micro Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

> dmesg | grep -i blue

[    7.737943] Bluetooth: Core ver 2.20
[    7.737965] Bluetooth: HCI device and connection manager initialized
[    7.737971] Bluetooth: HCI socket layer initialized
[    7.737974] Bluetooth: L2CAP socket layer initialized
[    7.737981] Bluetooth: SCO socket layer initialized
[    7.801692] Bluetooth: hci0: read Intel version: 370810011003110e0f
[    7.801696] Bluetooth: hci0: Intel device is already patched. patch num: 0f
[    8.511238] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    8.511242] Bluetooth: BNEP filters: protocol multicast
[    8.511249] Bluetooth: BNEP socket layer initialized
[   10.685841] Bluetooth: RFCOMM TTY layer initialized
[   10.685852] Bluetooth: RFCOMM socket layer initialized
[   10.685859] Bluetooth: RFCOMM ver 1.11
[   16.697130] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   16.697139] Bluetooth: HIDP socket layer initialized
[   16.704913] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0006/input/input16
[   16.707549] magicmouse 0005:05AC:030E.0006: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[10034.751891] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0007/input/input17
[10034.752119] magicmouse 0005:05AC:030E.0007: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[36234.802293] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0008/input/input18
[36234.803791] magicmouse 0005:05AC:030E.0008: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[39265.445927] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0009/input/input19
[39265.446146] magicmouse 0005:05AC:030E.0009: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[42890.060268] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.000A/input/input20
[42890.060495] magicmouse 0005:05AC:030E.000A: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[61297.037662] input: Apple Wireless Trackpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.000B/input/input22  
[61297.038420] magicmouse 0005:05AC:030E.000B: input,hidraw3: BLUETOOTH HID v1.60 Mouse [Apple Wireless Trackpad] on dc:53:60:ce:be:17
[63833.172707] Modules linked in: algif_hash algif_skcipher af_alg cmac hid_magicmouse hidp drbg ansi_cprng ctr ccm rfcomm bnep nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm arc4 crct10dif_pclmul crc32_pclmul aesni_intel iwlmvm aes_x86_64 lrw snd_soc_rt5640 gf128mul glue_helper snd_hda_codec_realtek ablk_helper cryptd snd_hda_codec_generic snd_hda_codec_hdmi mac80211 btusb snd_soc_rl6231 snd_hda_intel btrtl snd_usb_audio snd_hda_codec btbcm uvcvideo snd_usbmidi_lib snd_soc_core videobuf2_vmalloc serio_raw joydev videobuf2_memops input_leds btintel snd_compress snd_hda_core videobuf2_core ac97_bus v4l2_common snd_hwdep snd_pcm_dmaengine iwlwifi videodev bluetooth ir_lirc_codec media snd_pcm lirc_dev cfg80211 ir_sanyo_decoder ir_xmp_decoder ir_mce_kbd_decoder ir_sharp_decoder

> lspci -knn | grep Net -A2

02:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)
Subsystem: Intel Corporation Dual Band Wireless-AC 7265 [8086:9010]
Kernel driver in use: iwlwifi

sudo dmesg | grep iwlwifi

[    7.681317] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    7.683533] iwlwifi 0000:02:00.0: Unsupported splx structure
[    7.685661] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-19.ucode failed with error -2
[    7.685685] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-18.ucode failed with error -2
[    7.685699] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-17.ucode failed with error -2
[    7.694346] iwlwifi 0000:02:00.0: loaded firmware version 16.242414.0 op_mode iwlmvm
[    7.759241] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
[    7.759597] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    7.760054] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    8.006650] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[    8.792452] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    8.793061] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    8.854205] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[    8.854757] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[96297.700161] iwlwifi 0000:02:00.0: invalid BA notification: Q 16, tid 0, flow 65535
[240874.957686] iwlwifi 0000:02:00.0: invalid BA notification: Q 16, tid 0, flow 65535

sudo strace -p 727

  read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    read(7, "\f\0\0\0\10\0\2028\355\337c\210\0\1", 512) = 14
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 0) = 1 ([{fd=3, revents=POLLIN}])
    sendmsg(6, {msg_name(0)=NULL, msg_iov(2)=[{"l\4\1\1<\0\0\0\217\0\0\0\206\0\0\0\1\1o\0%\0\0\0/org/blu"..., 152}, {"\21\0\0\0org.bluez.Device1\0\0\0\30\0\0\0\0\0\0\0"..., 60}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 212
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, -1) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\2\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, -1) = 2 ([{fd=21, revents=POLLERR|POLLHUP}, {fd=22, revents=POLLERR|POLLHUP}])
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    close(21)                               = 0
    close(22)                               = 0
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    sendto(5, "<27>May  6 08:55:08 bluetoothd[7"..., 99, MSG_NOSIGNAL, NULL, 0) = 99
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}], 16, 29838) = 2 ([{fd=3, revents=POLLIN}, {fd=10, revents=POLLIN}])
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    recvmsg(10, {msg_name(12)={sa_family=AF_NETLINK, pid=-1904749397, groups=00000002}, msg_iov(1)=[{"libudev\0\376\355\312\376(\0\0\0(\0\0\0\344\0\0\0\302\312\363\227\0\0\0\0"..., 8192}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, {pid=6456, uid=0, gid=0}}], msg_flags=0}, 0) = 268
    getrandom("\v\241<\214CLZ\366\315\360\203\375\r\277\201>", 16, GRND_NONBLOCK) = 16
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}], 16, 29835) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\10\0\0\0\0\0\0\0", 16)        = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}], 16, 29835) = 0 (Timeout)
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    socket(PF_BLUETOOTH, SOCK_RAW, 6)       = 21
    ioctl(21, HCIGETDEVINFO, 0x7ffef8cb6330) = -1 ENOENT (No such file or directory)
    sendto(5, "<27>May  6 08:55:38 bluetoothd[7"..., 67, MSG_NOSIGNAL, NULL, 0) = 67
    close(21)                               = 0
    socket(PF_BLUETOOTH, SOCK_SEQPACKET, 0) = 21
    bind(21, {sa_family=AF_BLUETOOTH, sa_data="\0\0\27\276\316`S\334\0\0\0\0\0\0"}, 14) = 0
    setsockopt(21, SOL_BLUETOOTH, 4, "\1\0", 2) = 0
    fstat(21, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
    fcntl(21, F_GETFL)                      = 0x2 (flags O_RDWR)
    fcntl(21, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    connect(21, {sa_family=AF_BLUETOOTH, sa_data="\21\0\2028\355\337c\210\0\0\0\0\0\0"}, 14) = -1 EINPROGRESS (Operation now in progress)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 29971) = 1 ([{fd=3, revents=POLLIN}])
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 29971) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\1\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 29971) = 1 ([{fd=7, revents=POLLIN}])
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    read(7, "\v\0\0\0*\0\2028\355\337c\210\0\0\0\0\0\35\0\34\tIcentre cli"..., 512) = 48
    stat("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82", {st_mode=S_IFREG|0600, st_size=987, ...}) = 0
    open("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82", O_RDWR|O_CREAT, 0600) = 22
    close(22)                               = 0
    open("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82", O_RDONLY) = 22
    fstat(22, {st_mode=S_IFREG|0600, st_size=987, ...}) = 0
    read(22, "[General]\nName=Icentre client\342\200\231"..., 4096) = 987
    read(22, "", 4096)                      = 0
    close(22)                               = 0
    open("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82.XYTKGY", O_RDWR|O_CREAT|O_EXCL, 0666) = 22
    fallocate(22, 0, 0, 987)                = 0
    write(22, "[General]\nName=Icentre client\342\200\231"..., 987) = 987
    fstatfs(22, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=26647824, f_bfree=15960177, f_bavail=14600766, f_files=6782976, f_ffree=6130949, f_fsid={-697973956, -378649048}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
    lstat("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82", {st_mode=S_IFREG|0600, st_size=987, ...}) = 0
    fsync(22)                               = 0
    close(22)                               = 0
    rename("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82.XYTKGY", "/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82") = 0
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 0) = 1 ([{fd=3, revents=POLLIN}])
    sendmsg(6, {msg_name(0)=NULL, msg_iov(2)=[{"l\4\1\1<\0\0\0\220\0\0\0\206\0\0\0\1\1o\0%\0\0\0/org/blu"..., 152}, {"\21\0\0\0org.bluez.Device1\0\0\0\30\0\0\0\0\0\0\0"..., 60}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 212
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 27825) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\2\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLOUT}], 17, 27825) = 1 ([{fd=21, revents=POLLOUT}])
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=21, events=POLLNVAL}], 1, 0)  = 0 (Timeout)
    getsockopt(21, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
    socket(PF_BLUETOOTH, SOCK_SEQPACKET, 0) = 22
    bind(22, {sa_family=AF_BLUETOOTH, sa_data="\0\0\27\276\316`S\334\0\0\0\0\0\0"}, 14) = 0
    setsockopt(22, SOL_BLUETOOTH, 4, "\1\0", 2) = 0
    fstat(22, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
    fcntl(22, F_GETFL)                      = 0x2 (flags O_RDWR)
    fcntl(22, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    connect(22, {sa_family=AF_BLUETOOTH, sa_data="\23\0\2028\355\337c\210\0\0\0\0\0\0"}, 14) = -1 EINPROGRESS (Operation now in progress)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=POLLOUT}], 18, 27729) = 1 ([{fd=3, revents=POLLIN}])
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=POLLOUT}], 18, 27729) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\5\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=POLLOUT}], 18, 27729) = 1 ([{fd=22, revents=POLLOUT}])
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=22, events=POLLNVAL}], 1, 0)  = 0 (Timeout)
    getsockopt(22, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
    open("/var/lib/bluetooth/DC:53:60:CE:BE:17/cache/88:63:DF:ED:38:82", O_RDONLY) = 23
    fstat(23, {st_mode=S_IFREG|0600, st_size=987, ...}) = 0
    read(23, "[General]\nName=Icentre client\342\200\231"..., 4096) = 987
    read(23, "", 4096)                      = 0
    close(23)                               = 0
    socket(PF_BLUETOOTH, SOCK_RAW, 6)       = 23
    ioctl(23, _IOC(_IOC_WRITE, 0x48, 0xc8, 0x04), 0x56438885eb30) = 0
    close(23)                               = 0
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27712) = 1 ([{fd=3, revents=POLLIN}])
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27712) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\4\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27712) = 1 ([{fd=10, revents=POLLIN}])
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    recvmsg(10, {msg_name(12)={sa_family=AF_NETLINK, pid=-278512287, groups=00000002}, msg_iov(1)=[{"libudev\0\376\355\312\376(\0\0\0(\0\0\0\361\0\0\0\302\312\363\227\0\0\0\0"..., 8192}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, {pid=6494, uid=0, gid=0}}], msg_flags=0}, 0) = 281
    getrandom("\253\360\30\352\346\313E\361\350|\21\5\"\32\206G", 16, GRND_NONBLOCK) = 16
    getrandom("vh\0\242\22QA\1\355G\354\304_\204`\360", 16, GRND_NONBLOCK) = 16
    readlinkat(AT_FDCWD, "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/hidraw", 0x564388863780, 99) = -1 EINVAL (Invalid argument)
    lstat("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
    lstat("/sys/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/hidraw", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    access("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/hidraw/uevent", F_OK) = -1 ENOENT (No such file or directory)
    readlinkat(AT_FDCWD, "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019", 0x56438885ebb0, 99) = -1 EINVAL (Invalid argument)
    lstat("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
    lstat("/sys/devices", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    lstat("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    access("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/uevent", F_OK) = 0
    readlinkat(AT_FDCWD, "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/subsystem", "../../../../../../../../../../bu"..., 99) = 37
    open("/sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:05AC:030E.0019/uevent", O_RDONLY|O_CLOEXEC) = 23
    fstat(23, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
    fstat(23, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
    read(23, "DRIVER=magicmouse\nHID_ID=0005:00"..., 4096) = 181
    read(23, "", 4096)                      = 0
    read(23, "", 4096)                      = 0
    close(23)                               = 0
    getrandom("\n\5\242L\273\204\177\301\36\216\363SyCp\311", 16, GRND_NONBLOCK) = 16
    open("/run/udev/data/+hid:0005:05AC:030E.0019", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27701) = 1 ([{fd=3, revents=POLLIN}])
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27700) = 1 ([{fd=3, revents=POLLIN}])
    read(3, "\2\0\0\0\0\0\0\0", 16)         = 8
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, 27700) = 0 (Timeout)
    read(3, 0x7ffef8cb63f0, 16)             = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=0}, {fd=22, events=0}], 18, -1rs
    ^Cstrace: Process 727 detached
     <detached ...>

请问有什么建议吗?

答案1

我在 Ubuntu 18 上遇到了同样的问题。你的 strace 输出与我在机器上看到的类似。我通过以下方式解决了我的问题禁用 USB 自动暂停

我让内核模块处理 HIDP(我想您可以通过转到/etc/bluetooth/input.conf并检查UserspaceHID是否未设置为来检查这一点true),默认情况下,内核会自动暂停未使用的 USB 设备以节省电量。显然,这种行为对我的 Magic Trackpad 造成了严重破坏。

这种行为似乎在 的输出中有所体现sudo btmon。我可以看到 HCI 发送命令以退出嗅探模式(又称省电模式?)。有时它会成功退出,转换到活动模式并重新连接触控板。有时不会,我会看到:

> HCI Event: Mode Change (0x14) plen 6                                                                                                                               #10952 [hci0] 807.142497
        Status: Connection Timeout (0x08)
        Handle: 256
        Mode: Active (0x00)
        Interval: 0.000 msec (0x0000)

然后触控板会在重新建立连接时停止工作。禁用 USB 自动暂停后,它始终处于活动模式,从而避免了进入/退出嗅探模式所导致的任何问题。

arch-wiki 文章跳过的一件事是如何在 的输出中找到正确的蓝牙设备lsusb。也许对某些人来说这很明显,但对我来说却不是。因此,请确保运行lsusb -v或使用usb-devices以获取更多详细信息,以便更轻松地识别所需的设备。

我知道这个问题已经很老了,我坦率地承认我并不完全了解这个问题的所有要素,但希望有人会发现这个回答很有帮助。

答案2

检查输出可能会有所帮助journalctl -u bluetooth.service

我的联想 Thinkpad Yoga(运行 15.10 -> 16.04)的蓝牙模块在从挂起状态唤醒后连接到我的 Bose Soundlink Color 扬声器时出现了问题,还出现了一些其他问题,例如音频延迟和掉线。我拿起一个USB 蓝牙适配器它支持自我的笔记本电脑生产以来已纳入蓝牙的一些更多功能集,并且运行良好。蓝牙通信是在适配器和扬声器之间进行的,Ubuntu 将其视为 USB 设备。

相关内容