LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-02-2012, 03:24 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,470

Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
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.

Last edited by Woodsman; 09-02-2012 at 03:45 PM.
 
Old 09-02-2012, 10:00 PM   #2
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 433

Rep: Reputation: Disabled
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?
 
Old 09-02-2012, 10:11 PM   #3
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,119

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
Things are okay here as well.
 
Old 09-03-2012, 09:18 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
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.
 
Old 09-03-2012, 12:24 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,470

Original Poster
Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
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.
 
Old 09-03-2012, 03:08 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,470

Original Poster
Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
I found a patch that resolves the "eject -T" problem:

https://bugs.launchpad.net/ubuntu/+s...ect/+bug/91873

Direct link:

https://bugs.launchpad.net/ubuntu/+s..._for_mac.patch

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.
 
Old 09-05-2012, 12:01 PM   #7
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
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.
 
Old 09-05-2012, 01:28 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,470

Original Poster
Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
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.
 
Old 09-05-2012, 02:06 PM   #9
Marcelo_Belfalas
LQ Newbie
 
Registered: Apr 2012
Location: Brazil
Distribution: Slackware64-current multilib
Posts: 23

Rep: Reputation: 10
From last changelog

Quote:
Tue Sep 4 21:54:46 UTC 2012
a/eject-2.1.5-i486-3.txz: Rebuilt.
Fixed "eject -T". Thanks to Darrell Anderson.
 
Old 09-14-2012, 05:36 PM   #10
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0
Posts: 3,470

Original Poster
Rep: Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519Reputation: 519
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.

Thanks.
 
Old 09-14-2012, 06:58 PM   #11
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,493

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Both eject and eject -T works here, no problems
 
Old 09-16-2012, 05:17 AM   #12
BlackRider
Member
 
Registered: Aug 2011
Distribution: Slackware
Posts: 261

Rep: Reputation: 82
May I reopen this bug ticket?

I am running Slackware 14 RC4 x86_64.

My user is member of the following groups:

Code:
lp
floppy
audio
video
cdrom
plugdev
power
netdev
users
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.
Code:
$ 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.

Last edited by BlackRider; 09-16-2012 at 05:19 AM.
 
Old 09-16-2012, 06:43 AM   #13
BlackRider
Member
 
Registered: Aug 2011
Distribution: Slackware
Posts: 261

Rep: Reputation: 82
For what is worth, here is a strace record:

Code:
(I put a CD on the tray and close it manually)
$ strace eject -T 2> eject_strace.txt
The output is here:
Attached Files
File Type: txt eject_strace.txt (9.4 KB, 10 views)
 
Old 09-16-2012, 10:18 AM   #14
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,378

Rep: Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824
Results of testing with my hardware
Code:
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.

Last edited by allend; 09-16-2012 at 10:43 AM. Reason: Trying to create a readable table
 
Old 09-16-2012, 12:44 PM   #15
BlackRider
Member
 
Registered: Aug 2011
Distribution: Slackware
Posts: 261

Rep: Reputation: 82
Lightbulb

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!)
 
  


Reply

Tags
cd, dvd, eject, udev


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eject CD/DVD Media using Eject Button - Hal/Udev help v00d00101 Linux - Hardware 4 03-17-2008 03:04 PM
Udev and eject problems with Ipod arubin Slackware 3 05-18-2007 02:19 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
Cannot eject CD in Slackware 10 pcd007 Linux - Newbie 11 10-01-2004 11:25 PM


All times are GMT -5. The time now is 07:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration