Description of problem: After upgrading to DeviceKit-disks-004-0.10.20090415git.fc11.i586 some Nokia mobile phones (like Nokia E75) partitions are not visible when connected with USB. I noted this issue on one system and suspected a kernel bug (see Bug 495446) but I tested on another system upgrading and rebooting packages individually and it was actually DeviceKit-disks-004-0.10.20090415git.fc11.i586 which triggered this error. Version-Release number of selected component (if applicable): DeviceKit-disks-004-0.10.20090415git.fc11.i586 How reproducible: Always. Steps to Reproduce: 1. Connect Nokia E75 with USB to a computer in "PC Internet Access mode" 2. Notice how only "Blank CD-ROM" shows up, no partitions at all Actual results: No partitions. Expected results: Partitions visible. Additional info: Reporting against hal because I can't find DeviceKit component from Bugzilla.
Hmm, only now I see https://bugzilla.redhat.com/show_bug.cgi?id=495876 Not sure which is there still some pending upgrades, probably need to wait for a day or two to be sure.
Fixing component (not my day).
Please include the information mentioned here http://www.freedesktop.org/wiki/Software/DeviceKit-disks
Thanks for looking into this. I will attach 5 attachment generated based on the instructions.
Created attachment 340418 [details] proc-self-mountinfo.txt
Created attachment 340419 [details] devkit-disks--dump.txt
Created attachment 340420 [details] devkit-disks--monitor-detail.txt
Created attachment 340421 [details] gvfs-mount-li.txt
Created attachment 340422 [details] gvfs-mount-oi.txt
Hmm, looks like the kernel is not creating the devices - all we get from the phone is /dev/sr1. What were you expecting, a USB storage device (e.g. /dev/sdb)? Or content on /dev/sr1? Please capture the relevant bits from dmesg when plugging the device and attach it here. Also please include the output of 'udevadm monitor --env' run as root (also when plugging in the device).
The phone can be connected in five different modes with USB - the current mode I'm using shows up as a CD-ROM in Windows XP and also in Fedora few days ago with files on a partition on it. I will attach the requested files. Thanks!
Created attachment 340430 [details] dmesg-related.txt
Created attachment 340431 [details] udevadm-monitor--env.txt
CD-ROM discs can't have partitions in Linux... did you mean that a file system used to be detected on /dev/sr1? Anyway, try running '/lib/udev/vol_id --export /dev/sr1' and paste the output here. If that's empty try with --probe-all (and please state whether you had to do that).
Yes, I meant /dev/sr1. I even created a bug report about another issue when things were working (just to prove that I was not hallucinating): http://bugzilla.gnome.org/show_bug.cgi?id=579436 Anyway, here's the output: root@localhost:~# /lib/udev/vol_id --export /dev/sr1 ID_FS_USAGE=filesystem ID_FS_TYPE=iso9660 ID_FS_VERSION= ID_FS_UUID= ID_FS_UUID_ENC= ID_FS_LABEL=CDROM ID_FS_LABEL_ENC=CDROM root@localhost:~# /lib/udev/vol_id --export /dev/sr1 --probe-all iso9660
According to comment 13, ID_CDROM_MEDIA_TRACK_COUNT is not set. That's why udev doesn't run vol_id on the device since these are the rules we use # probe filesystem metadata of optical drives which have a media inserted KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" # probe filesystem metadata of disks KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" My guess is that we either need to relax these udev rules or fix cdrom_id. Reassigning to udev and adding the upstream udev maintainer to the Cc. Kay, any ideas here? FWIW, this also happens with my Sandisk Cruzer USB stick, this device "conveniently" exports a CD-ROM drive with Windows drivers in addition to the storage device itself.
Fixing up summary.
Also, somewhat interesting is that cdrom_id sets ID_CDROM_MEDIA_STATE=blank Now, IIRC, this is probably just because the device is dumb... But we should probably guard against dumb devices like this if the size of the device much larger than 0. And according to comment 6, devkit-disks-daemon reports the size as 8626176 bytes - IIRC, this is obtained from sysfs.
Created attachment 340443 [details] switch to ID_CDROM_MEDIA to decide if vol_id should run Care to try this? Thanks!
Err, udev rules on F11 seem to be completely different than what is in your patch. I could sure test but could some please lend me a hand a produce a patch for udev of F11 fame? Thanks!
I now tried udev-141-3.fc11.i586 from updates-testing which seems to include the patch. The behaviour has changed but the issue still remains: the CD-ROM is still showing up as a blank CD but now I get a pop-up window which ask what to do with it. Previously there was no pop-up window, only the blank CD-ROM icon appeared to the desktop. Below is dmesg output when plugging the phone with udev-141-3.fc11.i586: Apr 26 12:07:39 localhost kernel: usb 1-8: new high speed USB device using ehci_hcd and address 3 Apr 26 12:07:39 localhost kernel: usb 1-8: New USB device found, idVendor=0421, idProduct=010d Apr 26 12:07:39 localhost kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Apr 26 12:07:39 localhost kernel: usb 1-8: Product: Nokia E75 Apr 26 12:07:39 localhost kernel: usb 1-8: Manufacturer: Nokia Apr 26 12:07:39 localhost kernel: usb 1-8: SerialNumber: 1234567890 Apr 26 12:07:39 localhost kernel: usb 1-8: configuration #1 chosen from 1 choice Apr 26 12:07:39 localhost kernel: Initializing USB Mass Storage driver... Apr 26 12:07:39 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage devices Apr 26 12:07:39 localhost kernel: usbcore: registered new interface driver usb-storage Apr 26 12:07:39 localhost kernel: USB Mass Storage support registered. Apr 26 12:07:44 localhost kernel: scsi 2:0:0:0: CD-ROM Nokia S60 1.0 PQ: 0 ANSI: 2 Apr 26 12:07:44 localhost kernel: sr1: scsi3-mmc drive: 0x/0x xa/form2 tray Apr 26 12:07:44 localhost kernel: sr 2:0:0:0: Attached scsi generic sg2 type 5
Hmm, now I realized that also libudev0 / libvolume_id want to be updated. But after updating also these packages things went worse: now I can't see the CD-ROM device at all, dmesg says: Apr 26 13:01:10 localhost kernel: usb 1-8: new high speed USB device using ehci_hcd and address 4 Apr 26 13:01:10 localhost kernel: usb 1-8: New USB device found, idVendor=0421, idProduct=010d Apr 26 13:01:10 localhost kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Apr 26 13:01:10 localhost kernel: usb 1-8: Product: Nokia E75 Apr 26 13:01:10 localhost kernel: usb 1-8: Manufacturer: Nokia Apr 26 13:01:10 localhost kernel: usb 1-8: SerialNumber: 1234567890 Apr 26 13:01:10 localhost kernel: usb 1-8: configuration #1 chosen from 1 choice Apr 26 13:01:11 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage devices Apr 26 13:01:16 localhost kernel: scsi 3:0:0:0: CD-ROM Nokia S60 1.0 PQ: 0 ANSI: 2
udev-141-3.fc11.i586 kernel-2.6.29.3-155.fc11.i586 give me now a blank CD-ROM again and in dmesg: usb 1-8: new high speed USB device using ehci_hcd and address 4 usb 1-8: New USB device found, idVendor=0421, idProduct=010d usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-8: Product: Nokia E75 usb 1-8: Manufacturer: Nokia usb 1-8: SerialNumber: 1234567890 usb 1-8: configuration #1 chosen from 1 choice Initializing USB Mass Storage driver... scsi2 : SCSI emulation for USB Mass Storage devices usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usb-storage: device found at 4 usb-storage: waiting for device to settle before scanning usb-storage: device scan complete scsi 2:0:0:0: CD-ROM Nokia S60 1.0 PQ: 0 ANSI: 2 sr1: scsi3-mmc drive: 0x/0x xa/form2 tray sr 2:0:0:0: Attached scsi CD-ROM sr1 sr 2:0:0:0: Attached scsi generic sg2 type 5
What does: /lib/udev/cdrom_id -d /dev/sr1 print?
root@localhost:~# /lib/udev/cdrom_id -d /dev/sr1 main: probing: '/dev/sr1' cd_inquiry: INQUIRY: [Nokia ][S60 ][1.0 ] cd_profiles: GET CONFIGURATION: number of profiles 76 cd_profiles: current profile 0x08 cd_media_toc: READ TOC: len: 12 cd_media_toc: last track 1 starts at block 0 cd_media_info: disk type 00 ID_CDROM=1 ID_CDROM_MRW=1 ID_CDROM_MRW_W=1 ID_CDROM_MEDIA=1 ID_CDROM_MEDIA_CD=1 ID_CDROM_MEDIA_STATE=blank root@localhost:~#
That looks good so far. Maybe the port of the bugfix in udev 141 did not contain the rule change, which was part of the fix in udev 142? The upstream fix is here: http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=f907449eee3f58fafafee0658e80578b1dbb2722 Do you see this change in the rules file on your system?
It seems that Fedora has totally different rules in use since I see neither the old or the new rule at all: root@localhost:~# grep -ri cdrom_media /etc/udev zsh: exit 1 grep --color=tty -ri cdrom_media /etc/udev root@localhost:~# So it seems the Fedora udev maintainer is needed here to help. Thanks!
Oh, that should be fine. The default rules are in /lib/udev/.
the fix from comment #26 is in the latest udev of Fedora 11 $ grep -ri cdrom_media /lib/udev/ /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
$ rpm -q udev udev-141-3.fc11.x86_64
Ok, if that's in, what does: udevadm test /class/block/sr1 print?
A-ha, it seems that we're back to where we started: > Description of problem: > After upgrading to DeviceKit-disks-004-0.10.20090415git.fc11.i586 some Nokia > mobile phones (like Nokia E75) partitions are not visible when connected with > USB. This is because Harald got: $ grep -ri cdrom_media /lib/udev/ /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" But I see: root@localhost:~# rpm -q udev udev-141-3.fc11.i586 root@localhost:~# grep -ri cdrom_media /lib/udev/ /lib/udev/rules.d/95-devkit-disks.rules:KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="probe_parttable_end" /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" Binary file /lib/udev/cdrom_id matches root@localhost:~# rpm -qf /lib/udev/rules.d/95-devkit-disks.rules DeviceKit-disks-004-3.fc11.i586 root@localhost:~# rpm -V udev DeviceKit-disks root@localhost:~# Well, if my guess is wrong, I'll attach the output requested. Thanks!
Created attachment 345358 [details] udevadm-test-class-block-sr1.txt
The udev side seems fine, it reports a filesystem: 'ID_FS_USAGE=filesystem' 'ID_FS_TYPE=iso9660'
Hmm, I commented out the rule in 95-devkit-disks.rules and rebooted, but I still get a blank CD..
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
still an issue?
Yes, with F11 + updates as of 2009-06-30 this is still an issue. The issue is still the same as described in https://bugzilla.redhat.com/show_bug.cgi?id=496683#c0 Thanks.
This is fixed in Fedora 12 Beta, thanks!