Ubuntu 20.04 - CD Drive keeps opening/closing randomly

Ubuntu 20.04

I have tried below solutions provided in Ubuntu forums but it has not solved the problem.

eject -v -a off - Tried this but did not solve the problemsudo setcd -s /dev/sr0 - This solution id for Dell PC but nevertheless tried. Did not work

5

1 Answer

As indicated in the comments, this problem is probably the same as

My alternative solution to avoid changing systemd is by simply inserting a '0' into /proc/sys/dev/cdrom/autoeject

Pick one:

Using rc.local: ( edit file /etc/rc.local )

echo 0 > /proc/sys/dev/cdrom/autoeject

Or using /etc/crontab: ( edit file /etc/crontab )

@reboot root echo 0 > /proc/sys/dev/cdrom/autoeject

Then as a one-time, non-persistant across boots, command line use sudo:

echo 0 | sudo tee /proc/sys/dev/cdrom/autoeject

Which will take effect immediately. No sysctl or service file restart. needed... On the next boot, the modifications to rc.local or /etc/crontab. will take effect, inhibiting the AutoOpen function.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like