Kaffeine DVD Playback in Kubuntu 9.10 Karmic Koala (Updated)

Cannot find input plugin for MRL [dvd:/]

This is an update to this article.

Kaffeine in the current version of Kubuntu seems to be hard wired to play DVD's from only one particular device in the system. The way Kaffeine references the DVD drive is through a file in the dev directory known as a device node, and this device node is currently hard wired to be /dev/dvd.

This is bad for a couple of reasons. The most obvious is if you have more than one DVD drive, you're only going to be able to play DVD's in one of them. This is easy to work around I guess by just simply removing the disc from one drive, and putting it into the other one. The other issue needs a bit of fiddling to work around. And that issue is if the system has decided to create a device node for your DVD drive called something other than /dev/dvd. This can happen if you've had a drive in your system, and then you've moved it to a different IDE port on the motherboard, and/or possibly by changing the device from slave to master or vice-versa.

To see what drive nodes are currently created on your system you can navigate to the /dev directory with Dolphin file viewer.

Start Dolphin.

Navigate to the 'dev' directory.

 

The DVD drive on my system is called dvd1.

As you can see in the above image, my system has a device node called dvd1, but not one called dvd. This it turns out is what has happened when I shifted some hard drives around, and when I plugged the DVD drive back in I put it into a different IDE port than the one it used to be in. Kubuntu now keeps track of device node names that have been used. In my situation, it remembered that at one point on one particular IDE port I had a DVD drive, and so when it booted up with the drive in a different port, it called it dvd1 so as to leave the node called dvd available so that if I plug in a DVD drive back into the port I first used it can call it by the name it used to have.

So, now I need to tell the system that I want the drive to be called dvd and not dvd1. To do this requires editing one file, and issuing one command. The file is called /etc/udev/rules.d/70-persistent-cd.rules.

A summary of the whole procedure is as follows.

  • Start Dolphin
  • Navigate to the /etc/udev/rules.d/ directory
  • Right-click the 70-persistent-cd.rules file.
  • Select Open With and Other.
  • Enter kdesudo kate into the text field and enter your password.
  • Change /etc/udev/rules.d/70-persstent-cd.rules to reflect your desired configuration.
  • Save the changes to the file.
  • Issue the following command: sudo udevadm trigger
 

Navigate to the /etc/udev/rules.d/ directory.
 

Right-click the 70-persistent-cd.rules file.
Select 'Open with' and 'Other'.

 

Enter kdesudo kate into the text field.

Enter your password.

 

Once you type in your password, you should be presented with the Kate text editor and the contents of the 70-persistent-cd.rules file.

 

The innards of my 70-persistent-cd.rules file.

 

Presented below is the contents of the file on my system before I made the changes needed to rename the DVD device node.

# This file maintains persistent names for CD/DVD reader and writer devices.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-cd-aliases-generator.rules
# file; however you are also free to add your own entries provided you
# add the ENV{GENERATED}=1 flag to your own rules as well.
# CDDVDW_SH-S223B (pci-0000:00:1f.2-scsi-4:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-4:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-4:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-4:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-4:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"

# CDDVDW_SH-S223B (pci-0000:00:1f.2-scsi-5:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="cdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="dvd1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1"

As the DVD drive on my system is called /dev/dvd1, I can see that the section that relates to the way the drive is currently connected to my system is the lower 4 lines of text. As I only have one drive, I only need these lines, and not the older ones from when the drive was connected to a different port so I'll do two things. One, remove the 4 lines that relate to the old configuration, and then change the text after SYMLINK+= on each line to reflect what I want the DVD to be referenced by. Kubuntu sets up cdrom, cdrw, dvd and dvdrw, items for a single DVD burner. They are actually all the same device. The changes I made can be seen below.

# This file maintains persistent names for CD/DVD reader and writer devices.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-cd-aliases-generator.rules
# file; however you are also free to add your own entries provided you
# add the ENV{GENERATED}=1 flag to your own rules as well.
# CDDVDW_SH-S223B (pci-0000:00:1f.2-scsi-5:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-5:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"

Once the file is as required, save it and exit from Kate. We now have to issue a command from a text console in order to have the system reconfigure the device nodes for the DVD drive with the new names. Alternatively you can just reboot your system and this will do the same thing.

To issue that command, start a text console and enter this command.

sudo udevadm trigger

The system will ask for your password.

Start a text console.

Issue the command.

 

Now if you check the device nodes in the /dev directory they should reflect the changes made to your 70-persistent-cd.rules file.

Time to test DVD playback with Kaffeine. Hopefully now Kaffeine will now successfully play DVD's as it does on my system.

Note: If when you try to play a DVD, the original fault

has gone away, but you still can't play a commercial DVD, it might be because you need to install libdvdcss2 onto your system. This is necessary to play back commercial DVDs. It can be downloaded from the packages page of the Medibuntu web site. Once you install libdvdcss2, you'll need to eject and re-insert the disk before you can play it back.

Copyright (c) 2009 Greg Newsome all rights reserved.