Comment 260 for bug 446146

Revision history for this message
Damjan Jovanovic (damjan-jov) wrote :

I found out what's wrong! My Huawei E220 now works, NO kernel changes, NO firmware upgrades!

(Summary: kill all devkit-* processes before plugging in the 3G card, wait a bit, click on the Network Manager system tray icon, and your "Mobile Broadband" device will be there).

Firstly a big thank you to Justin Schoeman who got me looking in the right place, that is, a userspace application that "resets" the device.

I got the kernel source a while back, to try out a different patch (http://marc.info/?l=linux-usb&m=125540979118724&w=2) which didn't help. So to test Justin's theory I thought I'd see if there's a way to log what userspace apps do to USB devices using the /proc interface, and found that drivers/usb/core/devio.c indeed has an option to log this. Ubuntu's /lib/modules doesn't have a usb/core subdirectory, so I guessed it's compiled into the kernel and read Documentation/kernel-parameters.txt and found the usbcore.usbfs_snoop parameter that turns it on in the kernel. I then booted the kernel with usbcore.usbfs_snoop=1, waited a bit, plugged in the E220 and got this in dmesg:

[ 160.464034] usb 3-2: new full speed USB device using uhci_hcd and address 2
[ 160.625215] usb 3-2: configuration #1 chosen from 1 choice
[ 160.653405] usb usb1: opened by process 1706: devkit-power-da
[ 160.653416] usb usb1: usbdev_ioctl: CONNECTINFO
[ 160.653451] usb usb1: opened by process 1706: devkit-power-da
[ 160.653456] usb usb1: usbdev_ioctl: IOCTL

That evil devkit-power-daemon interferes many times throughout the log, eventually crashing the device. Justin was wrong about the reset, there is no visible userspace reset, but something else - some IOCTL maybe - crashes it.

I then rebooted, did a "ps fax|grep devicekit":
 1635 ? S 0:00 /usr/lib/devicekit-power/devkit-power-daemon
 1888 ? S 0:00 /usr/lib/devicekit-disks/devkit-disks-daemon

then sent them both to hell where they belong:

sudo kill 1635
sudo kill 1888

then plugged in the E220.

I noticed the dmesg was much cleaner. Eventually I got the CDROM interface and could browse and open the files for the first time ever. But the biggest surprise was when I clicked on the Network Manager icon in the system tray AND SAW THE "Mobile Broadband" DEVICE!

It connected and I'm now online writing this.

***

Since I found the problem, I think that gives me the right to complain a bit. I am really not impressed by how poorly and slowly this bug has been handled by the Ubuntu developers. Even Mark Shuttleworth's home country is badly bitten by this bug. You wasted time making the system tray in 9.10 look black and white like it is on MacOS and the login screen look more like Vista's, while 3G, Bluetooth, WiFi and IR crashed and burned, cutting users off from not only your own Ubuntu One service, but their only route to get updates to fix things - a working Internet connection! And if you aren't going to personally test hardware before a release, at least listen to your users complaining on bug reports and delay the release or provide some temporary workaround. When people leave Linux, they generally don't come back, and you have few enough users as it is.

With Google's Chrome OS coming soon, you should seriously see to it the quality of Ubuntu's hardware support improves. Otherwise Mark Shuttleworth should liquidate Canonical and go do something useful, instead of giving desktop Linux such a bad reputation.