Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

That's about it. Whenever I press the eject button on my cd player, nothing happens. CD player is not the cause of the problem because this never happens to me under Windows. Any suggestions?

In addition, running the eject command from a terminal also does nothing.

More information : I am running ubuntu 10.04 64 bits, have previously read a CD (like 2 hours ago), which I ejected using nautilus because I couldn't eject it using the same hardware button.

Here is the output of the command 'eject -v' :

eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr0'
eject: `/dev/sr0' is not mounted
eject: `/dev/sr0' is not a mount point
eject: `/dev/sr0' is not a multipartition device
eject: trying to eject `/dev/sr0' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sr0' using SCSI commands
eject: SCSI eject succeeded

UPDATE: Ok I would like to add that I am unable to reproduce this bug, as I upgraded to Ubuntu 10.10 using said CD, and behavior seems ok now. It was probably the upgrade to a more recent kernel that did the trick. Thanks everyone!

share|improve this question
What is the output of eject -v? – ændrük Oct 11 '10 at 0:34
what hardware is it? – RolandiXor Oct 30 '10 at 3:32
up vote 7 down vote accepted


sudo umount /dev/cdrom
sudo eject /dev/cdrom


If not can you eject the CD whilst the PC is at the BIOS screen?

share|improve this answer
for clarification, if you have more than one cd drive, you may need to switch /dev/cdrom with /dev/cdrom1, /dev/cdrom2 etc for the number of drives you have until you eject the right one. – TGM Dec 20 '10 at 13:42

Try hdparm -L 0 /dev/cdrom, and then eject?

share|improve this answer

Maybe try using a Live CD and then ejecting. Might help determine if it's a bug with Ubuntu, or your installation.

share|improve this answer

Try sticking a needle or a pin in the small hole from the CD drive. That should get it.

share|improve this answer
+1, Just to add that drives vary so a quick search for 'Eject pin hole' plus your brand of drive may help. This method ALWAYS works, but might not be good for the drive. – Tom Brossman Mar 23 '13 at 22:11


sudo eject

on the command line.

share|improve this answer
Still doesn't work. 'sudo eject -v' outputs the same thing as 'eject -v'. – levesque Oct 11 '10 at 0:53

I am able to reproduce this bug. It occurred for me twice the same way when I accidentally moved some files I was burning to a CD. Performing the eject -v command I get the same output as the OP. Unfortunately, at the time of posting this I have not fixed the issue. The first time it happened, I was able to eject the tray at the BIOS screen, but this time that didn't work. I tried sudo umount /dev/cdrom and got the output umount: /dev/cdrom: not mounted. sudo eject -v did the same thing at this point. I tried hdparm -L 0 /dev/cdrom and got the output

setting drive doorlock to 0 (off) 
HDIO_DRIVE_CMD(doorlock) failed: Bad address
share|improve this answer
Which version are you using? My bug was using a distro that is now over 2 years old. Perhaps you should open a new question? – levesque Oct 28 '12 at 20:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.