Bug 906946 - eject -i on does not disable hardware button
eject -i on does not disable hardware button
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: udev-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-02-01 19:02 EST by Grant
Modified: 2015-06-06 05:25 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-23 12:45:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Grant 2013-02-01 19:02:29 EST
Description of problem:

"eject -i on" should disable the hardware eject button so it doesn't pop open in a laptop case or when pressed (repeatedly...all day long) by a toddler.  This functionality works fine in Ubuntu but does not work in Fedora 17 or 18.

Please help, my 18-month old is driving my nuts by constantly ejecting and pushing in the cdrom!

Version-Release number of selected component (if applicable): eject from util-linux 2.22.1

How reproducible:

Steps to Reproduce:
1. 'eject -i on'
2. eject says "eject: CD-Drive may NOT be ejected with device button"
3. press the hardware button to eject cdrom
Actual results:

Cdrom ejects

Expected results:

Cdrom does nothing

Additional info:
Comment 1 Grant 2013-02-01 19:49:46 EST
OK, little more research has shed some light on this.  The udev rule /usr/lib/udev/rules.d/60-cdrom_id.rules hears the hardware button and makes it eject without caring what's in /proc/sys/dev/cdrom/lock or anywhere else. 

If you comment out the line

ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"

then everything seems to work as expected.  Cdrom still ejects when you want it to but responds to disabling as it should.  I don't know enough about udev to know what else it breaks to comment out this line, but it works for me.  Smarter udev behavior would be great.
Comment 2 Kamil Dudka 2013-02-01 20:03:49 EST
eject works as expected.  I am switching the component to udev...
Comment 3 Fedora End Of Life 2013-12-21 06:04:49 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Grant 2013-12-21 17:43:16 EST
This bug is still present in Fedora 20.
Comment 5 Kay Sievers 2014-02-23 12:45:33 EST
eject -i locks an individual cdrom, /proc is an awkward global interface
acting for all cdroms on the system.

I don't see a way to query an individual cdrom for the eject -i setting.

I'm closing this bug, it is unlikely to get changed/fixed in the kernel, and
udev should not use the awkward /proc interface.

You can always, as a local customization, copy the udev rules file from
/usr/lib to /etc and edit it there. The one in /etc will entirely overwrite
the one in /usr/lib.

Note You need to log in before you can comment on or make changes to this bug.