在过去的几个月里,我遇到了一个奇怪的问题,即插入我的笔记本电脑的第二个 USB 设备没有响应,尽管它出现lsusb
并且dmesg
似乎没有问题。
我的 USB 鼠标和 USB 键盘都是这种情况。无论先插入哪个设备(插入任一 USB 端口,似乎哪个并不重要)都会立即被识别并正常工作。要插入的第二个设备也会显示lsusb
,dmesg
但根本不响应输入。
lsusb
这是插入键盘(工作正常)和鼠标(不响应)后的输出:
[mindtree@mindtree ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 04f3:2356 Elan Microelectronics Corp.
Bus 001 Device 004: ID 1532:0220 Razer USA, Ltd Blade Stealth (2016)
Bus 001 Device 003: ID 0bda:579f Realtek Semiconductor Corp.
Bus 001 Device 002: ID 0cf3:e300 Qualcomm Atheros Communications
Bus 001 Device 016: ID 1a2c:2124 China Resource Semico Co., Ltd <-- keyboard
Bus 001 Device 018: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse <-- mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
这是输出dmesg | tail
:
[ 9358.624908] input: SEM USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:1A2C:2124.0018/input/input58
[ 9358.681734] input: SEM USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:1A2C:2124.0018/input/input59
[ 9358.681902] hid-generic 0003:1A2C:2124.0018: input,hidraw6: USB HID v1.10 Device [SEM USB Keyboard] on usb-0000:00:14.0-2/input1
[ 9360.874780] usb 1-1: new low-speed USB device number 22 using xhci_hcd
[ 9361.018780] usb 1-1: New USB device found, idVendor=046d, idProduct=c05a, bcdDevice=63.00
[ 9361.018786] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 9361.018790] usb 1-1: Product: USB Optical Mouse
[ 9361.018793] usb 1-1: Manufacturer: Logitech
[ 9361.023264] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.0019/input/input60
[ 9361.023673] hid-generic 0003:046D:C05A.0019: input,hidraw7: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-1/input0
我已经检查过,当安装的内核版本与系统上次启动时使用的内核版本没有差异时,此错误仍然会发生:
[mindtree@mindtree ~]$ uname -r
4.18.12-arch1-1-ARCH
[mindtree@mindtree ~]$ pacman -Q linux
linux 4.18.12.arch1-1
当我的笔记本电脑插入电源和未插入电源时都会发生这种情况。
在插入两个设备的情况下重新启动我的机器可以可靠地检测到它们,并且一旦登录到 GNOME,它们都会做出响应。
偶尔这个错误根本不会发生,但它经常发生,而且我似乎无法找出原因。例如,刚才错误已经停止出现,但是自从我上次拔下它们并再次将它们重新插入以来,除了在该文本框中键入内容之外,我没有对系统进行任何操作。
我的笔记本电脑是运行 Arch Linux 和 Gnome 3.30.1 的 Razer Blade Stealth:
- 内存:15.6 GiB
- 处理器:Intel® Core™ i7-7500U CPU @ 2.70GHz × 4
- 显卡:英特尔® 高清显卡 620 (Kaby Lake GT2)
- 操作系统类型:64位
- 磁盘:503.0 GB
编辑:我刚开始工作,问题又出现了,所以这次我检查了更详细的journalctl
日志:
Oct 15 10:47:13 mindtree kernel: usb 1-1: new low-speed USB device number 17 using xhci_hcd
Oct 15 10:47:13 mindtree kernel: usb 1-1: New USB device found, idVendor=046d, idProduct=c05a, bcdDevice=63.00
Oct 15 10:47:13 mindtree kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 15 10:47:13 mindtree kernel: usb 1-1: Product: USB Optical Mouse
Oct 15 10:47:13 mindtree kernel: usb 1-1: Manufacturer: Logitech
Oct 15 10:47:13 mindtree kernel: input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E/input/input46
Oct 15 10:47:13 mindtree kernel: hid-generic 0003:046D:C05A.000E: input,hidraw7: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-1/input0
Oct 15 10:47:13 mindtree mtp-probe[7510]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Oct 15 10:47:13 mindtree mtp-probe[7510]: bus: 1, device: 17 was not an MTP device
Oct 15 10:47:13 mindtree systemd-udevd[7509]: failed to create db file '/run/udev/data/c189:16' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1'
Oct 15 10:47:13 mindtree systemd-udevd[7509]: failed to create db file '/run/udev/data/+usb:1-1:1.0' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0'
Oct 15 10:47:13 mindtree systemd-udevd[7509]: failed to create db file '/run/udev/data/+hid:0003:046D:C05A.000E' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E'
Oct 15 10:47:13 mindtree systemd-udevd[7509]: failed to create db file '/run/udev/data/+input:input46' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E/input/input46'
Oct 15 10:47:13 mindtree systemd-udevd[7524]: failed to create db file '/run/udev/data/c13:35' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E/input/input46/mouse3'
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) config/udev: Adding input device Logitech USB Optical Mouse (/dev/input/mouse3)
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) No input driver specified, ignoring this device.
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) This device may have been added with another device file.
Oct 15 10:47:13 mindtree systemd-udevd[7509]: failed to create db file '/run/udev/data/c13:87' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E/input/input46/event23'
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) config/udev: Adding input device Logitech USB Optical Mouse (/dev/input/event23)
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (**) Logitech USB Optical Mouse: Applying InputClass "libinput pointer catchall"
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) Using input driver 'libinput' for 'Logitech USB Optical Mouse'
Oct 15 10:47:13 mindtree systemd-udevd[7523]: failed to create db file '/run/udev/data/+hid:0003:046D:C05A.000E' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:046D:C05A.000E'
Oct 15 10:47:13 mindtree systemd-logind[445]: Failed to save session data /run/systemd/sessions/2: No space left on device
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (II) systemd-logind: got fd for /dev/input/event23 13:87 fd 58 paused 0
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (**) Logitech USB Optical Mouse: always reports core events
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (**) Option "Device" "/dev/input/event23"
Oct 15 10:47:13 mindtree /usr/lib/gdm-x-session[721]: (**) Option "_source" "server/udev"
Oct 15 10:47:13 mindtree kernel: rfkill: input handler enabled
Oct 15 10:47:13 mindtree systemd-udevd[7523]: failed to create db file '/run/udev/data/c189:16' for '/devices/pci0000:00/0000:00:14.0/usb1/1-1'
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (EE) libinput bug: udev device never initialized (/dev/input/event23)
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (EE) client bug: Invalid path /dev/input/event23
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (EE) libinput: Logitech USB Optical Mouse: Failed to create a device for /dev/input/event23
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (EE) PreInit returned 2 for "Logitech USB Optical Mouse"
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (II) UnloadModule: "libinput"
Oct 15 10:47:16 mindtree /usr/lib/gdm-x-session[721]: (II) systemd-logind: releasing fd for 13:87
Oct 15 10:47:16 mindtree systemd-logind[445]: Failed to save session data /run/systemd/sessions/2: No space left on device
Oct 15 10:47:18 mindtree nautilus[7452]: invalid (NULL) pointer instance
Oct 15 10:47:18 mindtree nautilus[7452]: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Oct 15 10:48:27 mindtree /usr/lib/gdm-x-session[721]: (EE) event19 - Synaptics TM2438-005: kernel bug: Touch jump detected and discarded.
Oct 15 10:48:27 mindtree /usr/lib/gdm-x-session[721]: See https://wayland.freedesktop.org/libinput/doc/1.12.1/touchpad-jumping-cursors.html for details
这至少提供了有关 gdm-x-session 日志的更多信息,这些日志似乎声称no input driver specified, ignoring this device
.我会调查这个错误并报告回来。
答案1
捂脸
似乎有一次,在尝试设置备份硬盘时,我不小心开始写入备份数据,/run/media/$USER/BackupData
而该卷实际上并不存在......反过来,文件系统中的随机备份数据转储又run
堵塞了它。rm
备份数据后,我再次插入鼠标,它似乎可以正常工作!我怀疑这也修复了我遇到的另一个错误,即 USB 存储设备上的权限会神秘地改变。