9

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!

levesque
  • 4,572

7 Answers7

9

Does

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

work?

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

TGM
  • 602
3

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

3

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

Michel
  • 426
2

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

Lyrositor
  • 1,018
1

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

/dev/cdrom: 
setting drive doorlock to 0 (off) 
HDIO_DRIVE_CMD(doorlock) failed: Bad address
1

try

sudo eject

on the command line.

esamatti
  • 561
0

If nothing helped from the answers above.

Create file

/etc/sysctl.d/20-no-cdrom-lock.conf 
dev.cdrom.lock=0

for testing before run

sudo sysctl dev.cdrom.lock=0
nobody
  • 5,792