• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7
Linux How to associate "Play disc" with the Blu-ray discs?
#46
On XBMCbuntu Frodo, I had to add this symbolic link in order to make the DVDs work fine:
Code:
sudo ln -sf /dev/sr0 /dev/cdrom

I still have no success in enabling the Blu-ray playback directly with the "Play disc" button.
Reply
#47
(2013-02-25, 05:47)teeedubb Wrote: Ok it seem like udisks doesnt like to be executed from a udev rule, from the looks of it the udisks command wasnt being run at all.

Changing my rule to

Code:
ACTION!="add|change", GOTO="cdrom_end"
KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media/bdrom/"
LABEL="cdrom_end"

Is giving me reliable mounting (5 times in a row, but this happened to me with more tries when using the udisks rule) and I know the rule is being run because the disk is being mounted elsewhere, but it is not without some strangeness - it being mounted to /media/disk instead of /media/bdrom. I dont know whats going on there....

That works for you? ist kinda missing everything, try this of course

type this first
Code:
udevadm info -a -n /dev/sr0
]
The output will help you fill in the blacks for your sytem only saince as Is it wont work on yours the ENV{ID_PATH}=="pci-0000:00:0b.0-scsi-1:0:0:0", ATTRS{type}=="5", ATTR{removable}=="1", ATTR{events}=="media_change" is all for my drive.

You will need to make your user be part of adm group as well.
Code:
sudo adduser xbmc adm cdrom plugdev

Code:
ACTION!="add|change|remove", GOTO="cdrom_end"
#Define Device and attributes.
SUBSYSTEM=="block", KERNEL=="sr*", ENV{ID_PATH}=="pci-0000:00:0b.0-scsi-1:0:0:0", ATTRS{type}=="5", ATTR{removable}=="1", ATTR{events}=="media_change"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="sr0"

Mount on device attached from cold boot?
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mkdir -p  /media/%E{ID_FS_LABEL}"
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media/%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/mkdir -p /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"

ACTION=="remove",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="remove",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"
LABEL="cdrom_end"

Now its not prefect and Im not and expert but it actually give me something I agree imperfect and headache. yours yields piddly nothing unfortunately..

This needs a lot of work to get working 100% I decided to share this with you guys so we can crack this nut faster.
Clearly XBMC Devs interest in fixing xbmc is not high on priorities, my bug reports have had no responses, which from experience means no one is looking.

could you guys make some action on the bug reports and open one for Bluray

Mine are here.

Bug 1 No cd/dvd icons at any time http://trac.xbmc.org/ticket/13509

Bug 2 DVD - Music CD -CDR incorrect listing of contents via VIDEO>Files http://trac.xbmc.org/ticket/14128

Bug 3 Filemanager never lists DVD -- DATA CD Optical media only Lists and mounts MUSIC CD http://trac.xbmc.org/ticket/14129

Bug 4 Bluray disk never shows up on Filemanger or Video>Files and wrong content shares with bug 1,2, and 3. (someone can open this I dont have a Bluray player so...

uNi
Reply
#48
Uni not sure why that rule doesnt work for you, maybe it is only good for blurays as its worked for me with me on two different systems. Looking at your rule - if mine did nothing, I dont see how yours will do anymore, as all you have is extra keys to identify your drive and some extra event actions duplicating commands. The mounting commands are basically the same. Care to elaborate on how it is better for you? Ive read that bd's need to be mounted to be decrypted, not sure if this applies to dvd's/cd's. If youve read this thread youd know that there is alot of randomness involved here, identical udev rules have different outcomes on different systems.
Reply
#49
your rule is simply incomplete, mine is not complete eiether idk it needs a lot of work to perfect work out kinks.

Your rule does not create a directory presumes one already exists which it does not, its short and sweet but perhaps it only works for Bluray, I cant test that theory.

Mine definetly needs a great deal of working out kinks because its not fool and full proof and needs to be.

uNi
Reply
#50
My rule is complete. I kept it simple to make it work on multiple systems. To quote the udev manpage

Quote:One or more keys are specified to match a rule with the current device. If all keys are matching, the rule will be applied and the name is used to name the device file or the network interface.

All the extra keys are unnecessary additions. And if youd actually read my posts you would know that creating a directory and pointing the mount command to it has no effect on my system.
Reply
#51
Well your deals with bluray and mine offtopic tries to deal with all optical media. Yours doesnt work for me, and I presume mine doesnt work for you (mine is not working completely and I already stated it needs work to fix kinks), lets leave it at that then.

uNi
Reply
#52
Uni, I can see that your udev rule is a more rounded approach, but please turn down the arrogance, were all trying working towards the same goal and it doesnt help.

Making some changes to simplify your rule and using spontex suggestion regarding the link gives me reliable dvd +bd mounting, but breaks cd playback. Should work on all systems with one bluray drive.

Quote:ACTION!="add|change|remove", GOTO="cdrom_end"
# Define Device and attributes.
SUBSYSTEM=="block", KERNEL=="sr*", SYMLINK+="cdrom"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="sr0"

# Mount on device attached from cold boot?
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mkdir -p /media/%E{ID_FS_LABEL}"
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media/%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/mkdir -p /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"

ACTION=="remove",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="remove",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"
LABEL="cdrom_end"

EDIT I dont think my bluray drive likes cd's (the brand or in general I dont know) - its finicky mounting music + data cds, but mounts a data dvd fine with the above rule
Reply
#53
Music Cd's dont mount since there is no filesystem to mount. Data cd's a whole different matter, either way.

Not being a native English speaker/writer/reader leaves me a bit confused by your last post, No arrogance intended nor even know where you get that from, if anything Im trying to be as detailed as possible to avoid exactly what you the randomness you mention and see if both of us can learn something here.

Anyway the above rule needs a lot of working out kinks and iron it out, the complete lack of experience with udev rules to workaround a OLD and Ignored internal XBMC bug is leaving me stumped to say the least.

One kink is removing of mount path once eject has been issued, another kink is that the XBMC messages mounting external harddrive when cd-dvd is mounted. Yet another kink is actualy getting the mount path to be Label or fallback to device another kink is getting it to work every single time. For e.g if you eject with XBMC mouting back works if you eject with physical button its fails to mount back on media inserted again. Like I said many kinks and no experience.

uNi
Reply
#54
Im going to post updates in this thread from now on as this is getting off topic
Reply
#55
It is also offtopic there, please open a udev rule discussing thread, so its not offtopic anywhere. cheers.

uNi
Reply
#56
Hi

Is there a dummy setup guide for this?

I just got my slot loading Sony Blu-ray drive from Hong Kong this morning and installed it. Only to find out both Blu-ray discs and DVD discs do not auto-play. They are not even mounted unless I reboot with the disc in the drive. I am using Ubuntu 12.10 minimal / XBMC V12.1 / Aeon MQ4 Skin.

What's the best way to easily set this up so I have a Play Disc option? Can anyone point me in the right direction to a current and up to date method?

Many Thanks
Reply
#57
The method in the first post will work, but I've noticed some randomness with mounting so find which rule contents works best for you in this thread and use that.
Reply
#58
I have followed the 1st post about how to setup playback but I cannot get the disc to even play.

I can navigate to the index.bdmv file and when I click on it nothing happens. It does not play at all even when directly launching the index.bdmv file, never mind even getting the play disc option to work.
Reply
#59
Hey guys try out udevil for disc mounting, openelec now uses it and bd disks are now being consistenly mounted, although playing a bd crashes xbmc Sad
Reply
#60
Thanks ... How do you do that under XBMCbuntu ?
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
How to associate "Play disc" with the Blu-ray discs?2