You are not logged in.

#1 2013-11-08 09:35:48

joe.koenig
Member
Registered: 2010-05-06
Posts: 14

udev not loading usbserial (-> usb_modeswitch -> webstick)

Hi,

I have an old Archlinux system on which hotplug/udev works quite fine.  I can boot the system without any USB devices plugged in, and after plugging them (mouse and mobile internet stick) in, the appropriate kernel modules are being loaded.

$ lsmod | grep usb
usbnet                 22471  1 cdc_ether
usb_wwan                6832  1 option
mii                     3375  1 usbnet
usbserial              25750  2 option,usb_wwan
usb_storage            37687  0 
usbhid                 36545  0 
hid                    71463  2 hid_generic,usbhid
scsi_mod              108590  4 usb_storage,libata,sd_mod,sr_mod
usbcore               152939  11 usb_storage,usbserial,ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,option,usbhid,usbnet,us_wwan,cdc_ether
usb_common              1399  1 usbcore

The appropriate device files (/dev/ttyUSB1, /dev/ttyUSB2, /dev/ttyUSB3) for the internet stick are being created as well.  I don't even recall having to write any udev rules for that.

(BTW: Is there a way to ensure that this can be attributed to 'udev'?  Is it possible that, this being a rather old system (approx. 4 years) this is working because of some relict hotplug/hal/hwdetect/devfs configuration and not 'udev'?  Just a thought.)

    ----------------------------

However, now I'm trying to set up a new laptop and I'm a little at loss, because the automatism doesn't seem to work.
First, if I boot without any USB devices, only the default modules are being loaded:

$ lsmod | grep usb
usb_common              1399  1 usbcore
usbcore               178087  7 uvcvideo,rts5139,ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,xhci_hcd

Plugging in the USB devices (mouse and webstick) after bootup doesn't load any new modules.

Now, when I plug in the devices before booting, I get this:

$ lsmod | grep usb
usb_storage            47847  0 
usbhid                 41434  0 
hid                    89751  2 hid_generic,usbhid
scsi_mod              128695  4 rts5139,usb_storage,libata,sd_mod,sr_mod
usbcore               178087  7 uvcvideo,rts5139,usb_storage,ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,usbhid,xhci_hcd
usb_common              1399  1 usbcore

As you can see, various modules aren't being loaded ('usbnet', 'usb_wwan', 'mii', 'usbserial').
However, 'lsusb' does recognize the internet-stick.
I have to modprobe 'usbserial' manually and invoke 'usb_modeswitch' to get my internet-stick to work.

To be honest, I haven't even figured out how to do that properly.  It's basically a trial-and-error procedure with the following commands (in different variations and successions):

# modprobe -r usbserial
# modprobe usbserial vendor=0x12d1 product=0x1446
# /usr/bin/usb_modeswitch  -v 0x12d1  -p 0x1446
# /lib/udev/usb_modeswitch --vendor 0x12d1  --product 0x1446  --type option-zerocd

I've looked at the usual suspects:

/etc/udev/rules.d/
/usr/lib/udev/rules.d/
/etc/modprobe.d/
/etc/mkinitcpio.conf
/etc/mkinitcpio.d/

but I can't find any significant discrepancy there.

Any help would be greatly appreciated.

Kind regards
Joe


# uname -a
Linux juno 3.11.6-1-ARCH #1 SMP PREEMPT Fri Oct 18 23:22:36 CEST 2013 x86_64 GNU/Linux

# dmidecode -t 2 | grep 'Manufacturer\|Product'
        Manufacturer: LENOVO
        Product Name: G505

Offline

Board footer

Powered by FluxBB