View Full Version : Eject doesn't work
Using TRUNK in Fedora 10 gnome.
I've traced the problem to gnome automounting - since the disk is mounted, eject command fails.
What would you say is the proper way to fix this - disable automounting or send an unmount command before ejecting in xbmc?
Okay, so apparently user-initiated unmount is not allowed without a suid executable. It's kind of dirty, but this calls for something ugly, like
system("umount /dev/sr0")
Update: even that doesn't help, I get am I/O error. Maybe xbmc keeps some handle open on the DVD...
Interestingly, if I quit xbmc and open it up again, it can eject without a problem.
Sounds like XBMC is holding onto a FD or something.
You could try:
#echo 0 > /proc/sys/dev/cdrom/lock
That should stop the Kernel from locking the drive.
gnif: thanks, that fixed it!
In the latest SVN revision, close doesn't work. Patch to fix it:
--- xbmc/Util.cpp (revision 17750)
+++ xbmc/Util.cpp (working copy)
@@ -2949,7 +2949,7 @@
}
else if (execute.Equals("ejecttray"))
{
- if (CIoSupport::GetTrayState() == TRAY_OPEN)
+ if (CIoSupport::GetTrayState() == DRIVE_OPEN)
CIoSupport::CloseTray();
else
CIoSupport::EjectTray();
In r18548 the bug fix no longer applies - it appears fixed (code moved to ToggleTray in xbmc/xbox/IoSupport.cpp), but eject doesn't work
In r18548 the bug fix no longer applies - it appears fixed (code moved to ToggleTray in xbmc/xbox/IoSupport.cpp), but eject doesn't work
You sure you are trying iso9660 CDs? Also if you are mounting the drives, gnome usually does this, this will certainly make eject not working (trying to fix this though)
A debuglog would be most helpfull, as the code worked last I tried. (Rarely use CD's :D )
I'm using xbmc svn 18466 (with --standalone option), if I try to eject a dvd/cd (with eject command) the dvd is remounted by xbmc and it isn't ejected.
is it normal?
I'm using xbmc svn 18466 (with --standalone option), if I try to eject a dvd/cd (with eject command) the dvd is remounted by xbmc and it isn't ejected.
is it normal?
This is what Im trying to fix, have had to much in school recently but all the ground work is laid out so it should be fairly easy to fix now.
Hopefully the following days or so.
ok thanks,
another question: is there a way to remove safely (unmount) removable devices like usb pens?
ok thanks,
another question: is there a way to remove safely (unmount) removable devices like usb pens?
Yes. In latest SVN press eject in context menu.
You sure you are trying iso9660 CDs? Also if you are mounting the drives, gnome usually does this, this will certainly make eject not working (trying to fix this though)
A debuglog would be most helpfull, as the code worked last I tried. (Rarely use CD's :D )
Sorry for long reply delay, I don't check back often (need to enable email notifications)
Yeah I'm using gnome and it automounts. Also, trying mostly video DVDs but CDs give same effect.
gnif's suggestion works (though I wouldn't like it as a permanent solution). If using this, something pops up warning me about unsafe unmount. (popup bottom-right.. could be XBMC or could be gnome..)
I've also noticed that if I press the open button on the DVD drive many times in a fast succession, it ejects. Of course that's not something I want to do to eject :(