GNOME Bugzilla – Bug 600273
Can't make out Blu-ray burner from DVD burner
Last modified: 2009-11-10 17:35:12 UTC
gvfs-1.4.1-1.fc12.x86_64 gnome-disk-utility-2.28.0-5.fc12.x86_64 When no medium is in either drive, they both show up as "CD/DVD drive" in "Computer" and in palimpest. I'd rather they showed up as "DVD writer" or "Blu-ray writer" instead. ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sr0 native-path: /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:0/0:0:0:0/block/sr0 device: 11:0 device-file: /dev/sr0 by-path: /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:0:0 detected at: Sat 31 Oct 2009 15:06:22 GMT system internal: 0 removable: 1 has media: 1 (detected at Sun 01 Nov 2009 00:09:15 GMT) detects change: 1 detection by polling: 1 detection inhibitable: 1 detection inhibited: 0 is read only: 0 is mounted: 1 mount paths: /media/Films #5 mounted by uid: 500 presentation hide: 0 presentation nopolicy: 0 presentation name: presentation icon: size: 4700372992 block size: 2048 job underway: no usage: filesystem type: iso9660 version: uuid: label: Films #5 optical disc: blank: 0 appendable: 0 closed: 1 num tracks: 1 num audio tracks: 0 num sessions: 1 drive: vendor: SONY model: DVD+-RW DW-Q58A revision: UDS2 serial: detachable: 0 can spindown: 0 rotational media: 1 ejectable: 1 media: optical_dvd_plus_rw compat: optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_rw interface: scsi if speed: (unknown) ATA SMART: not available ======================================================================== Showing information for /org/freedesktop/DeviceKit/Disks/devices/sr1 native-path: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1.4/1-1.4:1.0/host6/target6:0:0/6:0:0:0/block/sr1 device: 11:1 device-file: /dev/sr1 by-id: /dev/disk/by-id/usb-HLDS_Inc_SuperMulti_RW_0010101640001C2F0 by-path: /dev/disk/by-path/pci-0000:00:1d.7-usb-0:1.4:1.0-scsi-0:0:0:0 detected at: Sun 01 Nov 2009 00:07:43 GMT system internal: 0 removable: 1 has media: 0 detects change: 1 detection by polling: 1 detection inhibitable: 1 detection inhibited: 0 is read only: 0 is mounted: 0 mount paths: mounted by uid: 0 presentation hide: 0 presentation nopolicy: 0 presentation name: presentation icon: size: 0 block size: 0 job underway: no usage: type: version: uuid: label: drive: vendor: HLDS Inc model: SuperMulti RW revision: 0155 serial: 0010101640001C2F0 detachable: 1 can spindown: 0 rotational media: 1 ejectable: 1 media: compat: optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_r optical_dvd_ram optical_mrw optical_mrw_w interface: usb if speed: 480000000 bits/s ATA SMART: not available ========================================================================
(In reply to comment #0) > compat: optical_cd optical_cd_r optical_cd_rw > optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw > optical_dvd_r optical_dvd_rw One problem here is that we don't even detect that it's a Blu-ray drive - I think that's a problem with udev's cdrom_id helper. Please attach the output of 'udevadm info -q all -n /dev/sr1' both - when the drive is empty - when there is a Blu-ray disc in the drive Thanks.
With disk out: $ sudo udevadm info -q all -n /dev/sr1 P: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host11/target11:0:0/11:0:0:0/block/sr1 N: sr1 S: block/11:1 S: scd1 S: disk/by-id/usb-HLDS_Inc_SuperMulti_RW_0010101640001C2F0 S: disk/by-path/pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 S: cdrom1 S: cdrw1 S: dvd1 S: dvdrw1 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host11/target11:0:0/11:0:0:0/block/sr1 E: MAJOR=11 E: MINOR=1 E: DEVNAME=/dev/sr1 E: DEVTYPE=disk E: ID_CDROM=1 E: ID_CDROM_CD_R=1 E: ID_CDROM_CD_RW=1 E: ID_CDROM_DVD=1 E: ID_CDROM_DVD_R=1 E: ID_CDROM_DVD_RAM=1 E: ID_VENDOR=HLDS_Inc E: ID_VENDOR_ENC=HLDS\x20Inc E: ID_VENDOR_ID=152e E: ID_MODEL=SuperMulti_RW E: ID_MODEL_ENC=SuperMulti\x20RW\x20\x20\x20 E: ID_MODEL_ID=1640 E: ID_REVISION=0155 E: ID_SERIAL=HLDS_Inc_SuperMulti_RW_0010101640001C2F0 E: ID_SERIAL_SHORT=0010101640001C2F0 E: ID_TYPE=floppy E: ID_BUS=usb E: ID_USB_INTERFACES=:080550: E: ID_USB_INTERFACE_NUM=00 E: ID_USB_DRIVER=usb-storage E: ID_PATH=pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 E: ACL_MANAGE=1 E: GENERATED=1 E: DKD_PRESENTATION_NOPOLICY=0 E: DEVLINKS=/dev/block/11:1 /dev/scd1 /dev/disk/by-id/usb-HLDS_Inc_SuperMulti_RW_0010101640001C2F0 /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 /dev/cdrom1 /dev/cdrw1 /dev/dvd1 /dev/dvdrw1 With disk in: sudo udevadm info -q all -n /dev/sr1 P: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host11/target11:0:0/11:0:0:0/block/sr1 N: sr1 S: block/11:1 S: scd1 S: disk/by-id/usb-HLDS_Inc_SuperMulti_RW_0010101640001C2F0 S: disk/by-path/pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 S: disk/by-label/OUTLANDER S: cdrom1 S: cdrw1 S: dvd1 S: dvdrw1 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/host11/target11:0:0/11:0:0:0/block/sr1 E: MAJOR=11 E: MINOR=1 E: DEVNAME=/dev/sr1 E: DEVTYPE=disk E: ID_CDROM=1 E: ID_CDROM_CD_R=1 E: ID_CDROM_CD_RW=1 E: ID_CDROM_DVD=1 E: ID_CDROM_DVD_R=1 E: ID_CDROM_DVD_RW=1 E: ID_CDROM_DVD_RAM=1 E: ID_CDROM_DVD_PLUS_R=1 E: ID_CDROM_DVD_PLUS_RW=1 E: ID_CDROM_DVD_PLUS_R_DL=1 E: ID_CDROM_BD=1 E: ID_CDROM_BD_R=1 E: ID_CDROM_BD_RE=1 E: ID_CDROM_HDDVD=1 E: ID_CDROM_MEDIA=1 E: ID_CDROM_MEDIA_BD=1 E: ID_CDROM_MEDIA_STATE=complete E: ID_CDROM_MEDIA_SESSION_COUNT=1 E: ID_CDROM_MEDIA_TRACK_COUNT=1 E: ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 E: ID_VENDOR=HLDS_Inc E: ID_VENDOR_ENC=HLDS\x20Inc E: ID_VENDOR_ID=152e E: ID_MODEL=SuperMulti_RW E: ID_MODEL_ENC=SuperMulti\x20RW\x20\x20\x20 E: ID_MODEL_ID=1640 E: ID_REVISION=0155 E: ID_SERIAL=HLDS_Inc_SuperMulti_RW_0010101640001C2F0 E: ID_SERIAL_SHORT=0010101640001C2F0 E: ID_TYPE=floppy E: ID_BUS=usb E: ID_USB_INTERFACES=:080550: E: ID_USB_INTERFACE_NUM=00 E: ID_USB_DRIVER=usb-storage E: ID_PATH=pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 E: ID_FS_LABEL=OUTLANDER E: ID_FS_LABEL_ENC=OUTLANDER E: ID_FS_TYPE=udf E: ID_FS_USAGE=filesystem E: ACL_MANAGE=1 E: GENERATED=1 E: DKD_PRESENTATION_NOPOLICY=0 E: DKD_MEDIA_AVAILABLE=1 E: DEVLINKS=/dev/block/11:1 /dev/scd1 /dev/disk/by-id/usb-HLDS_Inc_SuperMulti_RW_0010101640001C2F0 /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.4:1.0-scsi-0:0:0:0 /dev/disk/by-label/OUTLANDER /dev/cdrom1 /dev/cdrw1 /dev/dvd1 /dev/dvdrw1
Yeah, looks like cdrom_id doesn't do the right thing when there's no media in the drive. Adding Kay as Cc for that. Bastien, please also attach the output of # /lib/udev/cdrom_id --export --debug /dev/sr1 when no disc is present - it might yield some interesting error messages. Thanks!
$ sudo /lib/udev/cdrom_id --export --debug /dev/sr1 main: probing: '/dev/sr1' cd_media_compat: CDROM_DRIVE_STATUS != CDS_DISC_OK ID_CDROM=1 ID_CDROM_CD_R=1 ID_CDROM_CD_RW=1 ID_CDROM_DVD=1 ID_CDROM_DVD_R=1 ID_CDROM_DVD_RAM=1 (obviously, as there's no discs in the drive...)
This patch for cdrom_id fixes it for me. Tested with my Blu-ray/HD-DVD drive featuring a tray. The tray stays out while running this $ ./cdrom_id --export --debug /dev/sr0 main: probing: '/dev/sr0' cd_media_compat: CDROM_DRIVE_STATUS != CDS_DISC_OK cd_inquiry: INQUIRY: [HL-DT-ST][BD-RE GGW-H20L ][YL05] cd_profiles: GET CONFIGURATION: number of profiles 476 cd_profiles: profile 0x40 cd_profiles: profile 0x41 cd_profiles: profile 0x42 cd_profiles: profile 0x43 cd_profiles: profile 0x50 cd_profiles: profile 0x12 cd_profiles: profile 0x11 cd_profiles: profile 0x15 cd_profiles: profile 0x16 cd_profiles: profile 0x14 cd_profiles: profile 0x13 cd_profiles: profile 0x1a cd_profiles: profile 0x1b cd_profiles: profile 0x2b cd_profiles: profile 0x10 cd_profiles: profile 0x09 cd_profiles: current profile 0x00 cd_profiles: no current profile, assuming no media ID_CDROM=1 ID_CDROM_CD_R=1 ID_CDROM_CD_RW=1 ID_CDROM_DVD=1 ID_CDROM_DVD_R=1 ID_CDROM_DVD_RW=1 ID_CDROM_DVD_RAM=1 ID_CDROM_DVD_PLUS_R=1 ID_CDROM_DVD_PLUS_RW=1 ID_CDROM_DVD_PLUS_R_DL=1 ID_CDROM_BD=1 ID_CDROM_BD_R=1 ID_CDROM_BD_RE=1 ID_CDROM_HDDVD=1 diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 6ea763b..2380b15 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -583,9 +583,9 @@ int main(int argc, char *argv[]) goto exit; } - /* check for media */ - if (cd_media_compat(udev, fd) < 0) - goto print; + /* check for media - don't bail if there's no media as we still need to + * to read profiles */ + cd_media_compat(udev, fd); /* check if drive talks MMC */ if (cd_inquiry(udev, fd) < 0)
Kay gave me the goahead to commit this to udev. Fixed.