FS#18558 - [hal] Speedlink 360 style gamepad requires custom HAL rule then crashes X in fullscreen games

Attached to Project: Arch Linux
Opened by Mahen (mahen) - Thursday, 04 March 2010, 14:00 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 18 August 2010, 21:30 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Gamepad requires custom HAL rules, is detected as both a mouse & gamepad, then X crashes when using it in some fullscreen apps.

Hardware : Speedlink 360 Style gamepad = Speedlink SL-6555-SBK = ACRUX USB GAMEPAD 8116

Steps to reproduce:

This issue seems to be partly upstream and partly distro specific (the crash doesn't occur with Ubuntu Karmic)

1) out of the box, the gamepad seems detected, and a /dev/input/js0 device is present. GUIs like QMC2 even display its name, axis etc. But buttons / axis do not react at all. cat /dev/input/js0 displays something initially, then no further chars when pushing button / moving axis.

2) it is possible to get it to work though by creating a custom HAL rule :
/etc/hal/fdi/policy/acrux-usb-gamepad-8116.fdi
which contains, for instance

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="input.product" string="ACRUX USB GAMEPAD 8116">
<remove key="input.x11_driver" />
<merge key="input.x11_driver" type="string">evdev</merge>
</match>
</device>
</deviceinfo>

(it also works when using the driver "joystick" and installing xf86-input-joystick, but it doesn't make any difference in any of the issues mentioned here -- but it is required in Ubuntu, not Arch)

3) then, the joystick "works" but also controls the mouse pointer, which can be partly solved by adding this to the .fdi file :
<merge key="input.x11_options.SendCoreEvents" type="string">false</merge>
(doesn't inhibit mouse buttons though)

Also, the 2nd analog stick axis values are inverted.

4) It works in windowed games like Kenta Cho's rrootage. It works in sdlmame in WINDOWED mode (but that's annoying as it controls the mouse....).

however :

5) when using it in fullscreen sdlmame, fullscreen xmoto for instance, pressing a button or just moving an X causes an intant X crash. You may see a log here : http://pastebin.com/Z8kkQ5gT

Also, lshal given, among others :

udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial'
info.linux.driver = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_1a_0' (string)
info.product = 'USB GAMEPAD 8116' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial' (string)
info.vendor = 'ACRUX' (string)
linux.device_file = '/dev/bus/usb/003/004' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2' (string)
usb_device.bus_number = 3 (0x3) (int)
usb_device.can_wake_up = false (bool)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 258 (0x102) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = false (bool)
usb_device.linux.device_number = 4 (0x4) (int)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2' (string)
usb_device.max_power = 350 (0x15e) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.product = 'USB GAMEPAD 8116' (string)
usb_device.product_id = 2050 (0x802) (int)
usb_device.speed = 1.5 (1.5) (double)
usb_device.vendor = 'ACRUX' (string)
usb_device.vendor_id = 6708 (0x1a34) (int)
usb_device.version = 1.1 (1.1) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0'
info.linux.driver = 'usbhid' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial' (string)
info.product = 'USB HID Interface' (string)
info.subsystem = 'usb' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0' (string)
usb.bus_number = 3 (0x3) (int)
usb.can_wake_up = false (bool)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_revision_bcd = 258 (0x102) (int)
usb.device_subclass = 0 (0x0) (int)
usb.interface.class = 3 (0x3) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.linux.device_number = 4 (0x4) (int)
usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0' (string)
usb.max_power = 350 (0x15e) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.num_ports = 0 (0x0) (int)
usb.product = 'USB HID Interface' (string)
usb.product_id = 2050 (0x802) (int)
usb.speed = 1.5 (1.5) (double)
usb.vendor = 'ACRUX' (string)
usb.vendor_id = 6708 (0x1a34) (int)
usb.version = 1.1 (1.1) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0_logicaldev_input'
info.capabilities = {'input', 'input.joystick'} (string list)
info.category = 'input' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0' (string)
info.product = 'ACRUX USB GAMEPAD 8116' (string)
info.subsystem = 'input' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0_logicaldev_input' (string)
input.device = '/dev/input/event7' (string)
input.originating_device = '/org/freedesktop/Hal/devices/usb_device_1a34_802_noserial_if0' (string)
input.product = 'ACRUX USB GAMEPAD 8116' (string)
input.x11_driver = 'evdev' (string)
input.x11_options.SendCoreEvents = 'false' (string)
linux.device_file = '/dev/input/event7' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'input' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/input/input9/event7' (string)

To sum up, there are 3 issues :

- the fact the gamepad doesn't work out of the box, which it should (USB hotplugging) and requires a custom HAL rule
- the fact it also moves the mouse
- the fact some axis values are inverted
and to a greater extent
- the fact X crashes when triggering some joystick events in fullscreen apps

I have the same first 3 issues in Ubuntu Karmic, but not the 4th one.

Thanks for reading this, and please tell me if I can help investigate by providing more information...
This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 18 August 2010, 21:30 GMT
Reason for closing:  Won't fix
Additional comments about closing:  No response.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 04 March 2010, 22:37 GMT
  • Field changed: Summary (Speedlink 360 style gamepad requires custom HAL rule then crashes X in fullscreen games → [hal] Speedlink 360 style gamepad requires custom HAL rule then crashes X in fullscreen games)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Task Type (Bug Report → Feature Request)
  • Task assigned to Jan de Groot (JGC)
Please use attachs, next time. Thanks :)
Comment by Mahen (mahen) - Wednesday, 17 March 2010, 14:09 GMT
Hi ! I made an upstream report as well : http://bugs.freedesktop.org/show_bug.cgi?id=26900
(evtest-capture log supplied, however, they cannot reproduce it on a different distro it seems).

If it helps, I can send the device to whoever may be able to fix it :)
Comment by Karol Babioch (johnpatcher) - Saturday, 10 April 2010, 20:49 GMT
I can reproduce this. Got the same gamepad, which doesn't get recognized properly, until the creation of the hal file. After fixing this, Xmoto crashes as soon as I try to load a level with the gamepad attached.
Comment by Jan de Groot (JGC) - Wednesday, 23 June 2010, 10:22 GMT
Is this fixed in xorg-server 1.8? I won't patch hal for this.

Loading...