Linux Eject not working

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
nanouk76 Offline
Junior Member
Posts: 40
Joined: Aug 2011
Reputation: 1
Post: #1
Hi all,
seems I can't get the optical drive to eject cd's or dvd's. The GUI does say "mounted removable harddrive" upon insertion and "Successfully removed device [disc label]" when wanting to eject but the tray just doesn't eject. Have searched the forums and the wiki but the few fixes didn't solve my problem. Updated the system to Ubuntu 12.04. Running XBMC 11 Eden final.
Any ideas?

ASUS Motherboard M5A78L-M/USB3 // 8 GB RAM
Nvidia GeForce GT 430 graphics card // 2 GB RAM
Ubuntu upgraded to 12.04 LTS
XBMC v.11 Eden
(This post was last modified: 2012-04-30 01:22 by nanouk76.)
find quote
Nachteule Offline
Member
Posts: 85
Joined: Oct 2011
Reputation: 2
Post: #2
Same here. However, Close Tray works well
(This post was last modified: 2012-05-08 01:50 by Nachteule.)
find quote
sho Offline
Team-XBMC Member
Posts: 4,133
Joined: May 2004
Reputation: 3
Post: #3
http://trac.xbmc.org/ticket/10032

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Nachteule Offline
Member
Posts: 85
Joined: Oct 2011
Reputation: 2
Post: #4
Thx for your quick help.

The parameter dev.cdrom.lock =0 does not make any difference, only executing the command "eject -i" after inserting the dvd and closing tray helps. I added this in my already existing udev rule which executes some commands if the tray is opened or closed.
find quote
nanouk76 Offline
Junior Member
Posts: 40
Joined: Aug 2011
Reputation: 1
Post: #5
(2012-04-30 01:21)nanouk76 Wrote:  Hi all,
seems I can't get the optical drive to eject cd's or dvd's. The GUI does say "mounted removable harddrive" upon insertion and "Successfully removed device [disc label]" when wanting to eject but the tray just doesn't eject. Have searched the forums and the wiki but the few fixes didn't solve my problem. Updated the system to Ubuntu 12.04. Running XBMC 11 Eden final.
Any ideas?
Same here Confused . System updated to Ubuntu 12.04 with XBMC Eden. And adding
Code:
dev.cdrom.lock = 0
to /etc/sysctl.conf doesn't do a thing.

ASUS Motherboard M5A78L-M/USB3 // 8 GB RAM
Nvidia GeForce GT 430 graphics card // 2 GB RAM
Ubuntu upgraded to 12.04 LTS
XBMC v.11 Eden
find quote
Wozza_au Offline
Senior Member
Posts: 144
Joined: Jan 2011
Reputation: 1
Location: South Australia
Post: #6
Hi
Not sure if its any help but what I did was change the record button on my remote (which was set for print screen function by default)
to the eject dvd command
from console
Code:
cd /usr/share/xbmc/system/keymaps

sudo nano remote.xml

under the global listing look for the record tabs and change it to

<record>XBMC.EjectTray()</record>

cheers
Wozza
find quote
snyper20 Offline
Junior Member
Posts: 1
Joined: Jun 2012
Reputation: 0
Post: #7
I had the exact same problem and when this solution did not work I stumbled across this: http://forum.xbmc.org/showthread.php?tid=130309
find quote
peter_toyota Offline
Junior Member
Posts: 21
Joined: May 2011
Reputation: 1
Post: #8
Peeps, I had the same issue and here is what I did to get it to work:

I was having no luck making the slot loading cdrom eject on:
LG CAN10 firmware A110 (dell BDROM). This puppy has no eject button whatsoever. I still am running my setup on ZOTAC AD02.

sudo nano /etc/sysctl.conf
added: dev.cdrom.lock=0
sudo sysctl dev.cdrom.lock=0

optional:
cd /usr/share/xbmc/system/keymaps/
sudo nano remote.xml
-- set <record> button to do XBMC.EjectTray()
This does not solve the problem, but My MCE remote has no eject button. I find it convenient to be able to eject the dvd at anytime, not just under the "Play Disc" submenu.

This is what did the trick (Ubuntu12.04):
cd /lib/udev/rules.d/
nano 60-cdrom_id.rules
---scan the section:
# import device and media properties and lock tray to
# enable the receiving of media eject button events
---comment this:
#IMPORT{program}="cdrom_id --lock-media $tempnode"
---add this:
IMPORT{program}="cdrom_id $tempnode"

Also, I had connected several external usb cdroms, so the one I am using now is not really labeled /dev/cdrom, instead it was /dev/cdrom1. Doing 'eject /dev/cdrom1' would spit out the disc, so:

ll /dev (look for all the '->sr0' entries)
Ejectable cdrom as CDROM1(or higher)?
Then lets clean up the cd rules:

nano /etc/udev/rules.d/70-persistent-cd.rules
relabel your cdrom as 'CDROM', erase or re-assign previously connected device definitions not in use.
The file will id your CD rom with the manufacturer string for easier identification.

reboot.

eject should work from now on.

On This last step, I am not sure if XBMC.Eject calls either /dev/cdrom, /dev/cdrom* or /dev/sr0. If it is the latter, then the cd-rules mod is moot. Also, I do not know if you can coerce XBMC and re-compile to have it modify rules.d/ to not place that cdrom lock.
(This post was last modified: 2012-08-26 09:39 by peter_toyota.)
find quote
ReducedToZero Offline
Member
Posts: 88
Joined: Jun 2011
Reputation: 3
Post: #9
@peter

Thanks, the udev rules solved the non-eject issue for me on a MacMini running XBMCbuntu (the sysctl changes mentioned above are already in place as part of the distribution and made no difference) Smile

'Zero

-----
XBMC Frodo | XBMCbuntu (+ OSX / Windows 7 on a MacMini) | Aeon Nox 4 (Stable) | Maraschino Git | xbmcremote 1-04 | XSqueeze
-----
On a long enough timeline. The survival rate for everyone drops to zero.
(This post was last modified: 2012-10-04 20:06 by ReducedToZero.)
find quote
cw-kid Offline
Fan
Posts: 558
Joined: Jun 2012
Reputation: 0
Post: #10
When I go to edit the nano 60-cdrom_id.rules

It says:

# do not edit this file, it will be overwritten on update

What to do?

Also I am not sure about this part?

ll /dev (look for all the '->sr0' entries)
Ejectable cdrom as CDROM1(or higher)?


I only have the one slot loading Blu-ray drive and I have not connected any other external optical drives etc.

This is how it looks currently I have not changed anything yet.

Code:
# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="cdrom_end"
SUBSYSTEM!="block", GOTO="cdrom_end"
KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
ENV{DEVTYPE}!="disk", GOTO="cdrom_end"

# unconditionally tag device as CDROM
KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"

# media eject button pressed
ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $tempnode", GOTO="c$

# import device and media properties and lock tray to
# enable the receiving of media eject button events
IMPORT{program}="cdrom_id --lock-media $tempnode"

LABEL="cdrom_end"

Thanks
(This post was last modified: 2013-05-04 16:48 by cw-kid.)
find quote
Post Reply