v15 Kodibuntu DVDs can't play until restart
#1
Video 
Hey guys, I've seen a couple threads about DVD playback issues, but none seem to be the same as the issue I have. I built a HTPC and installed kodibuntu on it. I used apt to upgrade everything and installed cec-utils to get my CEC-compatible TV + remote to work with it. I'm still using the default confluence theme.

When I insert a disk into the drive, it shows a "Play Disk" option on the home screen. No matter how many times I press it (and it plays the little button sound when I do), the DVD doesn't play. If I restart or cold boot the box with the DVD already in the drive, the "Play Disk" option immediately plays the DVD.

I am using a home videos DVD, so there is no copy protection on it. lsblk shows sda and sdb, which are my main ssd and home folder drive, as well as sr0, my DVD drive. Before rebooting, lsblk shows
Code:
sr0     11:0    1   7.8G  0 rom
, and after rebooting, it shows
Code:
sr0     11:0    1   3.2G  0 rom  /media/DISC_42
. Only booting with the disk in the drive makes it mount - meaning after rebooting, I have to reboot again if I swap out the disk.

Has anybody else had this problem before or have any ideas why it might be happening?

Edit:

In testing this further, I found that /dev/cdrom seems to be the proper dvd drive. Running `mount /dev/cdrom /media/cdrom0` causes kodi to show a drive mounted notification, and it then plays fine.

I adjusted my /etc/fstab to include
Code:
/dev/cdrom     /media/cdrom0    udf,cdfs,iso9660   user,auto,exec,utf8   0   0
though this causes mount to output
Code:
/dev/sr0 on /media/cdrom0 type udf (ro)
This confuses me on which (sr0 or cdrom) is the proper device name or whether this even matters.

Nevertheless, this doesn't seem to auto mount disks that are inserted on the fly, as I have to run this command (or reboot) whenever inserting a new disk.

Edit:

A thread on askbuntu suggested installing udftools, so I did that and removed my fstab stuff. Now when I insert the disk, it shows up as Play Disk, which still doesn't work, but when I press the eject button, the tray opens and closes immediately. The Play Disk option is now gone, but the disk is mounted and playable from Videos > Files > Right Click Disk > Play

I am so confused.
Reply
#2
I am having exactly the same problem. Have Kodi 15 running on Linux 14.04. Originally Kodi 14.2 and played DVD's fine with autoplay selected. When Disc is inserted played fine, every time. Now that my version is Kodi 15, when I insert disc, the 'Play Disc" option appears but nothing happens, and if I click on play, still nothing. If I then eject disc, it immediately re-inserts and a window appears with " browse video files " options. If I persist, I can finally get disc to play.
Interestingly I get message saying "external HDD mounted" and when I eject disc finally, "external HDD successfully unmounted"
What can I do to fix this , apart from going back to Kodi 14.2?
Reply
#3
I'm so glad I'm not the only one with this problem. My temporary solution is to insert the disk, eject once and let it load the tray again, then go to videos -> files -> right click on the disk -> play.

I always upgraded after installing kodibuntu, so I didn't know it worked in 14.2. My first guess is that when upgrading from 14.2 -> 15, it ran an update script that set up the auto mount, but 14.2 already had auto mount working so it conflicts and breaks it. I'll have to experiment.
Reply
#4
I've made some progress on this issue. I reinstalled kodi on some new hardware I bought and the issue is still present before upgrading to v15.

Although I don't have a solution yet, I think the solution is installing stock ubuntu 15.04 and installing kodi via the apt repository. After doing so and creating a kodi user, enabling auto login, setting the default session to kodi (by selecting the kodi session on the login screen it remembers this choice), and adding kodi to the dialout group to allow it to use cec (sudo usermod -aG dialout kodi), you end up with an up to date setup that is essentially the same as kodibuntu.

The important distinction is that from this point, the ubuntu install has nothing doing auto mounting, so you are free to set up any auto mounting solution. (The default CD auto mounting solution for ubuntu is only present in the unity session, so using the kodi session installed by the package leaves nothing to interfere.)

At this point I have tried a few solutions, but the most promising looks like udisks-glue, which has come VERY VERY CLOSE to solving this issue. I have followed the guide here to install udisks-glue: http://angryelectron.com/udisks-glue-initscript/ (note that there's a typo in the udisks-glue compilation guide linked to from that post - the dependency is libdbus not libdus)

With udisks-glue, I have managed to get CDs to auto mount perfectly and reliably, with the one problem that they are only readable to root. I am not sure why this is. My udisks-glue config is as follows:

Code:
filter optical {
    optical = true
}
match optical {
    automount = true
    automount_options = defaults
}
I have also tried automount_options = ro, but that makes no difference. It seems to error out (on dmesg) when I try anything like "user" or "dmask=0000" in automount_options.
Reply
#5
I don't like to double post (or triple post for that matter), but I think the situation calls for it, because I have a perfect solution for auto mounting!

In order to make this work, you should start with a base of stock ubuntu. My solution uses ldm by LemonBoy instead of udisks-glue.

Base System Setup

1. Install kodi from the kodi repos
2. Add a kodi user in the ubuntu control panel
3. Add kodi to the dialout group if you use cec (sudo usermod -aG dialout kodi)
4. Select kodi and the kodi session on the login screen, then enable auto login to kodi from your admin account

Auto Mount

5. Install dependencies:
Code:
sudo apt-get install git make pkg-config libudev-dev libmount-dev libglib2.0-dev

6. Clone ldm
Code:
git clone https://github.com/LemonBoy/ldm.git
cd ldm

7. Build and install ldm
Code:
make
sudo make install

8. Create the file /etc/ldm.conf (as root)
Code:
MOUNT_OWNER = root
BASE_MOUNTPOINT = /mnt

9. Enable the ldm service
Code:
sudo systemctl enable ldm

CDs now automount when inserted to /mnt/<uuid or label> with world readable permissions. Kodi recognizes the disk, shows the play disc button, and reads the disk perfectly.

Now you can delete the folder where you cloned ldm (probably your home directory)

I've tested these instructions twice and it works great.
Reply
#6
I have had very similar behavior on my Kodibuntu. Seems to be true for both DVD and Blu-Ray discs. It worked fine with Kod 14.x but not in 15.x. I don't think it is really a Ubuntu issue, though obviously changes at that level can be effective. My system has MakeMKV installed and I have found that, while Kodi is unable to play discs, MakeMKV recognizes, opens, and reads them without issue in every case. (If a disc is inserted while MakeMKV is running, it is mounted and recognized in the MakeMKV gui without intervention.)
-- Steve

"I just wanted a media center, not a hobby!"

HW: CPU - Intel Core i3-4130T, RAM - 4GB, Storage: 640GB, TV Tuner - HDHomeRun Connect x3
SW: OS - LibreELEC, Media Center - Kodi 18.5, Skin - Amber, PVR - TVHeadend
Reply
#7
(2015-08-31, 17:17)sblack55 Wrote: I have had very similar behavior on my Kodibuntu. Seems to be true for both DVD and Blu-Ray discs. It worked fine with Kod 14.x but not in 15.x. I don't think it is really a Ubuntu issue, though obviously changes at that level can be effective. My system has MakeMKV installed and I have found that, while Kodi is unable to play discs, MakeMKV recognizes, opens, and reads them without issue in every case. (If a disc is inserted while MakeMKV is running, it is mounted and recognized in the MakeMKV gui without intervention.)

Yeah I think I remember finding a thread about makemkv and mounting, though I'm pretty sure there was something about makemkv licenses that need to be refreshed periodically. I'm still waiting on LemonBoy to respond about my PR on github. LDM has been a pretty good solution for me. I wish kodi devs would figure something out because it's obviously a widespread issue.
Reply
#8
Read the 100 threads on this matter about optical media mounting on standalone mode, its a huge issue and no one has fixed it in 4 years + so I doubt it will be addressed any time soon as most devs claim they dont have optical drives or its not their department.

Essentially until anyone is annoyed enough and can actually fix issue pops up, either live with it or add some udev rule to do this job for you.
Reply
#9
Hello Stephen304, hello all,

thanks for sharing this information. I am running exactly into the same issue.
I tried to implement the solution described by Stephen304 but failing to compile LDM.
Has anyone done this on a Kodibuntu (based on 14.04 LTS) yet and can confirm it should work there or do I need to start over from scratch on a 15.04 System?

Thanks a lot and with best regards
Reply
#10
It's probably because of existing things set up in kodibuntu. I didn't want to figure out what broken auto mounting thing was already set up and could be interfering with custom solutions so I could disable it, so I decided to go back to stock ubuntu because I know there's no other factors affecting the operation of auto mounting.

It's up to you whether you want to start over with stock ubuntu or try to fix kodibuntu - the issue I see is that different people have different solutions work for kodibuntu throughout the versions. With stock ubuntu, I see no reason why the same solution that worked for me shouldn't work for you, as a fresh install of ubuntu removes all other factors.
Reply
#11
Hello Stephen304,

thanks for your answer.
I started a test yesterday evening on a standard Ubuntu 14.04 LTS. The end result is the same:
Code:
sudo make
#cc -std=c99 -D_GNU_SOURCE -Wall -Wunused-parameter -O2 -DVERSION_STR="\"v0.6.1-15-g6405c08\"" `pkg-config --cflags libudev #mount glib-2.0` -o ldm.o -c ldm.c
#Package blkid was not found in the pkg-config search path.
#Perhaps you should add the directory containing `blkid.pc'
t#o the PKG_CONFIG_PATH environment variable
#Package 'blkid', required by 'mount', not found
l#dm.c:6:18: fatal error: glib.h: No such file or directory
#include <glib.h>
#                  ^
#compilation terminated.
#make: *** [ldm.o] Error 1

Started to dig a little deeper and I stumbled over this:
https://bugs.launchpad.net/ubuntu/+sourc...ug/1096581
Basically it says, that this is based on a bug libmount-dev version 2.20.1-5.1 which is used in Ubuntu 14.04 LTS.
So this has nothing to do with Kodibuntu in particular rather than the fact that Kodibuntu is based on 14.04 LTS.
The link says it will be fixed with 16.04 LTS since the version which contains the fix (2.25.1-3) can´t be used with 14.04 because of dependencies.

So without further changes this just will not work.
Too bad :/

I will need to find another solution to fix this issue or reinstall to a newer Ubuntu version.
Best regards
Reply
#12
I use a udev rule for this (but Im on minimal ubuntu + kodi not kodibuntu) and dvd mounting/unmounting is usable irrespective of when dvd was inserted, the only thing that doesnt work is the icons which have been broken since xbmc Eden.

No idea if it will work on kodibuntu but thers are threads that post the udev rule, have a look.
Reply
#13
(2015-10-23, 08:10)ph-apoc Wrote: Hello Stephen304,

thanks for your answer.
I started a test yesterday evening on a standard Ubuntu 14.04 LTS. The end result is the same:

I don't think that bug is the only thing causing it to not work on kodibuntu - even after upgrading kodibuntu to 15.04, no automounting solutions work - I think this means there are multiple issues breaking automounting in kodibuntu. Using 15.04 and ldm should work - have you tried that?

Also, even if you can't compile it on 14.04, you should be able to compile it on a 15.04 computer and copy the folder over before doing make install. I remember I reinstalled ubuntu, kept my home folder, and was able to run ldm fine without the dev dependencies. I would make a ppa if I knew how. Ubuntu is just quite a bit different than arch linux.

(2015-10-23, 09:52)un1versal Wrote: I use a udev rule for this (but Im on minimal ubuntu + kodi not kodibuntu) and dvd mounting/unmounting is usable irrespective of when dvd was inserted, the only thing that doesnt work is the icons which have been broken since xbmc Eden.

No idea if it will work on kodibuntu but thers are threads that post the udev rule, have a look.

What are the icons?
Reply
#14
Icons are images that represent the disk type that should be displayed to represent the disk type inserted. For instance here is an example of a work in progress for Bluray icon https://github.com/xbmc/xbmc/pull/6946/files

Only one that work is https://github.com/xbmc/xbmc/blob/master...ltCDDA.png for audio cd's

Ones that dont work and thers a bug report for are:

https://github.com/xbmc/xbmc/blob/master...DEmpty.png
https://github.com/xbmc/xbmc/blob/master...VDFull.png
https://github.com/xbmc/xbmc/blob/master...DVDRom.png

The code for these you can see in first link in SourcesDirectory.cpp for instance.
Reply
#15
(2015-10-24, 05:38)un1versal Wrote: Icons are images that represent the disk type that should be displayed to represent the disk type inserted. For instance here is an example of a work in progress for Bluray icon https://github.com/xbmc/xbmc/pull/6946/files

Only one that work is https://github.com/xbmc/xbmc/blob/master...ltCDDA.png for audio cd's

Ones that dont work and thers a bug report for are:

https://github.com/xbmc/xbmc/blob/master...DEmpty.png
https://github.com/xbmc/xbmc/blob/master...VDFull.png
https://github.com/xbmc/xbmc/blob/master...DVDRom.png

The code for these you can see in first link in SourcesDirectory.cpp for instance.

Ah, I forgot about those. I don't usually see those icons because I use play disk from the home screen. I don't like going through multiple menus to play disks if I don't have to.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodibuntu DVDs can't play until restart0