FS#25838 - disabling cd/dvd eject does not have effect

Attached to Project: Arch Linux
Opened by Juanma Hernandez (juanmah) - Wednesday, 31 August 2011, 10:14 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 06 November 2011, 13:06 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Tobias Powalowski (tpowa)
Tom Gundersen (tomegun)
Architecture x86_64
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

At the command line:

sudo eject -i 1
OR
sudo sh -c "echo 1 > /proc/sys/dev/cdrom/lock"

in other linux flavours prevents any cd/dvd to eject pressing hardware button

Additional info:
* eject 2.1.5-7
* linux 3.0.3-1

Steps to reproduce:

Press hardware button: cd/dvd tray opens/closes
Execute command: sudo eject -i 1
Press hardware button: cd/dvd tray opens/closes. I should not open/close.
Execute command: sudo sh -c "echo 1 > /proc/sys/dev/cdrom/lock"
Press hardware button: cd/dvd tray opens/closes. I should not open/close.

Comments:

It was tested on two computers with different hardware.
BTW, doing 'sudo eject -i 0' or 'sudo eject -i 1' does not change value at /proc/sys/dev/cdrom/lock
This task depends upon

Closed by  Tom Gundersen (tomegun)
Sunday, 06 November 2011, 13:06 GMT
Reason for closing:  Not a bug
Comment by Jakob Matthes (jakobm) - Wednesday, 31 August 2011, 11:21 GMT
I think this is due to udev registering the button press and then executing a software-based eject (software ejects are not blocked by /proc/sys/dev/cdrom/lock), I will look for some references.
Comment by Tom Gundersen (tomegun) - Friday, 02 September 2011, 22:27 GMT
Some references:

udev rule that ejects the cdrom on button press events:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=b20fd3cb3423676a86f12189126b012d2297d5f7

recent change to how udisks handles locking (made possible by the above):
http://cgit.freedesktop.org/udisks/commit/?id=2d0272eb3be71f6ee3f52c55a3d608764b675fb0
Comment by Tom Gundersen (tomegun) - Sunday, 06 November 2011, 13:06 GMT
Udev intentionally disables the kernel's locking logic, and takes care of it itself, so this does not look like a bug to me. If this is causing you problems, I think the most productive would be to take it upstream (describe your usecase).

Loading...