FS#25609 - [udev] Ejecting DVD via hardware button fails

Attached to Project: Arch Linux
Opened by H.pferd (stosch) - Tuesday, 16 August 2011, 16:45 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 09 November 2011, 00:55 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Since new udev 173 I'm not able to eject a DVD via the trays hardware button when the tray is locked (for example after watching a dvd). When I start thunar (which starts udisks-daemon) it works again.
I read  FS#25405  but the eject command works for me.
I don't know what exactly happens when the hardware button is pressed so even this seems to be caused by udevs new locking function it might be related to another software. So excuse me if the [udev] in title might be misleading.
Just tell me if you need other some logs..

Additional info:
udev 173-3

drive type:
[ 2.084896] scsi 1:0:0:0: CD-ROM LITE-ON DVDRW LDW-851S GS0C PQ: 0 ANSI: 5


Steps to reproduce:
Insert disk, start vlc or another software and press the eject button
This task depends upon

Closed by  Tom Gundersen (tomegun)
Wednesday, 09 November 2011, 00:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  This is fixed with linux 3.1, which is now in testing.
Comment by Tom Gundersen (tomegun) - Saturday, 20 August 2011, 15:28 GMT
Could you try udevadm monitor when you press the button and post the output?
Comment by H.pferd (stosch) - Sunday, 21 August 2011, 16:26 GMT
Without udisk-daemon running I get no output.
When it is running I get:

KERNEL[3221.004075] change /devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0 (block)
UDEV [3224.711660] change /devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0 (block)
KERNEL[3225.004651] change /devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0 (block)
UDEV [3225.059226] change /devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0 (block)
Comment by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 17:12 GMT
@stosch: not that I think it makes a differenc, but could you also post the output of "udevadm monitor --property" ?
Comment by H.pferd (stosch) - Sunday, 21 August 2011, 17:45 GMT
No difference without udisks-daemon.
The output with udisks-daemon running I attached to the file for better readability.
   output (2.3 KiB)
Comment by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 19:33 GMT
Could you post the vaule of /sys/module/block/parameters/events_dfl_poll_msecs ?

in-kernel polling needs to be enabled to detect button presses. This is usually done by udev by setting the value to 2000.
Comment by Robert Petranovic (jazzfan) - Sunday, 21 August 2011, 19:39 GMT
I have the same problem. /sys/module/block/parameters/events_dfl_poll_msecs was 0. After setting it to 2000, eject works fine.
Comment by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 19:39 GMT
Oh, and could you try to see if

# echo 1000 > /sys/module/block/parameters/events_dfl_poll_msecs

fixes the problem?
Comment by Robert Petranovic (jazzfan) - Sunday, 21 August 2011, 19:43 GMT
It works, but now udevadm monitor doesn't echo anything.
Comment by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 19:52 GMT
I had the issue explained to me by the udev maintainer, and my understanding is that in order to set the value udev relies on a feature from what will be linux 3.1 (which we obviously don't ship yet): <http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=88bfa3247961fe5f3623f4d2cf1cd5dc72457598>.

As a temporary workaround, I suggest adding

echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs

to your rc.local.
Comment by Robert Petranovic (jazzfan) - Sunday, 21 August 2011, 19:57 GMT
thanks a lot man
Comment by H.pferd (stosch) - Sunday, 21 August 2011, 20:08 GMT
It works. Thank you very much.

Loading...