更新:内核为 5.8 的 20.10 也出现了同样的问题。
我的鼠标时不时会卡住,当设备被 UDEV 删除并再次添加时,鼠标会变得无响应。请参阅下面的日志。
还有一篇帖子说根本检测不到键盘和鼠标,并且该帖子建议重新安装操作系统,但一定有一个无需重新安装就能妥善解决这个问题的办法。
这个问题的线索可能是:okt 21 15:12:37 trillian /usr/lib/gdm3/gdm-x-session[2808]: (II) This device may have been added with another device file.
但是我可以在哪里检查该设备是否有多个条目?
/usr/lib/gdm3/gdm-x-session[205327]: (**) Option "fd" "109"
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device removed
/usr/lib/gdm3/gdm-x-session[205327]: (II) UnloadModule: "libinput"
/usr/lib/gdm3/gdm-x-session[205327]: (II) systemd-logind: releasing fd for 13:67
gnome-shell[205444]: pushModal: invocation of begin_modal failed
kernel: usb 2-1.6: new full-speed USB device number 36 using ehci-pci
kernel: usb 2-1.6: New USB device found, idVendor=046d, idProduct=c245, bcdDevice=69.00
kernel: usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: usb 2-1.6: Product: Gaming Mouse G400
kernel: usb 2-1.6: Manufacturer: Logitech
kernel: input: Logitech Gaming Mouse G400 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/0003:046D:C245.003C/input/input48
kernel: hid-generic 0003:046D:C245.003C: input,hidraw1: USB HID v1.10 Mouse [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.6/input0
kernel: hid-generic 0003:046D:C245.003D: hiddev0,hidraw2: USB HID v1.10 Device [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.6/input1
mtp-probe[782715]: checking bus 2, device 36: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6"
mtp-probe[782715]: bus: 2, device: 36 was not an MTP device
/usr/lib/gdm3/gdm-x-session[2808]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0)
/usr/lib/gdm3/gdm-x-session[2808]: (II) No input driver specified, ignoring this device.
/usr/lib/gdm3/gdm-x-session[2808]: (II) This device may have been added with another device file.
/usr/lib/gdm3/gdm-x-session[205327]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0)
/usr/lib/gdm3/gdm-x-session[205327]: (II) No input driver specified, ignoring this device.
/usr/lib/gdm3/gdm-x-session[205327]: (II) This device may have been added with another device file.
/usr/lib/gdm3/gdm-x-session[2808]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event3)
/usr/lib/gdm3/gdm-x-session[2808]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall"
/usr/lib/gdm3/gdm-x-session[2808]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400'
mtp-probe[782731]: checking bus 2, device 36: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6"
mtp-probe[782731]: bus: 2, device: 36 was not an MTP device
/usr/lib/gdm3/gdm-x-session[2808]: (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 27 paused 1
/usr/lib/gdm3/gdm-x-session[2808]: (II) systemd-logind: releasing fd for 13:67
/usr/lib/gdm3/gdm-x-session[205327]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event3)
/usr/lib/gdm3/gdm-x-session[205327]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall"
/usr/lib/gdm3/gdm-x-session[205327]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400'
/usr/lib/gdm3/gdm-x-session[205327]: (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 109 paused 0
/usr/lib/gdm3/gdm-x-session[205327]: (**) Logitech Gaming Mouse G400: always reports core events
/usr/lib/gdm3/gdm-x-session[205327]: (**) Option "Device" "/dev/input/event3"
/usr/lib/gdm3/gdm-x-session[205327]: (**) Option "_source" "server/udev"
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device set to 800 DPI
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device is a pointer
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device removed
/usr/lib/gdm3/gdm-x-session[205327]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/0003:046D:C245.003C/input/input48/event3"
/usr/lib/gdm3/gdm-x-session[205327]: (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G400" (type: MOUSE, id 10)
/usr/lib/gdm3/gdm-x-session[205327]: (**) Option "AccelerationScheme" "none"
/usr/lib/gdm3/gdm-x-session[205327]: (**) Logitech Gaming Mouse G400: (accel) selected scheme none/0
/usr/lib/gdm3/gdm-x-session[205327]: (**) Logitech Gaming Mouse G400: (accel) acceleration factor: 2.000
/usr/lib/gdm3/gdm-x-session[205327]: (**) Logitech Gaming Mouse G400: (accel) acceleration threshold: 4
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device set to 800 DPI
/usr/lib/gdm3/gdm-x-session[205327]: (II) event3 - Logitech Gaming Mouse G400: device is a pointer
上面的日志中,有一段特别引起了我的注意:
/usr/lib/gdm3/gdm-x-session[205327]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0)
/usr/lib/gdm3/gdm-x-session[205327]: (II) No input driver specified, ignoring this device.
/usr/lib/gdm3/gdm-x-session[205327]: (II) This device may have been added with another device file.
/usr/lib/gdm3/gdm-x-session[2808]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event3)
看起来该设备同时注册到两个不同的设备:/dev/input/mouse0
和/dev/input/event3
。
我们是否可以正确地假设这就是导致间歇性问题的原因?
现在,在移除并重新添加设备后,出现了一个新问题。设备完全停止工作,键盘也停止工作。以下错误正在向日志发送垃圾邮件:
kernel: usb 2-1.2: reset full-speed USB device number 28 using ehci-pci
kernel: usb 2-1.1: reset full-speed USB device number 3 using ehci-pci
kernel: usb 2-1.2: reset full-speed USB device number 28 using ehci-pci
kernel: usb 2-1.2: reset full-speed USB device number 28 using ehci-pci
kernel: usb 2-1.2: device descriptor read/all, error -32
kernel: usb 2-1.2: reset full-speed USB device number 28 using ehci-pci
kernel: usb 2-1.2: reset full-speed USB device number 28 using ehci-pci
kernel: usb 2-1.2: device descriptor read/all, error -32
[..]
为了使鼠标和键盘再次工作,我必须将它们从计算机后面的 USB 插孔中拔出,然后将它们插入我的 USB 集线器。
我还尝试通过添加并验证自动挂起是否已禁用来禁用 USB 自动GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"
挂起/etc/default/grub
:
# cat /sys/module/usbcore/parameters/autosuspend
-1
该问题与 2018 年报告的一个错误类似,我添加了评论,显示最新断开/连接的日志输出并链接到此帖子。 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1794245
dmesg 信息:
1870.524306] usb 2-1.4.2: USB disconnect, device number 16
[ 1870.901919] usb 2-1.4.2: new full-speed USB device number 17 using ehci-pci
[ 1871.497893] usb 2-1.4.2: device not accepting address 17, error -32
[ 1871.885903] usb 2-1.4.2: new full-speed USB device number 18 using ehci-pci
[ 1872.097419] usb 2-1.4.2: New USB device found, idVendor=046d, idProduct=c245, bcdDevice=69.00
[ 1872.097423] usb 2-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1872.097425] usb 2-1.4.2: Product: Gaming Mouse G400
[ 1872.097426] usb 2-1.4.2: Manufacturer: Logitech
[ 1872.099567] input: Logitech Gaming Mouse G400 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2/2-1.4.2:1.0/0003:046D:C245.0018/input/input30
[ 1872.158074] hid-generic 0003:046D:C245.0018: input,hidraw0: USB HID v1.10 Mouse [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input0
[ 1872.159609] hid-generic 0003:046D:C245.0019: hiddev0,hidraw1: USB HID v1.10 Device [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input1
[ 1872.572295] usb 2-1.4.2: USB disconnect, device number 18
[ 1872.961869] usb 2-1.4.2: new full-speed USB device number 19 using ehci-pci
[ 1873.173417] usb 2-1.4.2: New USB device found, idVendor=046d, idProduct=c245, bcdDevice=69.00
[ 1873.173421] usb 2-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1873.173423] usb 2-1.4.2: Product: Gaming Mouse G400
[ 1873.173425] usb 2-1.4.2: Manufacturer: Logitech
[ 1873.175597] input: Logitech Gaming Mouse G400 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2/2-1.4.2:1.0/0003:046D:C245.001A/input/input31
[ 1873.234054] hid-generic 0003:046D:C245.001A: input,hidraw0: USB HID v1.10 Mouse [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input0
[ 1873.235454] hid-generic 0003:046D:C245.001B: hiddev0,hidraw1: USB HID v1.10 Device [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input1
答案1
这个问题似乎根本不是软件问题,当我在 Fedora 上安装 Ubuntu 时出现这个问题只是巧合,而不是 Ubuntu 本身的问题。根据这个 YouTube 视频,解释了如何拆卸鼠标:
位于弯曲处的电缆较粗部分似乎总是因使用而磨损得太快。但是,如果您将电缆拉入几厘米,使电缆在弯曲处正常伸展,鼠标将正常工作,并且在使用过程中不会断开。