Skip to content

udev: some usb cd/dvd burners have (wrongly?) ID_TYPE=generic #2485

Description

@padrm

Hi,
I own an usb cd/dvd burner that has ID_TYPE=generic (whereas ID_TYPE=cd is expected).
Unless I set my own custom udev rule using ENV{ID_SERIAL}, the device is not detected by some applications like xfburn.
Running /lib/udev/ata_id --export /dev/cdrom and /lib/udev/scsi_id --export /dev/cdrom show nothing.
More details at https://bugs.debian.org/653349.
Output of dmesg when plugging the device and udevadm info --name=/dev/sr0 --query=all are given below.
Regards
Pascal Dormeau

$ udevadm info --name=/dev/sr0 --query=all
P: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sr0
N: sr0
L: -100
S: cdrom
S: cdrw
S: disk/by-id/usb-HLDS_Inc_SuperMulti_RW_001010164000FA655
S: disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
S: dvd
S: dvdrw
E: DEVLINKS=/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0 /dev/disk/by-id/usb-HLDS_Inc_SuperMulti_RW_001010164000FA655 /dev/cdrw /dev/cdrom /dev/dvdrw /dev/dvd
E: DEVNAME=/dev/sr0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sr0
E: DEVTYPE=disk
E: ID_BUS=usb
E: ID_CDROM=1
E: ID_CDROM_CD=1
E: ID_CDROM_CD_R=1
E: ID_CDROM_CD_RW=1
E: ID_CDROM_DVD=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_DVD_R=1
E: ID_CDROM_DVD_RAM=1
E: ID_CDROM_DVD_RW=1
E: ID_CDROM_MRW=1
E: ID_CDROM_MRW_W=1
E: ID_FOR_SEAT=block-pci-0000_00_1a_0-usb-0_1_2_1_0-scsi-0_0_0_0
E: ID_MODEL=SuperMulti_RW
E: ID_MODEL_ENC=SuperMulti\x20RW\x20\x20\x20
E: ID_MODEL_ID=1640
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_2_1_0-scsi-0_0_0_0
E: ID_REVISION=0159
E: ID_SERIAL=HLDS_Inc_SuperMulti_RW_001010164000FA655
E: ID_SERIAL_SHORT=001010164000FA655
E: ID_TYPE=generic
E: ID_USB_DRIVER=usb-storage
E: ID_USB_INTERFACES=:080550:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=HLDS_Inc
E: ID_VENDOR_ENC=HLDS\x20Inc
E: ID_VENDOR_ID=152e
E: MAJOR=11
E: MINOR=0
E: SUBSYSTEM=block
E: SYSTEMD_READY=0
E: TAGS=:uaccess:seat:systemd:
E: USEC_INITIALIZED=1648819193

dmesg output when plugging the device

[ 1644.015558] usb 3-1.2: new high-speed USB device number 3 using ehci-pci
[ 1646.768119] usb 3-1.2: New USB device found, idVendor=152e, idProduct=1640
[ 1646.768125] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1646.768129] usb 3-1.2: Product: SuperMulti RW   
[ 1646.768131] usb 3-1.2: Manufacturer: HLDS Inc
[ 1646.768134] usb 3-1.2: SerialNumber: 001010164000FA655
[ 1647.106580] usb-storage 3-1.2:1.0: USB Mass Storage device detected
[ 1647.106744] scsi host6: usb-storage 3-1.2:1.0
[ 1647.106883] usbcore: registered new interface driver usb-storage
[ 1648.108449] scsi 6:0:0:0: CD-ROM            HL-DT-ST DVDRAM GE20LU10  FE06 PQ: 0 ANSI: 0
[ 1648.109562] scsi 6:0:0:0: Attached scsi generic sg1 type 5
[ 1648.203390] sr 6:0:0:0: [sr0] scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 1648.203409] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1648.203641] sr 6:0:0:0: Attached scsi CD-ROM sr0

Activity

  1. arvidjaar commented on Feb 1, 2016

    @arvidjaar
    Contributor

    generic probably comes from usb_id.

    Running ... /lib/udev/scsi_id --export /dev/cdrom show nothing.

    it does look like program error; ./src/udev/scsi_id/scsi_id.c:scsi_id()

            struct scsi_id_device dev_scsi = {};
    ...
            if (set_inq_values(udev, &dev_scsi, maj_min_dev) < 0) {
                    retval = 1;
                    goto out;
            }
    
    ...
            /* read serial number from mode pages (no values for optical drives) */
            scsi_get_serial(udev, &dev_scsi, maj_min_dev, page_code, MAX_SERIAL_LEN);
    

    ID_TYPE is set by set_inq_values, but when it runs dev_scsi is empty. It looks like set_inq_values should be moved after scsi_get_serial. Do you have chance to rebuild udev with this change?

  2. poettering commented on Feb 1, 2016

    @poettering
    Member

    I don't think this is something we can reasonably maintain within systemd. We lack the technical understanding and the testing equipment for this. This should really be maintained by storage people, not us. For a longer explanation, please see:

    #2500 (comment)

  3. padrm commented on Feb 3, 2016

    @padrm
    Author

    Hi,
    Just for the record I tested the suggested change in src/udev/scsi_id/scsi_id.c but /lib/udev/scsi_id --export /dev/sr0 still leaves no output

  4. reopened this on Feb 3, 2016
  5. padrm commented on Feb 3, 2016

    @padrm
    Author

    Sorry, I closed by accident. Leave it opened

  6. nof8 commented on Jun 13, 2017

    @nof8

    I have the same issue with ID_TYPE=generic in Linux Mint 18.1. Seems like Xfburn doesn't allow me CD writing because of that.

    sudo udevadm info --name=/dev/sr0 --query=all

    P: /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.1/1-2.1:1.0/host6/target6:0:0/6:0:0:0/block/sr0
    N: sr0
    L: -100
    S: cdrom
    S: cdrw
    S: disk/by-id/usb-Initio_DVD-RAM_UJ-850S_0000000000000000W
    S: disk/by-path/pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:0
    S: dvd
    S: dvdrw
    E: DEVLINKS=/dev/cdrw /dev/disk/by-path/pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:0 /dev/dvd /dev/cdrom /dev/disk/by-id/usb-Initio_DVD-RAM_UJ-850S_0000000000000000W /dev/dvdrw
    E: DEVNAME=/dev/sr0
    E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.1/1-2.1:1.0/host6/target6:0:0/6:0:0:0/block/sr0
    E: DEVTYPE=disk
    E: ID_BUS=usb
    E: ID_CDROM=1
    E: ID_CDROM_CD=1
    E: ID_CDROM_CD_R=1
    E: ID_CDROM_CD_RW=1
    E: ID_CDROM_DVD=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_DVD_R=1
    E: ID_CDROM_DVD_RAM=1
    E: ID_CDROM_DVD_RW=1
    E: ID_CDROM_MRW=1
    E: ID_CDROM_MRW_W=1
    E: ID_FOR_SEAT=block-pci-0000_00_14_0-usb-0_2_1_1_0-scsi-0_0_0_0
    E: ID_MODEL=DVD-RAM_UJ-850S
    E: ID_MODEL_ENC=DVD-RAM\x20UJ-850S\x20
    E: ID_MODEL_ID=1040
    E: ID_PATH=pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:0
    E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_1_1_0-scsi-0_0_0_0
    E: ID_REVISION=0106
    E: ID_SERIAL=Initio_DVD-RAM_UJ-850S_0000000000000000W
    E: ID_SERIAL_SHORT=0000000000000000W
    E: ID_TYPE=generic
    E: ID_USB_DRIVER=usb-storage
    E: ID_USB_INTERFACES=:080550:
    E: ID_USB_INTERFACE_NUM=00
    E: ID_VENDOR=Initio
    E: ID_VENDOR_ENC=Initio
    E: ID_VENDOR_ID=13fd
    E: MAJOR=11
    E: MINOR=0
    E: SUBSYSTEM=block
    E: SYSTEMD_READY=0
    E: TAGS=:systemd:seat:uaccess:
    E: USEC_INITIALIZED=433473795405

  7. paxdriver commented on Sep 21, 2020

    @paxdriver

    Forgive my newb-ness, but I'm having the same issue with Mint 19.1 trying to get a usb CD/DVD burner to be found by burning software.. The weird thing to me is dmesg describes the device correctly when plugged in:

    [ 1167.672942] sr 11:0:0:0: Power-on or device reset occurred
    [ 1167.675017] sr 11:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
    [ 1167.675271] sr 11:0:0:0: Attached scsi CD-ROM sr0
    [ 1167.675393] sr 11:0:0:0: Attached scsi generic sg5 type 5

    ... so is it just the term 'scsi generic' and 'ID_TYPE=generic' that is the problem? Has anyone found a quick fix or manual entry that works? I found a forum post (https://ubuntuforums.org/showthread.php?t=2012070) that describes a fix by editing '/etc/udev/rules.d/70-persistent-cd.rules'. The problem is, this file doesn't exist in my system, so the instructions of browsing through the file for the serial key to make the appropriate edits isn't an option, really... I don't know anything about '.rules' files or device settings through the terminal and keep finding dead end posts about it.

    Is there a fix, or patch, or software that doesn't rely on the ID_TYPE of the drive? It's 2020, I'm astonished Ubuntu still has external optical drive issues lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions