Upgraded from 10.04 lts amd64 to 12.04 lts amd64 on a system running without a glitch for years. Now my CD-ROM burner opens by itself like in the bottom question that was closed by a moderator. A DVD burner is also installed in the system and works correctly. Both are recognized and work in the system. No event is recorded in the event log of the tray opening, which happens randomly.
What is opening/closing CD tray?
I have a fresh install of Ubuntu 11.04, and the CD tray opens and closes all by itself. I cannot detect any pattern to when, or why.
How can I determine what is causing this, and how can I stop it?
Sounds like a hardware problem from here – you very likely have an intermittent short or a mechanical issue in the button on the front of the drive. Replace the drive.