1. braindamaged
  2. udev
Issue #3 new

dvd-rom problem

gerard82
created an issue

Since installing this setup everything works ok with the exception of my dvd-rom drive. Once you push the button to open the tray it refuses to close. When you push the button to close it it closes and 1 second later it opens again no matter how often you try to close it. Makes no diff whether there's a disk in it or not. The dvd-rw is ok. The rom drive is on /dev/sr1 the rw on /dev/sr0.

Code:
60-cdrom_id.rules

do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="cdrom_end" SUBSYSTEM!="block", GOTO="cdrom_end" KERNEL!="sr[0-9]|xvd", GOTO="cdrom_end" ENV{DEVTYPE}!="disk", GOTO="cdrom_end"

unconditionally tag device as CDROM

KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"

media eject button pressed

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

import device and media properties and lock tray to

enable the receiving of media eject button events

IMPORT{program}="cdrom_id --lock-media $devnode"

KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"

LABEL="cdrom_end"

How can I fix this? I browsed the Gentoo udev guide + the 2 links at the bottom but they're totally obsolete. I've never written udev rules and am no coder. Any help will be much appreciated. Gerard.

Comments (3)

  1. braindamaged repo owner

    Hi, gerard.

    I'd really like to confirm this with someone else first. Could you please try to check this issue on another machine? Also, try checking the cable and the power supply. Looks like you drive is being disconnected with you push the button.

    Neither me nor consus have an access to a cdrom drive at the moment (yeah, we live in 2012 :)).

    p.s. attaching dmesg output would be also great ;)

  2. gerard82 reporter

    This is in answer of your request in the Gentoo forums thread. Here's the 60-cdrom_id.rules that I used:

    do not edit this file, it will be overwritten on update

    ACTION=="remove", GOTO="cdrom_end" SUBSYSTEM!="block", GOTO="cdrom_end" KERNEL!="sr[0-9]|xvd", GOTO="cdrom_end" ENV{DEVTYPE}!="disk", GOTO="cdrom_end"

    this is only a button press event

    ENV{DISK_EJECT_REQUEST}=="?*", GOTO="cdrom_end"

    KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" IMPORT{program}="cdrom_id $tempnode"

    LABEL="cdrom_end" I first added 70-persistent-cdrom.rules but it's not needed. With this setup both optical drives work fine. Note:There's no more /dev/Victor Garcia anymore but I don't care. Gerard.

  3. Log in to comment