-   Slackware (
-   -   Slackware 14, udev, eject (

Woodsman 09-02-2012 04:24 PM

Slackware 14, udev, eject
Anybody experiencing problems ejecting optical disks under 14?

I find a few relatively recent reports on the web about the problem. Seems there are a handle of eject-2.1.5 patches floating around too.

Thanks. :)

Edit: Non root user is a member of disk lp wheel floppy audio video cdrom plugdev power scanner groups. But root can't eject either from the command line until after the drive's eject button is used to eject the disk. Then the eject command works for everybody.

TommyC7 09-02-2012 11:00 PM

I've experienced no problems with eject both manually (pushing the button on the computer) and just typing "eject" as a user within the correct groups. Perhaps it's something else?

hitest 09-02-2012 11:11 PM

Things are okay here as well.

GazL 09-03-2012 10:18 AM

I had a problem this morning. eject command wasn't working from my non-root user but was working ok from root. I rebooted and tried again and it was working again from my non-root user, so it looks like somehow it got itself in a bit of a state.

Really don't like the idea of having to reboot it because it got confused. That's far too reminiscent of the bad old days of MS Windows. :(

Woodsman 09-03-2012 01:24 PM

This is starting to look like two separate problems.

First, does "eject -T dvd" work?

1. Without inserting a disk, test "eject -T dvd" several times. The tray should open or close each time.
2. Insert an optical disk.
3. Do not mount the disk.
4. From a terminal, enter "eject -T dvd".
5. Test this as root and non-root.

Second, what triggers /lib/udev/rules.d/75-cd-aliases-generator.rules? In my Slackware 14 run-time testing environment, the rule set seems to be executing correctly to generate a full slew of /dev/dvd* sym links. In my Slackware 14 build environment, I never get any /dev/dvd* sym links. I have reinstalled the udev package and rebooted several times. No sym links in the build environment.

Woodsman 09-03-2012 04:08 PM

I found a patch that resolves the "eject -T" problem:

Direct link:

The patch works.

The "eject -T" problem occurs in Slackware 14. I can't replicate in 13.1. I did not test in 13.37.

I forwarded the same information to Pat. :)

Still haven't figured out the loss of the /dev/dvd* sym links. :(

sahko 09-05-2012 01:01 PM

Arch Linux just switched to using eject from util-linux. Maybe Slackware could do the same. Im not sure if command line options are the same.

Woodsman 09-05-2012 02:28 PM

I suspect when work begins on Current after Slackware 14 is released that util-linux will be updated to 2.22, which includes the latest eject and the old eject package will be removed.

Then again, who knows? He might make the change in Slackware 14 RC5. :)

Pat tends to follow the discussions in this forum so hopefully he reads this news. :)

Marcelo_Belfalas 09-05-2012 03:06 PM

From last changelog


Tue Sep 4 21:54:46 UTC 2012
a/eject-2.1.5-i486-3.txz: Rebuilt.
Fixed "eject -T". Thanks to Darrell Anderson.

Woodsman 09-14-2012 06:36 PM

I'll use this thread to ask some additional eject related questions.

With some third party software I help support (Trinity Desktop Environment) I have to chmod the eject command suid. Thereafter the eject command works as expected by non-root users.

Does this sound normal? Did HAL or udev previously do something special that provided the equivalent permissions? I don't recall eject being suid in previous Slackware releases.


willysr 09-14-2012 07:58 PM

Both eject and eject -T works here, no problems

BlackRider 09-16-2012 06:17 AM

May I reopen this bug ticket?

I am running Slackware 14 RC4 x86_64.

My user is member of the following groups:



Closing and opening the empty tray with "eject -T /device" works as expected.

Loading a DVD in the tray, closing it and trying to open it as my regular user with any form of eject fails.

$ eject -T
(Nothing happens)
$ eject -T /dev/sr0
(Nothing happens)
$ eject -v /dev/sr0
(I have translated the output to english)
eject: the name of the device is /dev/sr0
eject: the extended name is `/dev/sr0'
eject: `/dev/sr0' is not mounted
eject: `/dev/sr0' is not a mount point
eject: `/dev/sr0' is not a device with multiple partitions.
eject: trying to eject `/dev/sr0' using the eject command for CD-ROM
eject: eject command for CD-ROM failed
eject: trying to eject `/dev/sr0' using the eject command for SCSI
eject: eject command for SCSI failed.
eject: trying to eject `/dev/sr0' using the eject command for floppies
eject: eject command for floppies failed.
eject: trying to eject `/dev/sr0' using the eject command for tapes
eject: eject command for tapes failed.
eject: unable to eject, last error: ioctl function not adecuate for the device.

The root user has no problems.

Manual ejecting works as expected (pressing the physical button).

No worthy output is taken from dmesg or /var/messages.

BlackRider 09-16-2012 07:43 AM

1 Attachment(s)
For what is worth, here is a strace record:


(I put a CD on the tray and close it manually)
$ strace eject -T 2> eject_strace.txt

The output is here:

allend 09-16-2012 11:18 AM

Results of testing with my hardware

Disk_in_Drive        User=root        Drive_open        Load_with_'eject -T'        Open_with_eject        Comment
Yes        Yes        Yes        Yes        Yes        As expected
No        Yes        Yes        Yes        Yes        As expected
Yes        No        Yes        Yes        No: error is ‘eject:: unable to eject, last error: Inappropriate ioctl for device’        Unable to eject
No        No        Yes        Yes        Yes        As expected
Disk_in_Drive        User=root        Drive_open        Open_with_eject        Load_with_'eject -T'        Comment       
Yes        Yes        No        Yes        Yes        As expected
No        Yes        No        Yes        Yes        As expected
Yes        No        No        No: error is ‘eject: unable to eject, last error: Inappropriate ioctl for device’        Cannot test        Unable to eject
No        No        No        Yes        Yes        As expected

My conclusion is that there is a problem with permissions somewhere.

BlackRider 09-16-2012 01:44 PM

It seems it is fault of udev. Killing udevd makes eject work as expected.

I have tested by:

Killing udevd.
Opening the tray with eject -T as regular user.
Placing a DVD on the tray.
Closing the tray with eject -T
Mounting the DVD on /mnt as root.
Trying eject -T as regular user (it fails because a regular user cannot umount the filesystem)
Umount the DVD as root.
Eject as regular user with eject -T (it works!)

All times are GMT -5. The time now is 11:33 AM.