LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 03-14-2023, 07:29 PM   #1
obobskivich
Member
 
Registered: Jun 2020
Posts: 609

Rep: Reputation: Disabled
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?
 
Old 03-14-2023, 09:50 PM   #2
frankbell
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
Blog Entries: 28

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
All I can say is that I have never encountered this with either a built-in or portable optical drive.
 
Old 03-14-2023, 10:15 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,375

Rep: Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564Reputation: 564
Quote:
Originally Posted by obobskivich View Post
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.
 
Old 03-15-2023, 03:06 AM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,350
Blog Entries: 1

Rep: Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197
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.
 
Old 03-15-2023, 06:57 AM   #5
obobskivich
Member
 
Registered: Jun 2020
Posts: 609

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
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 View Post
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 View Post
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.
 
Old 03-21-2023, 12:57 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,350
Blog Entries: 1

Rep: Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197Reputation: 2197
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.
 
Old 03-21-2023, 01:30 PM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
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).
 
Old 03-24-2023, 02:02 PM   #8
Arnulf
Member
 
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 306

Rep: Reputation: 111Reputation: 111
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Jailed SF Sysadmin Holds Parts of City Net Hostage LXer Syndicated Linux News 7 07-24-2008 07:10 AM
Is there DMA for SATA Optical Drives? Or is my inspiron optical not supported (yet)? RHLinuxGUY Linux - Kernel 14 09-24-2006 04:11 PM
Held Hostage by FC3 sembazuru Fedora 4 11-28-2004 07:56 PM
My Files Are Being Held Hostage!! biggsjm Linux - Networking 2 10-12-2003 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration