Can't play DVDs

Hi there,

I’m still kinda new to linux etc., and after even a goat sacrifice and dancing around a bonfire naked didn’t work, I had to admit that I need help…

I bought a Raspberry Pi 3B+ and installed OSMC on it to watch my bought DVDs and BluRays (at least some of the BluRays; I am aware of the problems with bdplus) with it. An external BluRay writer is plugged in via USB. The BluRay writer has its own power plug, so I don’t need an active USB hub in between.

Music CDs are played without a problem, and I was even able to play a BluRay (didn’t test any others yet), but whenever I try to play a DVD, it instantly returns to the KODI main menu.
Several DVDs were tested, but none worked. When I plug the drive into my windows PC, it can play all DVDs without any problems.

I bought the codec keys and according to KODI and terminal, they are activated.
apt-get update/dist-upgrade didn’t help, and neither did re-installing libdvdcss2 etc.
I enabled the debug logs and found a warning about dll_ioctl, so I wanted to check the region code. According to Windows the drives region code is set to 2 (which is correct for germany), but regionset on my Pi throws an error that the region settings couldn’t be read (and setting them with regionset fail).
The log files also contain some errors, mostly due to video and audio codec not being recognized.

You can find the logs here:

If you need anything else, or have an idea how to solve the problem, please let me know. Thanks.

From what I see in the logs -
Jul 01 19:58:31 osmc kernel: Buffer I/O error on dev sr0, logical block 1888581, async page read
Jul 01 19:58:35 osmc kernel: sr 0:0:0:0: [sr0] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Jul 01 19:58:35 osmc kernel: sr 0:0:0:0: [sr0] tag#0 Sense Key : 0x5 [current]
Jul 01 19:58:35 osmc kernel: sr 0:0:0:0: [sr0] tag#0 ASC=0x6f ASCQ=0x3
Jul 01 19:58:35 osmc kernel: sr 0:0:0:0: [sr0] tag#0 CDB: opcode=0x28 28 00 00 00 02 04 00 00 3c 00
Jul 01 19:58:35 osmc kernel: print_req_error: I/O error, dev sr0, sector 2064

This is typical for copy-protected DVDs/Blue-ray’s. They simulate a broken disk, and only their drivers (which obviously only works under Windows), you will tap into.
Have that all the time with bought DVD’s and lately also with Bluerays. Hate it.
I now Rip my Medias that do not work, and keep the movies on my NAS.
And I have to say, that I less and less buy anything on DVD/Blue Ray - because of that crap.

PS: It could also be another issue, ony this is what it looks like for some of my medias.

Thanks for the reply. Your were right, but I made some extensive testing and feel like I should elaborate some more, for anyone else who might have the same problems.

OSMC normally works well with libaacs, libdvdcss etc., so if you don’t use the lib or your KEYDB.cfg doesn’t have a matching entry (for bluray) or the css lib is (for DVD) faulty, you get the result as described by Smurphy. In that case re-installing the lib and updateing the KEYDB.cfg with the correct VUK normally do the trick.
But it can happen that even with the correct VUK a Bluray couldn’t be played, or a DVD doesn’t play even though the de-css works on other DVDs. In those cases (as it was for me) the hardware/Firmware might be the culprit.
Even though the region code isn’t checked to play a DVD under linux, it is still used by the de-css lib to decrypt the data. In my case the hardware information couldn’t be read correctly under linux (but were recognized correctly under Windows). That’s why in my case I was able to play Blurays, but no DVDs worked at all. If that happens to you, you can try to run regionset on the console:

  • exit OSMC and press escape on the startup screen; then log in with user osmc and password osmc
  • download regionset with sudo apt-get install regionset
  • make sure the drive contains a disk and run regionset
  • it will tell you the currently selected region (or shows an error if the region could not be read from the drive), and ask you if you want to change the current region. choose y, then enter the region you want (it doesn’t really matter which region that is, since it is not checked on linux at all to play a disk, but a value has to be set to descramble it), accept the new mask with y, and hope that the operation succeeds
    !!!WARNING!!! Be aware that you can normally only change the region 4 or 5 times, after that it is set in stone and cannot be changed again, so don’t change it too often (regionset tells you how many changes are left)!!!

In most cases this should already do the trick. If you are unlucky, the region could not be set. This is the case if the drive uses hardware from Matshita or custom OEM hardware (mostly from Pioneer). For example, my Verbatim external slim bluray burner has a Pioneer OEM drive under the hood).
Those OEM pieces prevent reading some firmware information, like the Kernel version. Instead they only show “General” as entry (even under windows).

I somewhere read that some Matshita drives work if the region code is set to match the one of the DVD, even though it shouldn’t be necessary under Linux, but I wasn’t able to find a matching drive and test it, so have this info with a grain of salt.

So, what is the outcome of my research?
If DVD-Playback doesn’t work at all for you (even though some blurays may work), try to re-install the lib. If that doesn’t help, download and run regionset. If the region is set correctly, but it still doesn’t work, or if the region could not be set (error), see if you have a Matshita- or OEM-Drive.
(you can see if it is Matshita Hardware by installing lshw and running "sudo lshw -c disk) to get various infos of all installed drives; look at the vendor entry). If it is not Matshita, you have to use a firmware flashing tool to find out if it is one of those crappy “General” OEM drives. If it is, you only can try to flash a different firmware on the drive or buy another one that works right from the start.

I used DRVFlash for that, but since you can make your drive a useless paperweight if you make a mistake with flashing tools, I won’t give instructions here. However, if you are interested in that and want to educate yourself further, I can recommend as starting point. To find a better drive to buy, or a compatible firmware, I can only tell you that google (or duckduckgo and startpage/ixquick) is your friend :wink:

A list of known working drives would be nice to save everyone from the trouble of searching the web :wink: