Gamepad - Nenhum evento de entrada

0

Estou tentando usar um gamepad no linux (kernel is 4.16.10) e não consigo obter nenhum evento de entrada.

O dispositivo, um controlador xbox 360 falso, parece ser detectado, pois dmesg parece informar:

#dmesg when pluging in controller

[29505.029981] usb 1-2: new full-speed USB device number 29 using xhci_hcd
[29505.158111] usb 1-2: New USB device found, idVendor=2563, idProduct=0575
[29505.158116] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[29505.158119] usb 1-2: Product: PS3/PC Gamepad
[29505.158121] usb 1-2: Manufacturer: SHANWAN
[29505.160469] input: SHANWAN PS3/PC Gamepad as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2563:0575.000D/input/input52
[29505.160604] hid-generic 0003:2563:0575.000D: input,hidraw0: USB HID v1.10 Gamepad [SHANWAN PS3/PC Gamepad] on usb-0000:00:14.0-2/input0
[29505.238365] usb 1-2: USB disconnect, device number 29
[29505.845839] usb 1-2: new full-speed USB device number 30 using xhci_hcd
[29505.974584] usb 1-2: New USB device found, idVendor=045e, idProduct=028e
[29505.974590] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[29505.974594] usb 1-2: Product: Controller
[29505.974598] usb 1-2: Manufacturer: SHANWAN
[29505.976469] input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/input/input53

Eu tentei com os drivers evdev e joystick :

# /var/log/x-0.log with joystick driver

(II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/event7)
(**) Microsoft X-Box 360 pad: Applying InputClass "joystick catchall"
(II) Using input driver 'joystick' for 'Microsoft X-Box 360 pad'
(**) Microsoft X-Box 360 pad: always reports core events
(**) Microsoft X-Box 360 pad (keys): Applying InputClass "joystick catchall"
(II) Using input driver 'joystick' for 'Microsoft X-Box 360 pad (keys)'
(**) Microsoft X-Box 360 pad (keys): always reports core events
(**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/input/input55/event7"
(II) XINPUT: Adding extended input device "Microsoft X-Box 360 pad (keys)" (type: JOYSTICK, id 18)
(**) Option "Device" "/dev/input/event7"
(**) Option "StartMouseEnabled" "False"
(**) Option "StartKeysEnabled" "False"
(**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/input/input55/event7"
(II) XINPUT: Adding extended input device "Microsoft X-Box 360 pad" (type: JOYSTICK, id 19)
(II) Joystick: Microsoft X-Box 360 pad. bus 0x3 vendor 0x45e product 0x28e version 0x110
(II) Joystick: found 8 axes, 11 buttons
JOYSTICK: DebugLevel set to 0
(**) Microsoft X-Box 360 pad: (accel) keeping acceleration scheme 1
(**) Microsoft X-Box 360 pad: (accel) acceleration profile 0
(**) Microsoft X-Box 360 pad: (accel) acceleration factor: 2.000
(**) Microsoft X-Box 360 pad: (accel) acceleration threshold: 4

# /var/log/x-0.log with evdev driver

(II) config/udev: removing device Microsoft X-Box 360 pad
(II) evdev: Microsoft X-Box 360 pad: Close
(II) UnloadModule: "evdev"
(II) config/udev: Adding input device SHANWAN PS3/PC Gamepad (/dev/input/js0)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device (unnamed) (/dev/input/event7)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/js0)
(**) Microsoft X-Box 360 pad: Applying InputClass "joystick catchall"
(II) Using input driver 'evdev' for 'Microsoft X-Box 360 pad'
(**) Microsoft X-Box 360 pad: always reports core events
(**) evdev: Microsoft X-Box 360 pad: Device: "/dev/input/js0"
(EE) evdev: Microsoft X-Box 360 pad: Unable to query fd: Invalid argument
(EE) PreInit returned 2 for "Microsoft X-Box 360 pad"
(II) UnloadModule: "evdev"
(II) config/udev: Adding input device Microsoft X-Box 360 pad (/dev/input/event7)
(**) Microsoft X-Box 360 pad: Applying InputClass "joystick catchall"
(II) Using input driver 'evdev' for 'Microsoft X-Box 360 pad'
(**) Microsoft X-Box 360 pad: always reports core events
(**) evdev: Microsoft X-Box 360 pad: Device: "/dev/input/event7"
(--) evdev: Microsoft X-Box 360 pad: Vendor 0x45e Product 0x28e
(--) evdev: Microsoft X-Box 360 pad: Found absolute axes
(--) evdev: Microsoft X-Box 360 pad: Found x and y absolute axes
(II) evdev: Microsoft X-Box 360 pad: Forcing relative x/y axes to exist.
(II) evdev: Microsoft X-Box 360 pad: Configuring as mouse
(**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/input/input59/event7"
(II) XINPUT: Adding extended input device "Microsoft X-Box 360 pad" (type: MOUSE, id 16)
(II) evdev: Microsoft X-Box 360 pad: initialized for absolute axes.
(**) Microsoft X-Box 360 pad: (accel) keeping acceleration scheme 1
(**) Microsoft X-Box 360 pad: (accel) acceleration profile 0
(**) Microsoft X-Box 360 pad: (accel) acceleration factor: 2.000
(**) Microsoft X-Box 360 pad: (accel) acceleration threshold: 4

No entanto, não consigo obter nenhum evento de entrada nem com jstest nem evtest (como raiz e não raiz). Mesmo com xboxdrv btw.

Alguém tem alguma ideia ou iniciativa para encontrar uma solução para esse problema?

Obrigado,

    
por lHart 30.05.2018 / 15:45

0 respostas