Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-14-2023, 07:29 PM
|
#1
|
Member
Registered: Jun 2020
Posts: 609
Rep: 
|
Prevent linux from locking/taking hostage optical drives
Problem: if ever an optical disc (doesn't matter CD/DVD/Blu-ray) is in an optical drive (doesn't matter USB/IDE/SATA/etc) the drive cannot be opened via its front panel button, and this persists reboots which means the drive is essentially held hostage until booted into linux, logged in, and told to eject in software. The only other alternatives are to use the emergency eject hole, or physically pull the drive from power/data and recycle it, at which point it will again respond to the button until another disc is loaded and the cycle repeats. It also means if there is a disc loaded and you want to eject it to load a different one, you must go through the same software song and dance versus just using the button on the drive. This also means if you need to put a disc in to boot from (e.g. to live boot or something) you can't unless you can boot into linux, log in, and do the software dance, or one of the aforesaid hardware workarounds (which aren't great long-term solutions because they involve mechanical wear on connectors or mechanisms that aren't designed to be cycled constantly).
Question: This does not align with expected behavior (literally every other operating system does not do this, and the button on the drive is allowed to work), and this appears consistent across every distro (and optical drive combination) I've ever used. This leads me to the conclusion that linux is the common culprit. How do I disable this anti-feature and allow optical drives to be opened and closed using their buttons as expected?
|
|
|
03-14-2023, 09:50 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,773
|
All I can say is that I have never encountered this with either a built-in or portable optical drive.
|
|
|
03-14-2023, 10:15 PM
|
#3
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,375
|
Quote:
Originally Posted by obobskivich
Question: This does not align with expected behavior (literally every other operating system does not do this, and the button on the drive is allowed to work), and this appears consistent across every distro (and optical drive combination) I've ever used. This leads me to the conclusion that linux is the common culprit.
|
I have the same problem. The problem is not software. It is hardware. If you use Chinese no name optical drives then they will not open when you press the eject button. They will open (usually) when you do a software eject. Otherwise they can only be opened with a bent paperclip stuck into the emergency eject hole. The paper clip is needed even when the drive is not attached to a computer. I never had the problem when I used name brand optical equipment which came with a name brand computer.
|
|
|
03-15-2023, 03:06 AM
|
#4
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,350
|
I'm usually able to get a CD-RW or DVD-RW button to work by pushing it at an appropriate time before the Grub menu appears.
|
|
|
03-15-2023, 06:57 AM
|
#5
|
Member
Registered: Jun 2020
Posts: 609
Original Poster
Rep: 
|
Quote:
Originally Posted by frankbell
All I can say is that I have never encountered this with either a built-in or portable optical drive.
|
I've had this issue consistently regardless of how the device connects - USB external, SATA or IDE internal, etc. This is with Ubuntu, Sparky, PC Linux OS, Slackware, etc, if there is a disc in the drive the drive will not respond until linux lets it. Specifically to re-create this:
1) Have the machine on
2) Load an optical disc
3) Shutdown the machine
4) Now boot up again - the drive will not open during boot or respond to is buttons, until linux tells it to eject after login. Best as I can tell it has some sort of 'mount' going on because you will see references to the drive's content in dmesg/startup output, so for example if it has a DVD-Video it will have errors because the boot environment can't read DVD-Video (this isn't unexpected behavior just observing that the system *is* talking to the drive during startup).
I know that standalone hardware Blu-ray players will not do this, and many of those run a customized linux distro as their OS, so this is theoretically possible to be either way, but I have no idea what the 'missing link' is here.
Quote:
Originally Posted by jailbait
I have the same problem. The problem is not software. It is hardware. If you use Chinese no name optical drives then they will not open when you press the eject button. They will open (usually) when you do a software eject. Otherwise they can only be opened with a bent paperclip stuck into the emergency eject hole. The paper clip is needed even when the drive is not attached to a computer. I never had the problem when I used name brand optical equipment which came with a name brand computer.
|
Aside from being vaguely racist, this is inaccurate to my question/experience - if you read the OP you'll note that I specifically mentioned this is with any drive I've tested it with, and the only common element is the machine booting the linux kernel. That said, just to appease this line of thinking (in the hopes of ending it): are Plextor, Lite-On, Pioneer, Toshiba, TEAC, or NEC 'name brand' enough for you? If they're made in Japan is that 'pure' enough for you? Because those drives exhibit the same problem, and again this is regardless of upstream computer or connection (e.g. USB, SATA, IDE, etc)- I've consistently seen this exhibited over the years on everything from custom built gaming systems, Supermicro servers, Dell Precision workstations, etc. Both on UEFI and BIOS machines. The common element is the linux. If the same machine with the same hardware is booting Windows, macOS, etc this behavior is not present.
Quote:
Originally Posted by mrmazda
I'm usually able to get a CD-RW or DVD-RW button to work by pushing it at an appropriate time before the Grub menu appears.
|
So this makes me wonder: is 'linux' itself not the problem, but the bootloader? I've experienced this with Slackware as well, which uses lilo, but why couldn't they both exhibit the same behavior (they're supposed to do the same thing, right?). Does grub 'lock' storage devices at some point in its start-up/mount cycle?
Last edited by obobskivich; 03-15-2023 at 06:59 AM.
|
|
|
03-21-2023, 12:57 AM
|
#6
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,350
|
I do believe it's common for an OM drive to lock closed during boot, but I doubt it's Grub-related. I think it also depends on drive firmware and whether or not there's a readable bootable disc in it.
|
|
|
03-21-2023, 01:30 PM
|
#7
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
To me it seems to be related to whether the file system on the disk is mounted and in use or not. When mounted I sometimes see similar symptoms, but the eject command works as long as the drive is not actively in use and the eject button also works when the drive is not actively in use.
If a program is using the drive and locks it then the disk cannot be removed (especially if the program is abnormally terminated before releasing the drive).
|
|
|
03-24-2023, 02:02 PM
|
#8
|
Member
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 306
Rep: 
|
Occurs this problem too if any automount stuff is completely disabled?
Occurs this problem on many computers or is it limited to one computer?
How old are tested optical drives?
Aging may cause malfunctions of front panel button.
|
|
|
All times are GMT -5. The time now is 12:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|