udev does not create the proper symlinks to /dev/dvd due to the wrong : ENV{ID_PATH} in70-persistent-cd.rules

Bug #926976 reported by jmattock78
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned
udev (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I am not sure how long this has been, but trying to watch a movie I noticed I don't have any symlinks to /dev/cd,dvd* pointing to sr0. looking in /etc/udev/rules.d/70-persistent-cd.rules I noticed that ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:0:0" was the wrong address and a simple change pci-0000:00:1f.2-scsi-0:0:0:0 creates the symlinks.
(doing udevadm info --query=all --name=sr0 gives the address, but _we_ all know normal everyday working people are not going to know how to do something like that!)
reference: https://bugzilla.redhat.com/show_bug.cgi?id=694782

anyway hope this helps..

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: udev 175-0ubuntu3
Uname: Linux 3.3.0-rc2-00116-g71b1b20 i686
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Sat Feb 4 19:42:18 2012
InstallationMedia: Lubuntu 11.04 "Natty Narwhal" - i386 (20101203)
MachineType: LENOVO 0914
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.3.0-rc2-00116-g71b1b20 root=UUID=18bf8de4-d2f8-4d13-b016-bc02113b06f0 ro quiet splash vt.handoff=7
SourcePackage: udev
UpgradeStatus: Upgraded to precise on 2012-02-04 (0 days ago)
dmi.bios.date: 02/24/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 29CN39WW(V2.16)
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Base Board Product Name
dmi.board.vendor: LENOVO
dmi.board.version: Base Board Version
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnLENOVO:bvr29CN39WW(V2.16):bd02/24/2011:svnLENOVO:pn0914:pvrIdeapadZ560:rvnLENOVO:rnBaseBoardProductName:rvrBaseBoardVersion:cvnChassisManufacturer:ct10:cvrChassisVersion:
dmi.product.name: 0914
dmi.product.version: Ideapad Z560
dmi.sys.vendor: LENOVO

Revision history for this message
jmattock78 (justinmattock-deactivatedaccount) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in udev (Ubuntu):
status: New → Confirmed
Revision history for this message
Forest (foresto) wrote :

I believe the /dev/dvd* symlinks were correctly created in xubuntu 13.04 (raring), but they disappeared when I upgraded to 13.10 (saucy).

My /etc/udev/rules.d/70-persistent-cd.rules file contains rules that look like they did the job some time in the past, but they refer to a scsi target that no longer matches my DVD drive, and I notice that there is no longer any symlink for my drive under /dev/disk/by-path.

I ended up writing custom rules to create the /dev/dvd* symlinks, but I doubt that most users will be up to that task.

In raring, the rules file was apparently created by these files from the udev package:
/lib/udev/rules.d/75-cd-aliases-generator.rules
/lib/udev/write_cd_rules

In saucy, there are no such files. Looks the udev package was moved to the systemd source package in saucy. I suppose the missing files must have been forgotten during the move?

Revision history for this message
Forest (foresto) wrote :

On my system, the missing symlinks are:
/dev/cdrw
/dev/dvd
/dev/dvdrw

The /dev/cdrom simlink is created, apparently by /lib/udev/rules.d/60-cdrom_id.rules . Maybe it was intended to replace 75-cd-aliases-generator.rules but someone forgot to add the additional symlinks for CDRW/DVD/DVDRW drives?

Revision history for this message
Martin Pitt (pitti) wrote :

No, they weren't forgotten. Upstream dropped the /dev/cdrom and /dev/dvd* symlinks long ago, we just carried them a little longer. This concept of static symlinks has shown to be unreliable with hardware changes (as you noticed yourself when changing the SCSI drive), and modern desktops and CD handling software should not assume any of these links any more but instead ask sysfs or libudev about available CD drives and their capabilities.

Changed in systemd (Ubuntu):
status: New → Won't Fix
Changed in udev (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Forest (foresto) wrote :

Thanks for the explanation, Martin. I didn't see this mentioned in the release notes or package changelogs, so I imagine I'm not the only one left wondering why the upgrade broke what was working before.

For the record:
I didn't change my SCSI drive or anything else about my hardware. I guess the target change that I mentioned earlier must have been due to something changing in the kernel since raring.
At least one popular application in the repos still assumes that /dev/dvd will exist: vlc.

Revision history for this message
Pierre (pierrewinnipeg) wrote :

I have that problem too. Gnome-mplayer & mplayer (and vlc) will not play commercial dvd as it looks for them in /dev/dvd but they are mounted in /dev/sr0. My dvd is simply no longer routed to the sr0. This happens both on my old and new install of Lubuntu 13.10.

So, does Ubuntu no longer support playing commercial videos? That is a core function for a PC.

You will not fix it... then how do I fix it at my end?

Revision history for this message
Pierre (pierrewinnipeg) wrote :

Clarifying the above. In my case it seems that my /dev/dvd is not mapped (logical name) to cdrom. I suspect that is why this is happening. If this is the problem, how do I fix it? As well, is this a hardware problem?

sudo lshw -c disk

  *-cdrom
       description: DVD-RAM writer
       product: CD/DVDW TS-H652D
       vendor: TSSTcorp
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/sr0
       logical name: /media/myusername/DVDVIDEO
       version: GA01
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 mount.fstype=udf mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,umask=77,iocharset=utf8 state=mounted status=ready
     *-medium
          physical id: 0
          logical name: /dev/cdrom
          logical name: /media/pch/DVDVIDEO
          configuration: mount.fstype=udf mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,umask=77,iocharset=utf8 state=mounted

Revision history for this message
jmattock78 (justinmattock-deactivatedaccount) wrote :

Ubuntu really has to be quicker at bugreports(like watching grass grow). I like left this behind due to no activity.. heck I don't even use that system anymore. maybe somebody who has the time and problem in front of them can takeover this.

Revision history for this message
Marcel Partap (empee584) wrote :

..recent udev seems to fail to generate these symlinks for internal devices because ID_PATH is not set and write_cd_rules needs it for the default "by-path" method else f.e.
# udevadm test $(udevadm info -q path -n /dev/sr0)
will echo "$DEVPATH not supported by path_id. by-id may work."
The "by-id" method works, however in the factory /lib/udev/rules.d/75-cd-aliases-generator.rules this is only used for usb/firewire optical drives, for whatever (deprecated?) reason.
Just override the default rule by creating this simplified /etc/udev/rules.d/75-cd-aliases-generator.rules:
>>>
# These rules generate rules for the /dev/{cdrom,dvd,...} symlinks and
# write them to /etc/udev/rules.d/70-persistent-cd.rules.
ACTION=="add", SUBSYSTEM=="block", ENV{GENERATED}!="?*", ENV{ID_CDROM}=="?*", \
        PROGRAM="write_cd_rules by-id", SYMLINK+="$result"
<<<
fixed it for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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