I am a novice with Ubuntu 16.04 and have tried all sorts of commands in the terminal and even sticking a pin in but nothing will get the tray to open
33 Answers
CD trays will open via the Eject button on the front of them when powered, even if not connected to a motherboard so I suggest checking that the power is connected properly (Are there any blinking lights? Can you hear it's internal workings?) and press the eject button. As commenters have suggested, it may be jammed by a disk inside, at which point you may need to disassemble it.
I once had a problem where I could not for the life of me get a disc to read, only to eventually find out that the SATA cable had come loose. Never rule out the possibility of a poor connection.
Sticking a pin in a drive that's powered on will not work. This method works only when a drive is powered off. There's a chance the Eject button does not make a good contact.
A good way to check if the tray is actually working is by installing Brasero, going to Tools>Eject and clicking on Eject on the specific drive. If the tray is ok, it will open this way.
sudo apt-get install brasero
I experience a matching regression in kernel 3.16 and doubt that is fixed in newer ones. If the block device layer read from a CD drive, the tray stays locked. Burn programs and command "eject" can open it.
eject /dev/sr0
xorriso -outdev /dev/sr0 -eject allBut the malfunction of the paperclip hole is not a good sign. There could be a mechanical jam.