Linux Eject not working
#16
As per what says here https://wiki.archlinux.org/index.php/Udev

Quote:Udev rules written by the administrator go in /etc/udev/rules.d/, their file name has to end with .rules. The udev rules shipped with various packages are found in /usr/lib/udev/rules.d/. If there are two files by the same name under /usr/lib and /etc, the ones in /etc take precedence.

The point is after updating udev changes would be lost, so if you delete the original file it will be recreated by installer I think.

But yes any rules in etc should work just fine after they are loaded.

Not an expert on Udev anyway you asked about the warning and the reply is valid, how to get the /etc/ rule working properly and overrifing the original Im not 100% sure. What Im sure about is it needs to be in /etc in order not to get modified on udev upgrade.

uNi
Reply
#17
OK this seems to work now

In the /lib/udev/rules.d I amended the 60-cdrom_id.rules file back to how it was originally.

Then in the /etc/udev/rules.d folder I created a new 60-cdrom_id.rules file with the needed amendment.

Now after a reboot eject is working, so it must be using the 60-cdrom_id.rules file in the /etc/udev/rules.d folder.

Maybe it didn't like being named 100 and it has to be named 60 to come before the 70-persistent-cd.rules file just a guess? But it seems to be working now.

Thanks
Reply
#18
OK just to recap if anyone is following this later.

Don't edit the 60-cdrom_id.rules file in the /lib/udev/rules.d folder.

Instead create a new 60-cdrom_id.rules file in the /etc/udev/rules.d folder

with this content:

Code:
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 $tempnode", GOTO="c$

# import device and media properties and lock tray to
# enable the receiving of media eject button events
IMPORT{program}="cdrom_id $tempnode"

LABEL="cdrom_end"

Reboot and eject should start working.

Now to figure out how to get an eject button in the Aeon MQ4 UI.
Reply
#19
Information 
Here it is a one liner fix for this.

Code:
sudo wget https://gist.github.com/uNiversaI/9290192/raw -O /etc/udev/rules.d/60-cdrom_id.rules

Reboot and done!
Reply
#20
(2014-03-01, 16:28)uNiversal Wrote: Here it is a one liner fix for this.

Code:
sudo wget https://gist.github.com/uNiversaI/9290192/raw -O /etc/udev/rules.d/60-cdrom_id.rules

Reboot and done!

Sorry, downloading that file doen't work for me on Ubuntu 13.10 and XBMC 12.3.
Mac Mini 2009 (Intel Core 2 Duo - nVidia 9400M), Ubuntu Linux 14.04, Kodi 15.1
Reply
#21
(2014-03-01, 16:28)uNiversal Wrote: Here it is a one liner fix for this.

Code:
sudo wget https://gist.github.com/uNiversaI/9290192/raw -O /etc/udev/rules.d/60-cdrom_id.rules

Reboot and done!
People never ever do this unless you really trust the poster, and you are sure that the source hasn't been randomly hacked by someone who is not the poster.

You are far better to download the file to your home directory, read it to make sure it isn't deleting your entire hard drive or pwning your machine to foreign hackers, then putting the file in the appropriate place in your filesystem.

No aspersions at all on uNiversal, but do be careful about randomly downloading files as root and sticking them in critical parts of your filesystem!
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#22
This is opensource, Not EVILSOURCE --- so you and anyone can check that indeed its doesn't do anything evil Wink

1) This file is on my gist, cannot be modified by anyone except me.
2) My gits are visible to the world and writable only by me, a link to this one is https://gist.github.com/uNiversaI/9290192 and you can see that indeed there is no evil things being done as per nickr WARNINGS...

At time of writing this the contents of that gist are EXACTLY what it says above and will not change as they dont need to change.

@el_Salmon

Create the file manually then, It works for me, Ive tested it numerous times on a few machines.
Reply
#23
As I said, no aspersions on you, it is a warning to people about doing this in general. And I stand by the warning.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#24
Yes its a good warning in general, just in this case, the lack of any real additional educational and helpful comment to the "warning" I find it unhelpful.
Reply
#25
(2014-04-14, 11:56)uNiversal Wrote: This is opensource, Not EVILSOURCE --- so you and anyone can check that indeed its doesn't do anything evil Wink

1) This file is on my gist, cannot be modified by anyone except me.
2) My gits are visible to the world and writable only by me, a link to this one is https://gist.github.com/uNiversaI/9290192 and you can see that indeed there is no evil things being done as per nickr WARNINGS...

At time of writing this the contents of that gist are EXACTLY what it says above and will not change as they dont need to change.

@el_Salmon

Create the file manually then, It works for me, Ive tested it numerous times on a few machines.
I trust in you Smile Creating the file manually works fine. Thank very much!
Mac Mini 2009 (Intel Core 2 Duo - nVidia 9400M), Ubuntu Linux 14.04, Kodi 15.1
Reply
#26
Hi all,

i have a problem with auto eject after ripping audio cd.
I looked over this thread but non of advises shown here doesn't work.
I'm running latest XBMCbuntu with xbmc version 13.2.
Eject works when i select eject/load button on screen.
I would like to use my xbmc installation as audio ripper but without the screen, it would be for Sonos, no movies or series on it.

Thanks
Reply
#27
Well, after i brought laptop from home to work auto eject works now after ripping, go figure.
Reply

Logout Mark Read Team Forum Stats Members Help
Eject not working0