Nokia's N80 "Data Transfer" USB profile fails to umount

Bug #128790 reported by Bruno de Oliveira Abinader on 2007-07-27
10
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-source-2.6.20

I have a Nokia N80 smartphone that has a "Data Transfer" USB profile. With this profile I can mount the memory card inside it as a storage device (like a normal USB pendrive). When using Ubuntu Edgy, I could mount/umount it from gnome's menu without problems (phone beeps when umounting was successfull). But now I've upgraded my computer to Ubuntu Feisty and when I try to umount the file system, USB power state still stays at '0', causing an error message on the phone saying that the device wasn't correctly umounted. I have to search for the right device in the /sys/bus/usb/devices and do a 'echo -n 2 > power/state' to get the device working correctly. Is there a way to get it working automatically when I umount the device?

[]s

ps: I'm not a HAL expert but I think that the solution for this has to do with .fdi files used by HAL.

michelem (michele-marcucci) wrote :

I have the same identical problem since the hal packages was upgraded some days ago.

goto (gotolaunchpad) wrote :

I have the same problem with a N73 and Ubuntu Feisty.

michelem (michele-marcucci) wrote :

I upgraded to Gutsy Gibbon some days ago and the problem is still there with kernel 2.6.22 (may it is not a kernel related problem)

Tomas 'tt' Krag (tt) wrote :

I can confirm this behaviour under Gutsy with a nokia 6110 Navigator. The solution for me is to type

eject /dev/sdb

on the command line after umounting

Tomas 'tt' Krag (tt) wrote :

after upgrading to hardy heron this problem persists except now i need root privileges to eject the device, i.e.

sudo eject /dev/sdb

can anyone point me to some documentation for hal, so that i can try and fix this?

junior (olav-ekkje) wrote :

Same problem here, it complains that it's been disconnected unsafe. But it doesn't cause me any problems really.. I have a n95, and it's been like this in all Feisty, Gutsy and Hardy.

kriko (kristjan-ugrin) wrote :

@junior: This might be related, since it sound like mine problem:
https://bugzilla.novell.com/show_bug.cgi?id=387459

unfortunately nokia phones seems to be buggy in general, so they need a special entry in unusual_devs.h.
I'll test this patch later and I'll see if it helps my n95, so I can safely remove it. After successfull confirmation, that patch will be commited into vanilla kernel.

It seems to be really nokias problem, because I've tested on many distros - devices just keeps crashing / not safely unmounting (I already ended up with corrupted partition!).
The only solution is to gather data about your device, patch kernel (unusual_devs.h)a and test.

Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 beta or later?

Changed in hal:
status: New → Incomplete
Tomas 'tt' Krag (tt) wrote :

It seems i still have the problem. Now with a Nokia e66 on Intrepid. Exept the "sudo eject /dev/sdc" trick no longer works, so i'm a little bit stuck on this one. Any help would be appreciated.

Tomas 'tt' Krag (tt) wrote :
Download full text (3.9 KiB)

As mentioned, this problem persists after upgrading to intrepid. I now have a Nokia E66, which is a fairly new model, and hence there is very little information available as to how this problem affects others.

When I plug in the phone, the phone asks me whether to plug in as mass storage device, pc suite connection or modem, but linux mounts the card correctly whether i make a selection or not.

At this point the output of
$ lsusb -m

Start monitoring devicelist:
-------------------------------------------------
09:22:35.331: usb_device_421_af_352942020124803 added
09:22:35.379: usb_device_421_af_352942020124803 property info.linux.driver = 'usb' (new)
09:22:35.590: usb_device_421_af_352942020124803_if0 added
09:22:35.767: usb_device_421_af_352942020124803_if0_scsi_host added
09:22:40.452: usb_device_421_af_352942020124803_if0_scsi_host_0 added
09:22:40.470: usb_device_421_af_352942020124803_if0_scsi_host_0_scsi_device_lun0 added
09:22:40.839: usb_device_421_af_352942020124803_if0_scsi_host_0_scsi_device_lun0_scsi_generic added
09:22:42.557: storage_serial_Nokia_E66_352942020124803_0_0 added
09:22:42.670: storage_serial_Nokia_E66_352942020124803_0_0 property info.interfaces = {'org.freedesktop.Hal.Device.Storage.Removable'} (new)
09:22:42.900: volume_uuid_0331_5F86 added
09:22:43.242: volume_uuid_0331_5F86 property volume.mount_point = '/media/nokia4gb'
09:22:43.250: volume_uuid_0331_5F86 property volume.is_mounted = true

and of
$ dmesg
[35317.580059] usb 2-2: new full speed USB device using uhci_hcd and address 3
[35317.801059] usb 2-2: configuration #1 chosen from 1 choice
[35317.840867] scsi5 : SCSI emulation for USB Mass Storage devices
[35317.842375] usb-storage: device found at 3
[35317.842388] usb-storage: waiting for device to settle before scanning
[35322.841269] usb-storage: device scan complete
[35322.844258] scsi 5:0:0:0: Direct-Access Nokia E66 1.0 PQ: 0 ANSI: 0
[35322.871855] sd 5:0:0:0: [sdc] 7856128 512-byte hardware sectors (4022 MB)
[35322.875189] sd 5:0:0:0: [sdc] Write Protect is off
[35322.875205] sd 5:0:0:0: [sdc] Mode Sense: 03 00 00 00
[35322.875214] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[35322.918082] sd 5:0:0:0: [sdc] 7856128 512-byte hardware sectors (4022 MB)
[35322.927327] sd 5:0:0:0: [sdc] Write Protect is off
[35322.927346] sd 5:0:0:0: [sdc] Mode Sense: 03 00 00 00
[35322.927354] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[35322.928556] sdc:
[35323.110337] sd 5:0:0:0: [sdc] Attached SCSI removable disk
[35323.113821] sd 5:0:0:0: Attached scsi generic sg2 type 0

Now i go to nautilus to unmount the device, and this has no effect on dmesg or on the device, but adds this to the lsusb -m output

09:27:24.336: volume_uuid_0331_5F86 property volume.mount_point = ''
09:27:24.368: volume_uuid_0331_5F86 property volume.is_mounted = false

So i try
$ sudo eject /dev/sdc (which used to work with my nokia 6110 phone)

and this command takes 30 seconds to complete and has no effect on lsusb -m, but adds these lines to dmesg output:

[35702.960138] usb 2-2: reset full speed USB device using uhci_hcd and address 3
[35713.220064] usb 2-2: reset full speed USB device using...

Read more...

Tomas 'tt' Krag (tt) wrote :

I've done some more tests with my current setup, and if I actually transfer data to my phone while connected via USB, no matter what commands i issue, when i disconnect the phone, and try to use the data i wrote, i get a message from the phone that there is corrupted data on the disk, and it goes off to repair said data. The only way to avoid this seems to be to power down the computer before i disconnect the phone.

I realize this is probably due to bad implementation on nokias side, but i'd really appreciate a way to work around this. I don't mind futsing with sysfs or issuing weird commands, but this is a show-stopper in my daily use of Intrepid.

BTW, what would it take to change the status of this bug from Incomplete?

goto (gotolaunchpad) on 2008-12-24
Changed in hal:
status: Incomplete → New
goto (gotolaunchpad) on 2008-12-24
Changed in hal:
status: New → Confirmed
Mauro de Carvalho (mauro-dec) wrote :

I get this on my Nokia 5200 too.

The last few lines output by dmesg are:

[ 2961.665865] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.672861] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.672866] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.679861] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.679867] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.686861] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.686867] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.693859] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.693865] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.700859] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.700866] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.707858] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.707865] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.714859] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.714865] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.721860] sd 5:0:0:0: [sdc] Sense Key : No Sense [current]
[ 2961.721866] sd 5:0:0:0: [sdc] Add. Sense: No additional sense information
[ 2961.784088] usb 1-2: USB disconnect, address 4
[ 2961.786242] scsi 5:0:0:0: [sdc] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK
[ 2961.786250] end_request: I/O error, dev sdc, sector 3932160
[ 2961.786254] Buffer I/O error on device sdc, logical block 3932160
[ 2961.786281] Buffer I/O error on device sdc, logical block 3932160
[ 2961.786310] Buffer I/O error on device sdc, logical block 3932152
[ 2961.786317] Buffer I/O error on device sdc, logical block 3932153
[ 2961.786323] Buffer I/O error on device sdc, logical block 3932154
[ 2961.786329] Buffer I/O error on device sdc, logical block 3932155
[ 2961.786335] Buffer I/O error on device sdc, logical block 3932156
[ 2961.786341] Buffer I/O error on device sdc, logical block 3932157
[ 2961.786347] Buffer I/O error on device sdc, logical block 3932158
[ 2962.520012] usb 1-2: new full speed USB device using uhci_hcd and address 5
[ 2962.694969] usb 1-2: configuration #1 chosen from 1 choice
[ 2962.748981] cdc_acm 1-2:1.1: ttyACM0: USB ACM device
[ 2962.756592] usb 1-2: bad CDC descriptors
[ 2962.756606] usb 1-2: bad CDC descriptors
[ 2964.760539] usb 1-2: USB disconnect, address 5
[ 2982.704011] usb 1-2: new full speed USB device using uhci_hcd and address 6
[ 2982.936397] usb 1-2: configuration #1 chosen from 1 choice
[ 2982.939136] scsi6 : SCSI emulation for USB Mass Storage devices
[ 2982.939348] usb-storage: device found at 6
[ 2982.939351] usb-storage: waiting for device to settle before scanning

Once i leave Data Mode through my phone, NetowrkManager picks it up as a Nokia 5200 ready to be used as a modem. The card is never mounted and never appears. Also, after selecting Data Mode my phone says its transferring data to my PC continuously.

Data transfer works on an older Kernel with no issues whatsoever, same version of HAL.

Joonas Saarinen (jza) wrote :

I can also confirm this with Hardy and Nokia N73.

dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.