Eu tenho tido um problema estranho nos últimos dois meses em que o segundo dispositivo USB a ser conectado ao meu laptop não responde, apesar de aparecer em lsusb
e dmesg
aparentemente sem problemas.
Este é o caso do meu mouse USB e teclado USB. Qualquer que seja o dispositivo conectado primeiro (à porta USB, não parece importar qual) será reconhecido instantaneamente e funcionará sem problemas. O segundo dispositivo a ser conectado também aparece em lsusb
e dmesg
, mas não responde à entrada.
Aqui está a saída de lsusb
depois de conectar meu teclado (funcionando bem) e depois meu mouse (não responde):
[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
E aqui está a saída de 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
Verifiquei que esse bug ainda ocorre quando não há discrepâncias entre a versão instalada do kernel e aquela com a qual o sistema foi inicializado pela última vez:
[mindtree@mindtree ~]$ uname -r
4.18.12-arch1-1-ARCH
[mindtree@mindtree ~]$ pacman -Q linux
linux 4.18.12.arch1-1
Isso acontece quando meu laptop é conectado à tomada e quando não está.
A reinicialização da minha máquina com os dois dispositivos conectados detecta de forma confiável os dois e ambos são responsivos uma vez conectados ao GNOME.
Ocasionalmente este bug não ocorre, mas ocorre mais frequentemente do que não e não consigo rastrear a causa. Por exemplo, agora mesmo o bug parou de aparecer, no entanto eu não fiz nada para o sistema além de digitar nesta caixa de texto desde a última vez que os desconectei e os conectei novamente.
Meu laptop é um Razer Blade Stealth que executa o Arch Linux e o Gnome 3.30.1:
- Memória: 15,6 GiB
- Processador: CPU Intel® Core ™ i7-7500U @ 2.70GHz × 4
- Gráficos: Gráficos HD Intel® 620 (Kaby Lake GT2)
- Tipo de SO: 64 bits
- Disco: 503,0 GB
Edit: Acabei de trabalhar e o problema ocorreu novamente, então desta vez eu verifiquei os mais detalhados journalctl
logs:
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
Isso, pelo menos, fornece mais algumas informações sobre os logs do gdm-x-session, que parecem afirmar que no input driver specified, ignoring this device
. Vou investigar esse erro e reportar de volta.