Bugzilla – Bug 112672
joydev module not loaded
Last modified: 2005-09-07 13:55:34 UTC
when pluggin in a usb gamepad the joydev module does not get loaded automatically which is required for /dev/input/js* to appear.
I don't know if it's of any help but this is what lsusb -v says about the device: Bus 001 Device 005: ID 07b5:0314 Mega World International, Ltd Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x07b5 Mega World International, Ltd idProduct 0x0314 bcdDevice 1.01 iManufacturer 1 Mega World iProduct 2 USB Game Controllers iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 Remote Wakeup MaxPower 350mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Devices 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 108 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 0x0008 1x 8 bytes bInterval 10
Seems that we are missing the /sys/class/input_device/ class patch we had in 9.3 to fix the "input" layer to be visible in sysfs and not call /sbin/hotplug directly.
bug for Vojtech?
Greg, how is your subclass support in driver model progressing? It's needed to fix this properly. Alternately Hannes's patch can be resurrected, but it had problems of its own.
I don't expect input to swicht to "stacked classes" for 10.0. :) So readding our 9.3 "prevent input to call /sbin/hotplug directly" patch is needed, I think.
OK. Shall I dig the patch up, or would it be better done by Hannes?
Created attachment 48453 [details] input_device class instead of /sbin/hotplug Hannes is on holidays and on the road the next days. Would be nice, if you can do. I attached the last version I've found. Don't know if there are fixes on top in the last kernel that carried this patch.
OK, thanks for the patch.
I have updated Hanes's 9.3 patch for 10.0 and added it back to our CVS. Please verify that it resolved the problem.
I can test it if you build kernel packages (i386) for me.
We get the "input_device" events from the kernel now. Vojtech, I take over the bug and will take care if something is still to fix here...
Thanks.
Ludwig, care to test again. Works for me. (Yes, I have a joystick now :))
Anything special to install/take care of? On my installation (IIRC beta3->beta4+ update) it doesn't load joydev. g101:~ # rpm -q --changelog udev|head * Fr Sep 02 2005 - kasievers@suse.de - add input_device.sh from the dead hotplug package * Fr Sep 02 2005 - schwab@suse.de - Don't provide/obsolete hotplugctl [#112953]. * Do Sep 01 2005 - kasievers@suse.de g101:~ # rpm -q --changelog kernel-default|head * Do Sep 01 2005 - vojtech@suse.cz - input-kill-sbin-hotplug.patch: Get rid of /sbin/hotplug calls in the input subsystem by exporting input devices as /sys/class/input_device/* * Do Sep 01 2005 - agruen@suse.de - scripts/tar-up.sh: create empty patches.*.tar.bz2 archives instead of including only the existing archives in the generated
I have it configured in yast and it works for me. If it should work without any system configuration, this may do it: SUBSYSTEM=="input_device", ENV{ABS}="[1-9]*", RUN+="/sbin/modprobe joydev"
YaST only configures legacy joysticks on the gameport. USB ones are supposed to work automagically. So I added the following line SUBSYSTEM=="input_device", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev" After growing some gray hairs I found out that I had to killall -HUP udevd to make this change work. joydev gets loaded now when plugging in the gamepad. It also gets loaded because of the synaptics touchpad having absolute axes but that doesn't hurt.
Ok, I added the rule to the udev package currently in autobuild. Thanks! But udevd should reload the rules automatically if you change something in the rules folder. Does "strace -p $(pidof udevd)" show anything if you edit the rules? It should reload the rules at least when closing the rules file.
I've just rebooted, now the reloading works. Maybe inotify is still a bit buggy.