Bug 495876 - USB device not handled "correctly"; doesn't appear as device and isn't auto-mounted
Summary: USB device not handled "correctly"; doesn't appear as device and isn't auto-m...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: DeviceKit-disks
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-15 11:13 UTC by Mads Kiilerich
Modified: 2013-03-06 03:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-17 14:20:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
The requested output from devkit-disks and devkit-disks (39.25 KB, text/plain)
2009-04-15 13:32 UTC, Mads Kiilerich
no flags Details
The requested output from udevadm as root (35.04 KB, text/plain)
2009-04-16 11:34 UTC, Mads Kiilerich
no flags Details
cat /dev/sdd > sdd (8.00 KB, application/octet-stream)
2009-04-17 10:53 UTC, Mads Kiilerich
no flags Details
udevadm monitor --env > udevadm-monitor--env-root.txt (30.41 KB, text/plain)
2009-04-17 10:54 UTC, Mads Kiilerich
no flags Details
udevadm info -q all -n /dev/sdd > udevadm-info-q-all-n-dev-sdd.txt (1.36 KB, text/plain)
2009-04-17 10:55 UTC, Mads Kiilerich
no flags Details
devkit-disks --monitor-detail > devkit-disks--monitor-detail.txt (8.30 KB, text/plain)
2009-04-17 10:55 UTC, Mads Kiilerich
no flags Details
gvfs-mount -oi > gvfs-mount-oi.txt (1.91 KB, text/plain)
2009-04-17 10:56 UTC, Mads Kiilerich
no flags Details
devkit-disks --dump > devkit-disks--dump.txt (26.66 KB, text/plain)
2009-04-17 10:56 UTC, Mads Kiilerich
no flags Details

Description Mads Kiilerich 2009-04-15 11:13:08 UTC
Description of problem:

I have a USB device which appears as a hub with 3 devices. One of the disks are properly automounted, but the other doesn't even appear in the Nautilus device list. It might be because it is a 8 kb FAT12 device, but it should work as any other device anyway.

Apr 15 11:45:55 localhost kernel: usb 1-3: new high speed USB device using ehci_hcd and address 13
Apr 15 11:45:55 localhost kernel: usb 1-3: New USB device found, idVendor=13fe, idProduct=1a00
Apr 15 11:45:55 localhost kernel: usb 1-3: New USB device strings: Mfr=0, Product=11, SerialNumber=0
Apr 15 11:45:55 localhost kernel: usb 1-3: Product: USB 2.0 HUB
Apr 15 11:45:55 localhost kernel: usb 1-3: configuration #1 chosen from 1 choice
Apr 15 11:45:55 localhost kernel: hub 1-3:1.0: USB hub found
Apr 15 11:45:55 localhost kernel: hub 1-3:1.0: 2 ports detected
Apr 15 11:45:55 localhost kernel: usb 1-3.1: new high speed USB device using ehci_hcd and address 14
Apr 15 11:45:56 localhost kernel: usb 1-3.1: New USB device found, idVendor=1059, idProduct=0011
Apr 15 11:45:56 localhost kernel: usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 15 11:45:56 localhost kernel: usb 1-3.1: Product: USB DISK Pro
Apr 15 11:45:56 localhost kernel: usb 1-3.1: Manufacturer:         
Apr 15 11:45:56 localhost kernel: usb 1-3.1: SerialNumber: 070007930D00000E
Apr 15 11:45:56 localhost kernel: usb 1-3.1: configuration #1 chosen from 1 choice
Apr 15 11:45:56 localhost kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Apr 15 11:45:56 localhost kernel: usb 1-3.2: new full speed USB device using ehci_hcd and address 15
Apr 15 11:45:56 localhost kernel: usb 1-3.2: New USB device found, idVendor=1059, idProduct=0012
Apr 15 11:45:56 localhost kernel: usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 15 11:45:56 localhost kernel: usb 1-3.2: Product: Mass Storage
Apr 15 11:45:56 localhost kernel: usb 1-3.2: Manufacturer: Giesecke&Devrient GmbH
Apr 15 11:45:56 localhost kernel: usb 1-3.2: SerialNumber: 000000000000
Apr 15 11:45:56 localhost kernel: usb 1-3.2: configuration #1 chosen from 1 choice
Apr 15 11:45:56 localhost kernel: scsi11 : SCSI emulation for USB Mass Storage devices
Apr 15 11:46:01 localhost kernel: scsi 11:0:0:0: Direct-Access     GD       Drive            0000 PQ: 0 ANSI: 0
Apr 15 11:46:01 localhost kernel: scsi 10:0:0:0: Direct-Access              USB DISK Pro     PMAP PQ: 0 ANSI: 0 CCS
Apr 15 11:46:01 localhost kernel: scsi 10:0:0:1: Direct-Access              USB DISK Pro     PMAP PQ: 0 ANSI: 0 CCS
Apr 15 11:46:03 localhost kernel: sd 10:0:0:0: [sdb] Attached SCSI removable disk
Apr 15 11:46:03 localhost kernel: sd 10:0:0:0: Attached scsi generic sg2 type 0
Apr 15 11:46:03 localhost kernel: sd 10:0:0:1: [sdc] 1228800 512-byte hardware sectors: (629 MB/600 MiB)
Apr 15 11:46:03 localhost kernel: sd 10:0:0:1: [sdc] Write Protect is off
Apr 15 11:46:03 localhost kernel: sd 10:0:0:1: [sdc] Assuming drive cache: write through
Apr 15 11:46:06 localhost kernel: sd 10:0:0:1: [sdc] 1228800 512-byte hardware sectors: (629 MB/600 MiB)
Apr 15 11:46:06 localhost kernel: sd 10:0:0:1: [sdc] Write Protect is off
Apr 15 11:46:06 localhost kernel: sd 10:0:0:1: [sdc] Assuming drive cache: write through
Apr 15 11:46:06 localhost kernel: sdc: sdc1
Apr 15 11:46:06 localhost kernel: sd 10:0:0:1: [sdc] Attached SCSI removable disk
Apr 15 11:46:06 localhost kernel: sd 10:0:0:1: Attached scsi generic sg3 type 0
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] 16 512-byte hardware sectors: (8.19 kB/8.00 KiB)
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] Write Protect is off
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] Assuming drive cache: write through
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] 16 512-byte hardware sectors: (8.19 kB/8.00 KiB)
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] Write Protect is off
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] Assuming drive cache: write through
Apr 15 11:46:06 localhost kernel: sdd:
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: [sdd] Attached SCSI removable disk
Apr 15 11:46:06 localhost kernel: sd 11:0:0:0: Attached scsi generic sg4 type 0
Apr 15 11:46:07 localhost gnome-keyring-daemon[2262]: adding removable location: volume_uuid_C991_B3EA at /media/PUBLIC

$ mount /dev/sdd /mnt/d
mount: only root can do that
# mount -o uid=500 /dev/sdd /mnt/d
# grep /mnt/d /proc/mounts 
/dev/sdd /mnt/d vfat rw,relatime,uid=500,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii 0 0

What other info is relevant?

And I don't know if it is DeviceKit or some other component that is responsible this part of device handling.

Version-Release number of selected component (if applicable):
DeviceKit-003-1.i586
2.6.29.1-68.fc11.i686.PAE

Comment 1 David Zeuthen 2009-04-15 13:21:23 UTC
Please attach the output of

 - devkit-disks --monitor-detail
 - gvfs-mount -oi

when plugging the device into hub; and

 - devkit-disks --dump
 - gvfs-mount -li

when the device is plugged in. Thanks.

Comment 2 David Zeuthen 2009-04-15 13:22:14 UTC
Also, you need to capture this information in the local session (running as your own user, not root).

Comment 3 Mads Kiilerich 2009-04-15 13:32:44 UTC
Created attachment 339684 [details]
The requested output from devkit-disks and devkit-disks

Comment 4 Mads Kiilerich 2009-04-15 13:43:56 UTC
- and when I mount it as root with
# mount -o uid=500 /dev/sdd /mnt/d
then I get

[mk@localhost ~]$ devkit-disks --monitor-detail
Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
changed:     /org/freedesktop/DeviceKit/Disks/devices/sdd
Showing information for /org/freedesktop/DeviceKit/Disks/devices/sdd
  native-path:             /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.2/1-3.2:1.0/host19/target19:0:0/19:0:0:0/block/sdd
  device:                  8:48
  device-file:             /dev/sdd
    by-id:                 /dev/disk/by-id/usb-GD_Drive_000000000000-0:0
    by-id:                 /dev/disk/by-uuid/47C0-7C71
    by-path:               /dev/disk/by-path/pci-0000:00:1a.7-usb-0:3.2:1.0-scsi-0:0:0:0
  system internal:         0
  removable:               1
  has media:               1
    detects change:        1
    detection by polling:  1
    detection inhibitable: 1
    detection inhibited:   0
  is read only:            0
  is mounted:              1
  mount paths:             /mnt/d
  mounted by uid:          0
  presentation name:       
  presentation icon:       
  size:                    8192
  block size:              512
  job underway:            no
  usage:                   filesystem
  type:                    vfat
  version:                 FAT12
  uuid:                    47C0-7C71
  label:                   SmartDrive
  partition table:
    scheme:                mbr
    count:                 0
  drive:
    vendor:                GD
    model:                 Drive
    revision:              0000
    serial:                000000000000
    ejectable:             0
    require eject:         0
    media:                 
      compat:             
    interface:             usb
    if speed:              12000000 bits/s
    ATA SMART:             not available

Comment 5 David Zeuthen 2009-04-15 16:54:48 UTC
Hmm, what kind of device is /dev/sdd? It looks like really weird. It's not partitioned is it? E.g. there's no /dev/sdd1 or anything?

Sorry to be asking for more information but can you also include

 - udevadm monitor --env

when plugging in the device and then

 - udevadm info -q all -n /dev/sdd

when it's plugged in. You need to be root to capture this information. Thanks.

Comment 6 Mads Kiilerich 2009-04-15 21:56:27 UTC
/dev/sdd _is_ an interface to a smart card. But it _appears_ as an ordinary usb flash device, so that any user space application on all platforms without any kernel/driver support can communicate with the smart card by writing/reading to files.

The /dev/sdd device appears without problems in windows and osx. As shown in the initial report (and comment 4) it can be mounted by root (as vfat/fat12) - and then it works fine. So no, it is not partitioned.

To be continued tomorrow when I have access to the device ...

Comment 7 Mads Kiilerich 2009-04-16 11:34:58 UTC
Created attachment 339829 [details]
The requested output from udevadm as root

Comment 8 David Zeuthen 2009-04-16 15:15:56 UTC
OK, I can see what's wrong here. We erroneously detect /dev/sdd as having a partition table even when it's clear there's a filesystem and no partitions (this is because vfat on the main device looks *a lot* like a MS-DOS partition table and filesystem/partitiontable probing is always somewhat a guessing game).

Let me see if I can come up with a fix...

Comment 9 David Zeuthen 2009-04-16 17:16:34 UTC
Should be fixed in DeviceKit-disks-004-0.10.20090415git.fc11

 http://koji.fedoraproject.org/koji/taskinfo?taskID=1302582

Please test (and reopen if the fix doesn't work) and report back so I can request these packages to be tagged for Fedora 11. Thanks!

Comment 10 David Zeuthen 2009-04-16 18:01:19 UTC
Btw, to properly test this you need these gnome-disk-utility packages installed as well

 http://koji.fedoraproject.org/koji/buildinfo?buildID=98108

Unfortunately these are not in F-11 because of a (now corrected) release-team error (it was only tagged for the F-11 buildroot, not for the F-11 proper).

You will also need the latest gvfs packages (gvfs-1.2.2-3.fc11)

You will need to reboot after updating all the necessary packages.

Comment 11 Mads Kiilerich 2009-04-17 10:52:01 UTC
Sorry, I still see the same behaviour.

rpm -qa DeviceKit\* gnome-disk-utility\* gvs\* |sort
DeviceKit-003-1.i586
DeviceKit-disks-004-0.9.20090415git.fc11.i586
DeviceKit-power-008-0.1.20090401git.fc11.i586
gnome-disk-utility-0.3-0.5.20090415git.fc11.i586
gnome-disk-utility-libs-0.3-0.5.20090415git.fc11.i586
gnome-disk-utility-ui-libs-0.3-0.5.20090415git.fc11.i586
gvfs-1.2.2-3.fc11.i586

I will upload new output - and the content of sdd

Comment 12 Mads Kiilerich 2009-04-17 10:53:33 UTC
Created attachment 339984 [details]
cat /dev/sdd > sdd

The content of the raw block device

Comment 13 Mads Kiilerich 2009-04-17 10:54:30 UTC
Created attachment 339985 [details]
udevadm monitor --env > udevadm-monitor--env-root.txt

Comment 14 Mads Kiilerich 2009-04-17 10:55:12 UTC
Created attachment 339986 [details]
udevadm info -q all -n /dev/sdd > udevadm-info-q-all-n-dev-sdd.txt

Comment 15 Mads Kiilerich 2009-04-17 10:55:40 UTC
Created attachment 339987 [details]
devkit-disks --monitor-detail > devkit-disks--monitor-detail.txt

Comment 16 Mads Kiilerich 2009-04-17 10:56:07 UTC
Created attachment 339989 [details]
gvfs-mount -oi > gvfs-mount-oi.txt

Comment 17 Mads Kiilerich 2009-04-17 10:56:52 UTC
Created attachment 339990 [details]
devkit-disks --dump > devkit-disks--dump.txt

Comment 18 David Zeuthen 2009-04-17 14:01:56 UTC
(In reply to comment #11)
> Sorry, I still see the same behaviour.
> 
> rpm -qa DeviceKit\* gnome-disk-utility\* gvs\* |sort
> DeviceKit-003-1.i586
> DeviceKit-disks-004-0.9.20090415git.fc11.i586

You are not using the right DeviceKit-disks packages - comment 9 says to try DeviceKit-disks-004-0.10.20090415git.fc11. These packages are not in F-11 yet so you will have to grab them from koji.

Comment 19 Mads Kiilerich 2009-04-17 14:20:51 UTC
Argh. You are right. I double-checked but forgot to tripple-check.

Yes, with 0.10 it works! Thanks!

Comment 20 David Zeuthen 2009-04-17 14:37:28 UTC
Great, thanks for testing! I've filed a request here

 https://fedorahosted.org/rel-eng/ticket/1509

to get this tagged for F-11.

Comment 21 Daniel Qarras 2009-04-20 17:46:38 UTC
I think this broke partitions on several Nokia phones:

https://bugzilla.redhat.com/show_bug.cgi?id=496683


Note You need to log in before you can comment on or make changes to this bug.