我有一台 NETWAY GAMING ARCADE Fighter PS3/PC。该设备在 Windows 下工作正常,在 recalbox 4.1 上也能正常工作,但在我尝试过的任何当前 Linux 上都不能工作。
我尝试使用各种旧版本重新编译 hid-sony,包括在 recalbox 4.1 (v4.4.13) 上运行的相同版本。在最近的 ubuntu 中使用该版本时,它似乎改进了检测,但仍然失败。
以下是设备的日志:
RECALBOX user.info kernel: [ 99.858844] usb 1-1.4: new full-speed USB device number 5 using dwc_otg
RECALBOX user.info kernel: [ 99.980280] usb 1-1.4: New USB device found, idVendor=054c, idProduct=0268
RECALBOX user.info kernel: [ 99.980789] usb 1-1.4: Mew USB device strings: Mfr=0, Product=2, SerialNunmber=0
RECALBOX user.info kernel: [ 99.960296] usb 1-1.4: Product: USB Controller
RECALBOX user.info kernel: [ 100.135534] usb 1-1.4: USB disconnect, device number 5
RECALBOX user.info kernel: [ 100.135955] input: USB Controller as /devices/platform/soc/3f980000.usb/usb1/1—1/1-1.4/1-1.4:1.0/0003:054C:0268.0003/input/input2
RECALBOX user.info kernel: [ 100.136001] sony 0003:054C:0268.0003: input,hiddev0,hidraw2: USB HID v1.11 Joystick [USB Controller! on ush—3f980000.usb—1.4/input0
RECALBOX user.err kernel: [ 100.136022] sony 0003:054C:0268.0003: can’t set operational mode: step 1
RECALBOX user.info kernel: [ 101.138844] usb 1-1.4: new full-speed USB device number 6 using dwc_otg
RECALBOX user.info kernel: [ 101.253950] usb 1-1.4: New USB device found, idVendor=1345, idProduct=3008
RECALBOX user.info kernel: [ 101.253959] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
RECALBOX user.info kernel: [ 101.253965] usb 1-1.4: Product: USB Controller
RECALBOX user.info kernel: [ 101.275011] input: USB Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:1345:3008.0004/input/input3
RECALBOX user.info kernel: [ 101.275358] hid-generic 0003:1345:3008.0004: input,hidraw2: USB HID v1.10 Gamepad [USB Controller] on usb—3f980000.usb—1.4/inputO
(recalbox 4.1,工作中)
ubuntu kernel: [ 4639.424468] usb 1-8: new full-speed USB device number 32 using xhci_hcd
ubuntu kernel: [ 4639.758139] usb 1-8: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
ubuntu kernel: [ 4639.758142] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [ 4639.758145] usb 1-8: Product: USB Controller
ubuntu kernel: [ 4639.919303] sony 0003:054C:0268.0023: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
ubuntu kernel: [ 4639.919558] sony 0003:054C:0268.0023: hiddev3,hidraw5: USB HID v81.11 Joystick [USB Controller] on usb-0000:15:00.0-8/input0
ubuntu kernel: [ 4639.919560] sony 0003:054C:0268.0023: failed to claim input
ubuntu kernel: [ 4639.919678] usb 1-8: USB disconnect, device number 32
ubuntu kernel: [ 4640.892687] usb 1-8: new full-speed USB device number 33 using xhci_hcd
ubuntu kernel: [ 4641.225377] usb 1-8: New USB device found, idVendor=1345, idProduct=3008, bcdDevice= 1.00
ubuntu kernel: [ 4641.225381] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [ 4641.225383] usb 1-8: Product: USB Controller
ubuntu kernel: [ 4641.252351] sony 0003:1345:3008.0024: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
ubuntu kernel: [ 4641.252760] sony 0003:1345:3008.0024: hiddev4,hidraw6: USB HID v81.10 Gamepad [USB Controller] on usb-0000:15:00.0-8/input0
ubuntu kernel: [ 4641.252762] sony 0003:1345:3008.0024: failed to claim input
(ubuntu 18.10默认模块,不工作)
ubuntu kernel: [20957.230577] usb 1-9: new full-speed USB device number 14 using xhci_hcd
ubuntu kernel: [20957.563354] usb 1-9: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
ubuntu kernel: [20957.563358] usb 1-9: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [20957.563360] usb 1-9: Product: USB Controller
ubuntu kernel: [20957.597896] input: USB Controller as /devices/pci0000:00/0000:00:01.2/0000:15:00.0/usb1/1-9/1-9:1.0/0003:054C:0268.000D/input/input27
ubuntu kernel: [20957.598255] sony 0003:054C:0268.000D: input,hiddev1,hidraw3: USB HID v1.11 Joystick [USB Controller] on usb-0000:15:00.0-9/input0
ubuntu kernel: [20957.724424] sony 0003:054C:0268.000D: can't set operational mode: step 1
ubuntu kernel: [20957.810926] sony: probe of 0003:054C:0268.000D failed with error -71
ubuntu kernel: [20957.811129] usb 1-9: USB disconnect, device number 14
ubuntu kernel: [20958.702612] usb 1-9: new full-speed USB device number 15 using xhci_hcd
ubuntu kernel: [20959.033593] usb 1-9: New USB device found, idVendor=1345, idProduct=3008, bcdDevice= 1.00
ubuntu kernel: [20959.033597] usb 1-9: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [20959.033599] usb 1-9: Product: USB Controller
(ubuntu 18.10 模块 v4.4.13,不工作)
Bus 001 Device 035: ID 1345:3008 Sino Lite Technology Corp.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1345 Sino Lite Technology Corp.
idProduct 0x3008
bcdDevice 1.00
iManufacturer 0
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 112
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 10
(lsusb-v)
我注意到的是,使用 recalbox,设备最终由 hid-generic 管理,但是使用为 ubuntu 编译的相同版本的 hid-sony,它不会触发 hid-generic,并且 hid-sony 失败。
有没有办法强制它由 hid-generic 而不是 hid-sony 管理,就像 recalbox 发生的那样?可能是通过一些USB怪癖?
更新:
我认为这个补丁是在 recalbox 4.1 中工作和在具有相同 hid-sony.c 驱动程序版本的 ubuntu 中不工作之间的区别的原因。
https://patchwork.kernel.org/patch/8026101/
在我看来,自从添加
#define USB_VENDOR_ID_SINO_LITE 0x1345
#define USB_DEVICE_ID_SINO_LITE_CONTROLLER 0x3008
游戏手柄由 hid-sony.c 管理,因为 hid-core.c 会检查 hid_have_special_driver 和供应商/设备组合是否匹配。
那么除了重新编译整个内核并替换我的设备的设备标识符之外,还有其他解决方案吗?
我可以使用 hid quirks 或 udev 让游戏手柄向操作系统报告不同的设备 ID 吗?
感谢您的任何想法!
答案1
我发现隐藏模块有参数忽略特殊驱动程序它就是这样做的,忽略所有专用驱动程序并使用 hid-generic 来处理设备。
由于 hid-sony 模块无法正确支持我的 PS3 克隆街机棒,因此将参数添加到 hid 模块可以解决该问题。
$ sudo vi /etc/modprobe.d/hid.conf
options hid ignore_special_drivers=1
$ sudo update-initramfs -u
$ reboot
$ tail /var/log/kern.log
ubuntu kernel: [ 119.966133] usb 1-8: new full-speed USB device number 5 using xhci_hcd
ubuntu kernel: [ 120.299429] usb 1-8: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
ubuntu kernel: [ 120.299433] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [ 120.299435] usb 1-8: Product: USB Controller
ubuntu kernel: [ 120.333900] input: USB Controller as /devices/pci0000:00/0000:00:01.2/0000:15:00.0/usb1/1-8/1-8:1.0/0003:054C:0268.0004/input/input18
ubuntu kernel: [ 120.334403] hid-generic 0003:054C:0268.0004: input,hidraw3: USB HID v1.11 Joystick [USB Controller] on usb-0000:15:00.0-8/input0
ubuntu kernel: [ 120.459845] usb 1-8: USB disconnect, device number 5
ubuntu kernel: [ 121.434688] usb 1-8: new full-speed USB device number 6 using xhci_hcd
ubuntu kernel: [ 121.765665] usb 1-8: New USB device found, idVendor=1345, idProduct=3008, bcdDevice= 1.00
ubuntu kernel: [ 121.765669] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
ubuntu kernel: [ 121.765671] usb 1-8: Product: USB Controller
ubuntu kernel: [ 121.791046] input: USB Controller as /devices/pci0000:00/0000:00:01.2/0000:15:00.0/usb1/1-8/1-8:1.0/0003:1345:3008.0005/input/input19
ubuntu kernel: [ 121.851274] hid-generic 0003:1345:3008.0005: input,hidraw3: USB HID v1.10 Gamepad [USB Controller] on usb-0000:15:00.0-8/input0
尽管如此,如果我有一个原始的索尼游戏控制器并想同时使用两者,我仍然更喜欢一个允许忽略特定 VendorID/ProductID 组合的特殊驱动程序的解决方案。