eject -i no longer works

Bug #885051 reported by fz
68
This bug affects 12 people
Affects Status Importance Assigned to Milestone
eject (Ubuntu)
Confirmed
Undecided
Unassigned
udev (Ubuntu)
New
Undecided
Unassigned

Bug Description

I used to run eject -i 1 to lock my cd-rom, but it stopped working after upgrading to 11.10.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: eject 2.1.5+deb1+cvs20081104-8
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Nov 1 23:26:38 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: eject
UpgradeStatus: Upgraded to oneiric on 2011-11-02 (0 days ago)

Revision history for this message
fz (fz0002) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eject (Ubuntu):
status: New → Confirmed
Revision history for this message
Akshay Bhat (nodeax-deactivatedaccount) wrote :

Problem is present in Ubuntu 12.04 release.
uname -a
Linux Sweet 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Roshni (trinityrosh) wrote :

Am facing the same bug on Ubuntu 11.10 with a Thinkpad 400 laptop

Revision history for this message
Manuel Tondeur (sinekonata) wrote :

$ eject -i 1
CD-Drive may NOT be ejected with device button

and yet it can...

I recently upgraded this laptop to12.04, it doesn't work either on my desktop computer that still is with 11.10.

Revision history for this message
GonzO (gonzo) wrote :

WORKAROUND (found on http://chakra-project.org/bbs/viewtopic.php?id=7513 , to give credit where its due):

There is a UDEV rule that prevents "eject -i" from working. The following method helps it to get working again, but I have *no* real idea why.

1. open "/lib/udev/rules.d/60-cdrom_id.rules" for editing

2. comment out (using the "#" symbol) the following line:

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

3. If you don't feel like rebooting, reload the UDEV rules with

          sudo udevadm control --reload-rules

Now locking with "eject -i 1" or "eject -i on" should work. I can confirm this to be the case on my Thinkpad w510.

Ken Sharp (kennybobs)
tags: added: natty precise
summary: - eject stop working
+ eject -i no longer works
Revision history for this message
Thomas (t.c) wrote :

thanks for workaround (which works) - but it would be better when eject -i run out of the box :)

I wanted to prevent my children from opening my media pcs drive :)

Revision history for this message
Thomas (t.c) wrote :

if is not possible to query first the locked state with eject -i and if locked dont eject in the udev rule?
i know it require eject as a additional dependency, but it will be nice.

other approach is to give users a other way with udev to prevent cdrom eject...

Revision history for this message
Harshal Yanpallewar (yharshal) wrote :

It's still there in ubuntu 18.04 LTS. I'm using ubuntu with windows 10. cd drive keeps ejecting. so irritating.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.