Bug 112672

Summary: joydev module not loaded
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Ludwig Nussel <lnussel>
Component: HotplugAssignee: Kay Sievers <kasievers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: ihno
Version: Beta 2   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: input_device class instead of /sbin/hotplug

Description Ludwig Nussel 2005-08-24 11:16:54 UTC
when pluggin in a usb gamepad the joydev module does not get loaded 
automatically which is required for /dev/input/js* to appear.
Comment 1 Ludwig Nussel 2005-08-24 11:18:29 UTC
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 
Comment 2 Kay Sievers 2005-08-29 15:10:43 UTC
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.
Comment 3 Ludwig Nussel 2005-08-30 08:45:39 UTC
bug for Vojtech? 
Comment 4 Vojtech Pavlik 2005-08-30 08:59:51 UTC
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.
Comment 5 Kay Sievers 2005-09-01 12:54:20 UTC
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.
Comment 6 Vojtech Pavlik 2005-09-01 13:00:11 UTC
OK. Shall I dig the patch up, or would it be better done by Hannes?
Comment 7 Kay Sievers 2005-09-01 13:07:55 UTC
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.
Comment 8 Vojtech Pavlik 2005-09-01 13:11:49 UTC
OK, thanks for the patch.
Comment 9 Vojtech Pavlik 2005-09-01 17:30:10 UTC
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.
Comment 10 Ludwig Nussel 2005-09-02 09:56:29 UTC
I can test it if you build kernel packages (i386) for me. 
Comment 11 Kay Sievers 2005-09-03 18:31:44 UTC
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...
Comment 12 Vojtech Pavlik 2005-09-03 18:41:17 UTC
Thanks.
Comment 13 Kay Sievers 2005-09-07 12:26:56 UTC
Ludwig, care to test again. Works for me. (Yes, I have a joystick now :))
Comment 14 Ludwig Nussel 2005-09-07 13:03:09 UTC
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 
Comment 15 Kay Sievers 2005-09-07 13:11:41 UTC
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"
Comment 16 Ludwig Nussel 2005-09-07 13:37:19 UTC
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. 
Comment 17 Kay Sievers 2005-09-07 13:48:58 UTC
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.
Comment 18 Ludwig Nussel 2005-09-07 13:55:34 UTC
I've just rebooted, now the reloading works. Maybe inotify is still a bit   
buggy.