Fedora

鍵盤/滑鼠在連接到 USB 集線器時不起作用,但僅在 Fedora 上 - 適用於其他發行版

  • November 16, 2018

記錄一下,同樣的問題在 openSUSE 中也出現過,解決方法是一樣的。它在 Fedora 18(據我所知:我剛剛啟動了一張 live CD)和 openSUSE 12.3 中都已修復。

我在筆記型電腦上安裝了 Fedora 17,使用連接到集線器的鍵盤(Logitech K120)和滑鼠(通用 USB 滑鼠)。

然後我注意到鍵盤和滑鼠都不起作用。然而:

  • 它們確實可以在 Arch Linux、Windows、GRUB 和控制台上工作(它們只會在 X 啟動時死掉),無論它們是否連接到集線器。
  • 如果我將滑鼠/鍵盤直接插入 USB 埠,它們可以正常工作。

這表明 USB 集線器和鍵盤/滑鼠都沒有損壞。

相關設備的 lsusb(分別是 USB 集線器、鍵盤和滑鼠):

Bus 002 Device 004: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 002 Device 006: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 002 Device 005: ID 093a:2521 Pixart Imaging, Inc.   

有什麼線索嗎?


根據 sch 的評論進行編輯:

  • 鍵盤在控制台上工作。
  • xinput list只有當它們直接連接到 USB 埠時,鍵盤/滑鼠才會出現;不是當它們連接到集線器時。
  • /proc/interrupts即使游標沒有移動,當我移動滑鼠時也會發生變化。
  • 當我通過集線器插入滑鼠/鍵盤時,X 日誌中沒有任何反應。當我直接插入它們時,我會得到標準的日誌資訊:
[   407.686] (II) config/udev: Adding input device USB OPTICAL MOUSE (/dev/input/mouse1)
[   407.686] (II) No input driver specified, ignoring this device.
[   407.686] (II) This device may have been added with another device file.
[   407.686] (II) config/udev: Adding input device USB OPTICAL MOUSE (/dev/input/event8)
[   407.686] (**) USB OPTICAL MOUSE: Applying InputClass "evdev pointer catchall"
[   407.686] (II) Using input driver 'evdev' for 'USB OPTICAL MOUSE'
[   407.686]    Option "XkbRules" "evdev"
[   407.686]    Option "XkbModel" "evdev"
[   407.686]    Option "XkbLayout" "us"
[   407.686]    Option "_source" "server/udev"
[   407.686]    Option "name" "USB OPTICAL MOUSE"
[   407.686]    Option "path" "/dev/input/event8"
[   407.686]    Option "device" "/dev/input/event8"
[   407.686]    Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2/3-2:1.0/input/input30/event8"
[   407.686]    Option "driver" "evdev"
[   407.686] (**) USB OPTICAL MOUSE: always reports core events
[   407.686] (**) evdev: USB OPTICAL MOUSE: Device: "/dev/input/event8"
[   407.686] (--) evdev: USB OPTICAL MOUSE: Vendor 0x93a Product 0x2521
[   407.686] (--) evdev: USB OPTICAL MOUSE: Found 9 mouse buttons
[   407.686] (--) evdev: USB OPTICAL MOUSE: Found scroll wheel(s)
[   407.686] (--) evdev: USB OPTICAL MOUSE: Found relative axes
[   407.686] (--) evdev: USB OPTICAL MOUSE: Found x and y relative axes
[   407.686] (II) evdev: USB OPTICAL MOUSE: Configuring as mouse
[   407.686] (II) evdev: USB OPTICAL MOUSE: Adding scrollwheel support
[   407.686] (**) evdev: USB OPTICAL MOUSE: YAxisMapping: buttons 4 and 5
[   407.686] (**) evdev: USB OPTICAL MOUSE: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[   407.687] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2/3-2:1.0/input/input30/event8"
[   407.687] (II) XINPUT: Adding extended input device "USB OPTICAL MOUSE"  (type: MOUSE, id 17)
[   407.687] (II) evdev: USB OPTICAL MOUSE: initialized for relative axes.
[   407.687] (**) USB OPTICAL MOUSE: (accel) keeping acceleration scheme 1
[   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration profile 0
[   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration factor: 2.000
[   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration threshold: 4

這是Fedora 17 中的一個已知錯誤。對於“ Mimo 720 ”設備(帶有自己的 USB 集線器的 USB 監視器)/lib/udev/rules.d/71-seat.rules有一個規則,該設備使用相同的晶片組(因此相同的 USB ID)來執行此任務。

但是,因為我沒有使用 Mimo 720,所以配置錯誤。

解決方案是編輯/lib/udev/rules.d/71-seat.rules和評論該行

SUBSYSTEM=="usb", ATTR{idVendor}=="058f", ATTR{idProduct}=="6254", ENV{ID_AUTOSEAT}="1"

然後它完美地工作。事實上,在 Arch Linux 上進行了檢查,它使用不同的策略來檢測該設備:

# Mimo 720, with integrated USB hub, displaylink graphics, and e2i
# touchscreen. This device carries no proper VID/PID in the USB hub,
# but it does carry good ID data in the graphics component, hence we
# check it from the parent. There's a bit of a race here however,
# given that the child devices might not exist yet at the time this
# rule is executed. To work around this we'll trigger the parent from
# the child if we notice that the parent wasn't recognized yet.

引用自:https://unix.stackexchange.com/questions/52264