eject -X sets speed to maximum

Bug #136971 reported by Ralph Corderoy on 2007-09-03
Affects Status Importance Assigned to Milestone
eject (Ubuntu)

Bug Description

Binary package hint: eject

`eject -x 0' sets the speed to maximum. `eject -X' is meant to list the available speeds. However, it also leaves the speed set to maximum. This can cause problems if you've deliberately set it to a low speed, list the available speeds, and then burn a CD; you're burning on the maximum speed without realising. It's apparent from the source that the bug exists; ListSpeedCdrom() sets the speed to maximum in order to find out the limit for the loop which tries speed 1, 2, 3, etc., in turn.

Either eject(1) needs altering to match reality or, really the correct solution, eject needs to restore the current speed after setting it to all the possible ones with a warning in the manual that it changes the speed and an interrupted eject may leave the speed at a random setting.

Setting to Confirmed because I think the bug is apparent from the source.

Changed in eject:
status: New → Confirmed

This looks pretty straightforward. Here's a debdiff which saves, then restores the CD-ROM speed. It'll print an error if it can't restore it.

My CD drive doesn't support multiple speeds, so you'll have to let me know if this works. (It doesn't make it *stop* working on mine, at least.) Attached find a debdiff; I'll have a test package uploaded to my PPA shortly.

Changed in eject:
status: Confirmed → In Progress

The fixed package is uploaded to my PPA; let me know if you have any trouble installing or using it.


Information on how to use PPAs is here:


Thank you in advance for testing, and please let me know what you think.

Did this patch fix your issue? I'd like to submit it upstream if you can confirm it working.

Adam, https://help.launchpad.net/Packaging/PPA/InstallingSoftware isn't clear whether as a 8.04/Hardy user I can use an 8.10/Intrepid PPA. Do you know?

9.10 still has this bug. I've downgraded 9.10's eject package to Adam's
PPA and, with the -v option, it shows it saving and restoring the speed
set at the start of the -X processing. The patch also looks sane and
correct. Adam, let me know if this isn't sufficient for you to submit
upstream. Thanks for the fix.

Nigel Babu (nigelbabu) wrote :

If you could provide an updated patch for this bug, it would be great.

tags: added: patch-needswork

The actual code patch isn't any different; I pasted it into a temporary file and applied it with 'patch'; the changes to the Debian control and changelog files were what needed to be updated. Attached find a debdiff against Lucid.

tags: added: patch
removed: patch-needswork

Additionally, a version for Lucid with that patch applied is now in my PPA. Ralph, thanks for letting me know the patch is good; I'll send it upstream shortly.

Changed in eject (Ubuntu):
status: In Progress → Confirmed
Nigel Babu (nigelbabu) wrote :

Any news on this? Have you been able to send this upstream?

Nicolas DERIVE (kalon33) wrote :

Fixed in latest Debian Unstable package, now synced into oneiric. Will be in next release !

eject (2.1.5+deb1+cvs20081104-8) unstable; urgency=low

  * Bump Standards-Version to 3.9.1:
    - Use kfreebsd-any in Build-Depends
  * Convert debian/rules to use dh
  * Apply patch to avoid -X side-effects by Adam Buchbinder.
    Fixes Ubuntu bug #136971
  * Import openSUSE patches by Anna Bernáthová:
    - use CDROM_DRIVE_STATUS in toggle (bnc#374526)
    - check host_status and driver_status when using SG_IO (bnc#358033)

  * Program translations:
    - Slovenian (Andrej Znidarsic). Closes: #603674
    - Portuguese (Américo Monteiro). Closes: #567898

 -- Frank Lichtenheld <email address hidden> Sat, 19 Feb 2011 19:47:14 +0100

Changed in eject (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers