Why is 'wake from suspend' suddenly ejecting my CD tray?

This happened with me yesterday as well. For what it's worth - I reverted back to kernel 5.4.0-81 (Advanced options for Ubuntu) and the problem disappeared. Of course this is just temporary and I will hope a newer kernel, other than 5.4.0-84, will solve the problem.


Updating Ubuntu Kernel solved the problem for me.

  1. Check your current kernel version

    $ uname -s r
    Linux 5.11.0-36-generic
    
  2. Update the Repositories

     $ sudo apt-get update
    
  3. Upgrade

    $ sudo apt-get dist-upgrade
    

The “dist-upgrade” switch asks Ubuntu to handle any dependencies intelligently. That is, if a particular software package is dependent on another software package to run, this command will make sure that the second package is upgraded before upgrading the first one.

This method is a safe way to upgrade your Ubuntu Linux kernel. The kernel updates accessible through this utility have been tested and verified to work with your version of Ubuntu.

  1. Check the updated kernel version

    $ uname -s r
    Linux 5.11.0-37-generic
    

Source: https://phoenixnap.com/kb/how-to-update-kernel-ubuntu