/dev/dvd missing

Since upgrading to 42.3 I have been missing /dev/dvd which vlc expects. I have a dvd as /dev/sr1 (and a cd as /dev/sr0). I can create a soft link but it goes away on the next boot. What am I missing?

afaik you’re not missing anything those are device link points not mount points and are hardcoded in the kernel you can create links to them but you shouldn’t as /dev/sr0 and /dev/sr1 are the defaults if you have 2 optical drives it doesn’t matter if they’re CD or DVD drives, plasma 5 mounts them automatically when a disk is inserted I can’t remember the mount point and I’m too lzay to find a disk to mount so I can see where it gets mounted as I haven’t had the need to use any optical media in years
maybe you can open a bug report regarding vlc’s need of /dev/dvd just keep in mind that vlc is developed by videolan and the people at opensuse and packman only compile it they don’t touch vlc’s source code

Please show what your system has created for you now. Thus before you create symlinks yourself

ls -l /dev | grep sr

What is Plasma 5?

Perhaps i will add a custom soft link in the boot process

I know that /usr/lib/udev/rules.d/60-cdrom_id.rules is responsible for creating the symlinks (eg /dev/dvd) for the first optical device /dev/sr0

KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
KERNEL=="sr0", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw", OPTIONS+="link_priority=-100"
KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100"
KERNEL=="sr0", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100"

However, for those few that actually have more than one optical device, it is possible to create custom rules (to override the defaults) if you wish to create a symlink (/dev/dvd) linked to a particular device node.

lrwxrwxrwx 1 root root 3 Jan 1 2002 cdrom -> sr0
lrwxrwxrwx 1 root root 3 Jan 1 2002 cdrw -> sr0
brw-rw----+ 1 root cdrom 11, 0 Jan 1 2002 sr0
brw-rw----+ 1 root cdrom 11, 1 Jan 1 2002 sr1

Thanks.

Like @deano_ferrari says, all in /dev is created by ude. Making symlinks yourself is not a good solution. We have to find out why the dvd symlink is not created by the udev rules. Maybe it can not decide which of both sr0 and srr1 to take. Or both devices specs found do not cover DVD capability.

Yes, the udev rules provided by default only generate symlinks specifically for /dev/sr0. It’s easy enough to tweak for multiple devices though.

Plasma 5 is kde5’s desktop environment
KDE 5 was split into 3 projects: the kf5 (KDE Frameworks 5) libraries, the KDE 5 applications and the Plasma 5 desktop (the kde4 desktop was also called Plasma but it wasn’t a separate project)
I haven’t noticed any issues with DVD playback but then again I haven’t tried playing a Disk, my point was when inserting a new storage device the Plasma 5 desktop should give you a choice of actions for DVD video’s one of said actions should be to play the video in vlc or dragon or kaffeine

Thanks; as I do not run KDE (or Gnome) there was no reason for me to know that!

I made a simple change to the 60-cdrom rules to create /dev/dvd for sr1 rather than sr0 and it seemed to work. I suspect I should do it in a new file… but for now it is OK

Nicely done.

But indeed, take care, changing the installed file instead of making an extra one might result in it being overwritten at an update or upgrade.

Yes, ideally custom rules should go in the /etc/udev/rules.d/ directory instead, and will take precedence over the default system rules in /usr/lib/udev/rules.d/. If needed the rule can be appended with the ‘last_rule’ option to ensure that no later rule can have any effect.

OPTIONS+="last_rule"

In general, suitable matching attributes for a given device can be obtained using udevadm with the applicable device node eg for /dev/sr1…

udevadm info -a -p $(udevadm info -q path -n /dev/sr1)

One attribute from one parent device listed and one (or more) from the device itself can be used for suitable matching in a udev rule.

I still don’t get your issue
what desktop enviroment are you using plasma 5 lxqt gnome mate what?
I just did a test and after inserting a DVD plasma 5 gave me few options one of which was to play the DVD with vlc I selected that and vlc opened and played the disk without an issue
I also did the manual way by starting vlc and selecting File->open disk vlc opened the DVD
I did notice the URI used was DVD:\\dev\sr0 but that should be irrelevant to the end user vlc will open and play dvd’s no matter what the device or mount point is, I do belive the mount point is somewhare /run/<DVD_Label>

IMHO the problem is that when a DVD device is connected to the system (most of these are foxed connections, thus I mean it is already there at boot, not later using USB), the “system” should detect that and create the special files for it. The system being the kernel of course in close cooperation with udev. This is regardless of any desktop that may be used or not.

Device files created for CD/DVD devices are first sr0, sr1, … (like they are sda, sdb, … for mass-storage). Then there are created symlinks with a more logical naming (like those in /dev/by-*/ for mass storage), and they are /dev/cdrom, /dev/cdrw, /dev/dvd and /dev/dvdrw. See on my system:

henk@boven:/dev> ls -l | grep sr
lrwxrwxrwx  1 root root           3 24 okt 09:14 cdrom -> sr0
lrwxrwxrwx  1 root root           3 24 okt 09:14 cdrw -> sr0
lrwxrwxrwx  1 root root           3 24 okt 09:14 dvd -> sr0
lrwxrwxrwx  1 root root           3 24 okt 09:14 dvdrw -> sr0
srw-rw-rw-  1 root root           0 24 okt 09:14 log
brw-rw----+ 1 root cdrom    11,   0 24 okt 09:14 sr0
henk@boven:/dev>

So the user (program) can now simply use /dev/dvd without knowing what the exact naming ofthe DVD device is. That is of course very important when there are more then one of these devices and even more when some are rw and other r-only and when some are able to handle DVDs and other only CDs.

So those symlinks are important to be made to the correct devices.

In the OP’s case it seems that earlier this was done correct, but now /dev/dvd is not created.

This creation is done by udev using the udev rules. So one could try to find out the difference between those rules between 42.2 and 42.3 (and maybe file a bug report about the regression) and/or try to create udev rule(s) that repair this. This is where @deano_ferrari tries to help.

Again, this is all done even if the system is a text only one.
But it does not mean that the desktop pop-up and eventual mounting using it, are not available. It could simply use /dev/sr0 and may not depend on the existence of /dev/dvd at all. But the OP’s application tries to use /dev/dvd, which is a very normal thing to do IMHO.

That’s a good summation Henk. :slight_smile: