首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未正确检测到Gamepad

未正确检测到Gamepad
EN

Ask Ubuntu用户
提问于 2020-05-31 22:42:54
回答 1查看 2.6K关注 0票数 0

我在Ubuntu18.04中的一个无线游戏垫控制器有一些问题。直到最近还很正常。jstest和evtest似乎都检测到了它的输入,但是按钮映射是不正确的,并且游戏/仿真器似乎没有识别它。

lsusb返回以下内容:

代码语言:javascript
复制
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
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 008: ID 17e9:436e DisplayLink 
Bus 001 Device 011: ID 0b0e:0301 GN Netcom 
Bus 001 Device 010: ID 413c:2107 Dell Computer Corp. 
Bus 001 Device 009: ID 0461:4d22 Primax Electronics, Ltd 
Bus 001 Device 007: ID 2109:2813 VIA Labs, Inc. 
Bus 001 Device 006: ID 17e9:436e DisplayLink 
Bus 001 Device 004: ID 2109:2813 VIA Labs, Inc. 
Bus 001 Device 003: ID 048d:8297 Integrated Technology Express, Inc. 
Bus 001 Device 002: ID 8087:0aa7 Intel Corp. 
Bus 001 Device 013: ID 11c1:9101  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我注意到有一个没有描述符/名称的设备(11c1:9101),它原来是游戏垫。

运行'lsusb -d 11c1:9101-v‘的设备的详细信息:

代码语言:javascript
复制
Bus 001 Device 013: ID 11c1:9101  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x11c1
  idProduct          0x9101
  bcdDevice            1.00
  iManufacturer           1  
  iProduct                2 ESM-9013
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     137
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4
Device Status:     0x0000
  (Bus Powered)

似乎游戏垫被确认为HID设备,这可能是问题的一部分,但不确定如何解决它。运行“dmesg\ grep hid”以确认这一点的结果:

代码语言:javascript
复制
[    4.860713] hidraw: raw HID events driver (C) Jiri Kosina
[    4.873302] usbcore: registered new interface driver usbhid
[    4.873302] usbhid: USB HID core driver
[    4.874614] hid-generic 0003:048D:8297.0001: hiddev0,hidraw0: USB HID v1.10 Device [ITE Tech. Inc. ITE Device(8595)] on usb-0000:01:00.0-8/input0
[    4.874749] hid-generic 0003:11C1:9101.0002: input,hidraw1: USB HID v1.11 Gamepad [   ESM-9013] on usb-0000:01:00.0-10/input0
[    5.805426] hid-generic 0003:0461:4D22.0003: input,hidraw2: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:01:00.0-9.2.1/input0
[    6.360241] hid-generic 0003:413C:2107.0004: input,hidraw3: USB HID v1.10 Keyboard [Dell Dell USB Entry Keyboard] on usb-0000:01:00.0-9.2.2/input0
[   14.272182] jabra 0003:0B0E:0301.0005: input,hiddev1,hidraw4: USB HID v1.00 Device [GN Netcom A/S Jabra EVOLVE 20] on usb-0000:01:00.0-9.2.3/input3
[ 1094.275956] hid-generic 0003:057E:2009.0006: input,hidraw1: USB HID v1.11 Joystick [  PC USB CONTROLLER 1.06] on usb-0000:01:00.0-10/input0
[ 1095.247965] hid-generic 0003:11C1:9101.0007: input,hidraw1: USB HID v1.11 Gamepad [   ESM-9013] on usb-0000:01:00.0-10/input0

看起来游戏垫有三个不同的条目,我只有一个连接。

这也可能是与steamos-xpad-dkms的某种冲突,我记得我在一个蒸汽游戏中使用它,在我下一次尝试使用它时,它就不再被游戏检测到了。

更新06-01-2020

下面是我在syslog中注意到的一些不寻常的活动:

代码语言:javascript
复制
Jun  1 00:50:04 viru-b450 kernel: [26378.903526] hid-generic 0003:057E:2009.0025: input,hidraw4: USB HID v1.11 Joystick [  PC USB CONTROLLER 1.06] on usb-0000:01:00.0-10/input0
Jun  1 00:50:04 viru-b450 systemd-udevd[1211]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) config/udev: Adding input device   PC USB CONTROLLER 1.06 (/dev/input/js0)
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) This device may have been added with another device file.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) config/udev: Adding input device   PC USB CONTROLLER 1.06 (/dev/input/js0)
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) This device may have been added with another device file.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) config/udev: Adding input device   PC USB CONTROLLER 1.06 (/dev/input/event16)
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) This device may have been added with another device file.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) config/udev: Adding input device   PC USB CONTROLLER 1.06 (/dev/input/event16)
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:04 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) This device may have been added with another device file.
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0/0003:057E:2009.0025
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10
Jun  1 00:50:04 viru-b450 kernel: [26379.152145] usb 1-10: USB disconnect, device number 38
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0/0003:057E:2009.0025
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0
Jun  1 00:50:04 viru-b450 upowerd[2639]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10
Jun  1 00:50:05 viru-b450 kernel: [26379.503364] usb 1-10: new full-speed USB device number 39 using xhci_hcd
Jun  1 00:50:05 viru-b450 kernel: [26379.835592] usb 1-10: New USB device found, idVendor=11c1, idProduct=9101, bcdDevice= 1.00
Jun  1 00:50:05 viru-b450 kernel: [26379.835595] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun  1 00:50:05 viru-b450 kernel: [26379.835596] usb 1-10: Product: ESM-9013
Jun  1 00:50:05 viru-b450 kernel: [26379.835597] usb 1-10: Manufacturer:  
Jun  1 00:50:05 viru-b450 kernel: [26379.861838] input:    ESM-9013 as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0/0003:11C1:9101.0026/input/input48
Jun  1 00:50:05 viru-b450 mtp-probe: checking bus 1, device 39: "/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10"
Jun  1 00:50:05 viru-b450 mtp-probe: bus: 1, device: 39 was not an MTP device
Jun  1 00:50:05 viru-b450 kernel: [26379.919868] hid-generic 0003:11C1:9101.0026: input,hidraw4: USB HID v1.11 Gamepad [   ESM-9013] on usb-0000:01:00.0-10/input0
Jun  1 00:50:05 viru-b450 systemd-udevd[1229]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) config/udev: Adding input device    ESM-9013 (/dev/input/js0)
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) This device may have been added with another device file.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) config/udev: Adding input device    ESM-9013 (/dev/input/js0)
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) This device may have been added with another device file.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) config/udev: Adding input device    ESM-9013 (/dev/input/event16)
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[2430]: (II) This device may have been added with another device file.
Jun  1 00:50:05 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0/0003:11C1:9101.0026
Jun  1 00:50:05 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10/1-10:1.0
Jun  1 00:50:05 viru-b450 upowerd[2639]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-10
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) config/udev: Adding input device    ESM-9013 (/dev/input/event16)
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) No input driver specified, ignoring this device.
Jun  1 00:50:05 viru-b450 /usr/lib/gdm3/gdm-x-session[11095]: (II) This device may have been added with another device file.

回避结果:

代码语言:javascript
复制
Available devices:
/dev/input/event0:  Power Button
/dev/input/event1:  Power Button
/dev/input/event2:  USB Optical Mouse
/dev/input/event3:  Dell Dell USB Entry Keyboard
/dev/input/event4:  HDA ATI HDMI HDMI/DP,pcm=3
/dev/input/event5:  HDA ATI HDMI HDMI/DP,pcm=7
/dev/input/event6:  HDA ATI HDMI HDMI/DP,pcm=8
/dev/input/event7:  HDA ATI HDMI HDMI/DP,pcm=9
/dev/input/event8:  HDA ATI HDMI HDMI/DP,pcm=10
/dev/input/event9:  HDA ATI HDMI HDMI/DP,pcm=11
/dev/input/event10: HD-Audio Generic Front Mic
/dev/input/event11: HD-Audio Generic Rear Mic
/dev/input/event12: HD-Audio Generic Line
/dev/input/event13: HD-Audio Generic Line Out
/dev/input/event14: HD-Audio Generic Front Headphone
/dev/input/event15: GN Netcom A/S Jabra EVOLVE 20
/dev/input/event16:    ESM-9013
Select the device event number [0-16]: 16
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x11c1 product 0x9101 version 0x111
Input device name: "   ESM-9013"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 306 (BTN_C)
    Event code 307 (BTN_NORTH)
    Event code 308 (BTN_WEST)
    Event code 309 (BTN_Z)
    Event code 310 (BTN_TL)
    Event code 311 (BTN_TR)
    Event code 312 (BTN_TL2)
    Event code 313 (BTN_TR2)
    Event code 314 (BTN_SELECT)
    Event code 315 (BTN_START)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 1 (ABS_Y)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 2 (ABS_Z)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 5 (ABS_RZ)
      Value    128
      Min        0
      Max      255
      Flat      15
    Event code 16 (ABS_HAT0X)
      Value      0
      Min       -1
      Max        1
    Event code 17 (ABS_HAT0Y)
      Value      0
      Min       -1
      Max        1
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1591054847.916049, type 3 (EV_ABS), code 0 (ABS_X), value 76
Event: time 1591054847.916049, -------------- SYN_REPORT ------------
Event: time 1591054847.924049, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1591054847.924049, -------------- SYN_REPORT ------------
Event: time 1591054847.976047, type 3 (EV_ABS), code 1 (ABS_Y), value 106
Event: time 1591054847.976047, -------------- SYN_REPORT ------------
Event: time 1591054847.984044, type 3 (EV_ABS), code 1 (ABS_Y), value 66
Event: time 1591054847.984044, -------------- SYN_REPORT ------------
Event: time 1591054847.992050, type 3 (EV_ABS), code 1 (ABS_Y), value 17
Event: time 1591054847.992050, -------------- SYN_REPORT ------------
Event: time 1591054848.000040, type 3 (EV_ABS), code 0 (ABS_X), value 6
Event: time 1591054848.000040, type 3 (EV_ABS), code 1 (ABS_Y), value 0

udevadm信息:

代码语言:javascript
复制
P: /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-9/1-9.4/1-9.4:1.0/0003:11C1:9101.0006/input/input17/event16
N: input/event16
S: input/by-id/usb-_ESM-9013-event-joystick
S: input/by-path/pci-0000:01:00.0-usb-0:9.4:1.0-event-joystick
E: DEVLINKS=/dev/input/by-path/pci-0000:01:00.0-usb-0:9.4:1.0-event-joystick /dev/input/by-id/usb-_ESM-9013-event-joystick
E: DEVNAME=/dev/input/event16
E: DEVPATH=/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-9/1-9.4/1-9.4:1.0/0003:11C1:9101.0006/input/input17/event16
E: ID_BUS=usb
E: ID_FOR_SEAT=input-pci-0000_01_00_0-usb-0_9_4_1_0
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_MODEL=ESM-9013
E: ID_MODEL_ENC=ESM-9013
E: ID_MODEL_ID=9101
E: ID_PATH=pci-0000:01:00.0-usb-0:9.4:1.0
E: ID_PATH_TAG=pci-0000_01_00_0-usb-0_9_4_1_0
E: ID_REVISION=0100
E: ID_SERIAL=_ESM-9013
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR_ENC=\x20\x20
E: ID_VENDOR_ID=11c1
E: LIBINPUT_DEVICE_GROUP=3/11c1/9101:usb-0000:01:00.0-9
E: MAJOR=13
E: MINOR=80
E: SUBSYSTEM=input
E: TAGS=:uaccess:seat:
E: USEC_INITIALIZED=75198405

Dolphin仿真器在evdev/0/时正确地识别它,但是其他仿真器(如VBA和Snes9x )无法正确识别它,尽管它以前工作得很好。

EN

回答 1

Ask Ubuntu用户

发布于 2023-01-14 13:43:19

在我的例子中,同样的品牌控制器(ESM-9101)由于某种原因被检测为“开关专业控制器”,它也扰乱了输入。最近发现,您可以将这种“输入设备类型”黑名单在mod探头中,这样就可以最终检测到受控的xbox控制器。

我找到解决方案和代码的原始位置:

回显‘安装hid_nintendo /bin/true’\ sudo、sudo、-a /etc/modprobe.d/blacklist.conf或/和回显‘黑名单hid_nintendo’\sudo -a /etc/modprobe.d/no-nintendo.conf

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1245625

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档