CDROM drive eject disc after randomly seconds of use

Bug #47516 reported by Stéphane Grimal
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When I insert a disc (data,music) in my cdrom drive.
The Dapper eject disc during listening. After, the cdrom drive no mount correctly.
I have default automount parameters in my Ubuntu.
For exemple, I can't listening music more 30 seconds after sound juicer has launched.

description: updated
Revision history for this message
Vassilis Pandis (pandisv) wrote :

Are there any relevant message sin /var/log/messages ? Can you please attach the dmesg output? What's your drive's brand/model ? Thanks.

Revision history for this message
Draconid (draconid) wrote :

I am also having this problem. The drive in question is a Matsusushi CD-RW and is the second drive on the IDE cable (the first is a DVD-ROM drive). I'm afraid I don't have any more information about it right now as I'm not using the machine in question.

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Does it happen with other OS? It could be a lens problem... it might need cleaning - this is known to cause such behaviour ...

Revision history for this message
Draconid (draconid) wrote :

I've had no problems with other OS' and have even managed to run Live distros off this drive.

This seems to be a problem that has been popping up in various places so I think it's unlikely to be a dirty lens problem

For reference, here's a link to a forum thread where a few people have the same problem: http://www.ubuntuforums.org/showthread.php?p=1123011

I've confirmed that the drive is a Mitsumi CR-4804TE if this helps at all.

Thanks.

Revision history for this message
Draconid (draconid) wrote :

I've just tried this using different Live Distros (running from my DVD drive) and have done a fresh install of Dapper.

SimplyMephis: audios CDs play fine
Breezy Live CD: audios CDs play fine
Dapper Live CD: audios CDs play fine
Dapper fresh install (no updates, no config, nothing): audio CDs eject after a few seconds of play
Dapper up-to-date install: audio CDs eject after a few seconds of play

Not sure if this will help, but here's some information on the CD drive from various files... I've used "=====" to indicate the seperation between two files.

uname -a

Linux quasar 2.6.15-25-386 #1 PREEMPT Wed Jun 14 11:25:49 UTC 2006 i686 GNU/Linux
=========

/proc/ide/hdd/capacity

0
=======
/proc/ide/hdd/driver

ide-cdrom version 4.61
=======
/proc/ide/hdd/identify

85c0 0000 0000 0000 0000 0000 0000 0000
0000 0000 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 0002 0000 0000 332e
3044 2020 2020 4352 2d34 3830 3454 4520
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 0000
0000 0f00 0000 0300 0100 0002 0000 0000
0000 0000 0000 0000 0000 0000 0003 0203
0001 00b4 00b4 00f0 00b4 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
=======
/proc/ide/hdd/media

cdrom
=======
/proc/ide/hdd/model

CR-4804TE
=======
/proc/ide/hdd/settings

name value min max mode
---- ----- --- --- ----
current_speed 33 0 70 rw
dsc_overlap 1 0 1 rw
init_speed 11 0 70 rw
io_32bit 1 0 3 rw
keepsettings 0 0 1 rw
nice1 1 0 1 rw
number 3 0 3 rw
pio_mode write-only 0 255 w
unmaskirq 1 0 1 rw
using_dma 1 0 1 rw
=======

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Ok, thanks for the info. I have found people with similar problems here, although it may be totally irrelevant: http://www.linuxquestions.org/questions/showthread.php?s=&postid=1106630#post1106630

Try stopping X and dropping to a console and see if the problem happens there as well...

Are there any errors when trying to remount after the disk has been ejected? In any case, can you please attach the output of 'dmesg' when the problem occurs?

Thanks for taking the time to go through this!

Revision history for this message
Vassilis Pandis (pandisv) wrote :

I just noticed a very very weird thing about your comment. You said the bug manifests itself in the LiveCD, but not after a fresh installation of Dapper! I take it that you are using the same desktop environment in the LiveCD as in the fresh install, and that you installed from the LiveCD?

Revision history for this message
Draconid (draconid) wrote :

I've made some progress and got a CD to play... here's what I did:

tail -f /var/log/messages gives the following just after cd is ejected:
"Jun 20 17:52:22 localhost kernel: [17179920.660000] cdrom: dropping to single frame dma"

dmesg also reports:
"[17179920.660000] cdrom: dropping to single frame dma"

I tried disabling dma on the device (hdparm -d0 /dev/hdd) but I still got the same message in /var/log/messages and dmesg and the CD still ejects under gnome.

As requested, I dropped down to a console and stopped gdm/X. I attempted to play an audio cd with a console based cd player (cdcd) and was able to play the cd without issues.

So it looks like an X/gnome issue.

I therefore restarted X. I figured I'd have a go at eliminating possibilities so I issued a "killall gnome-volume-manager" and tried playing the audio cd again. Naturally since gvm wasn't there to autostart it, I had to start sound-juicer manually, but I was then able to play the CD without problems.

Interestingly the cd still showed up on the desktop as usual (guessing it's nautilus at work). So the issue is definitely gnome related and seems to be related to (if not caused by) gnome-volume-manager. Obviously, killall is not a good long term solution though :)

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Seems that indeed, it probably belongs to g-v-m... Really well done, seems like you solved the hard part. I'll take a look at this ASAP (exams pending). Thanks again!

Changed in gnome-volume-manager:
status: Needs Info → Unconfirmed
Revision history for this message
SteveH (steveharris) wrote :

This is a "squeaky wheel gets the grease" posting, with a bit more info. I also get the "dropping to single dma" msg, with an error number (I assume) of 883.997589. Maybe that will tell you where it's being issued. I tried Draconid's trick, killed gvm, and viola! played my audio cd's. Just to see what would happen, in the middle of a cd I entered "gnome-volume-manager" in a terminal session to start gvm up again, and in about 30 seconds, the cd was ejected and the music stopped.

I just created my Ubuntu 6.10 install cd this week, so the bug is still there. I'm new to Ubuntu, and to Linux, so may be missing something somewhere. But as Draconid said, killing gvm isn't a viable solution in the long term.

It was quite nice to find this thread out there that nailed my problem. Thanks for what all of you in the thread (and perhaps behind the scene) have already put into this.

Revision history for this message
Felix Miata (mrmazda) wrote :

I use Kubuntu Feisty, so gnome-volume-manager is not my problem. However, the symptoms are exactly the same as the subject line. Behavior is the same whether I use KsCD or MPlayer. If I log out and stop kdm, then do 'mplayer cdda://', the CD plays with many interruptions, but keeps trying and does not eject. 'dmesg | tail' shows repeated errors: packet command, sense_key, and failed opcode was: unknown.

Here's a copy of my mailing list post that generated no useful help:
Windoz Media Player works fine, so it isn't the hardware, or the CD, at fault.

I removed both Kaffeine and Amarok after discovering after a fresh Feisty install (that required ide=nodma and irqpoll to do) to replace Breezy that I couldn't play a music CD. I have only KsCD, MPlayer, KMix, and RealPlayer installed for multimedia. KsCD will start to play the CD just fine, but within a minute the CD gets ejected. Dmesg tail is:
[ 84.164562] Bluetooth: RFCOMM ver 1.8
[ 145.852734] hda: DMA disabled
[ 155.273768] hdd: DMA disabled
[ 6181.844233] cdrom: dropping to single frame dma

Without DMA disabled on hdd CD the whole system turns to nearly frozen molasses when a music CD is inserted.

Starting KsCD from Konsole outputs the following:
# kscd
X Error: BadDevice, invalid or uninitialized input device 167
Major opcode: 144
Minor opcode: 3
Resource id: 0x0
Failed to open device
QWidget::setProperty( "text", value ) failed: property invalid, read-only or does not exist
# cdda: wmcdda_read failed, stop playing

AFAIK, the first errors above are from the CD not being in the closed drive drawer long enough before starting KsCD.

MPlayer also halts due to spurious CD ejection. Starting mplayer from Konsole produces:
# mplayer cdda://
MPlayer 2:1.0~rc1-0ubuntu9.1 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing cdda://.
Found audio CD with 10 tracks.
rawaudio file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
Track 1
A: 9.0 (08.9) of 2288.7 (38:08.7) 89.5%

Chipset is 440BX. 320M RAM. CD is Mitsumi 32X hdd slaved to antique WD 4GB on hdc where Feisty lives. Sound is PCI CS4281.

Revision history for this message
András Péteri (apeteri) wrote :
Download full text (3.9 KiB)

I've got a Mitsumi SR243T 24x CD-ROM drive, and each time I put in a disc, be it audio or data, the disc gets ejected after a certain (random) amount of time. It doesn't matter if something is read from the disc, or if the disc is idle. There are some situations where the volume can't get unmounted, because some file is still open; in these cases I get a pop-up message from Nautilus, and the disc stays in the drive. However, listening to audio CDs, or grabbing them using sound-juicer is nearly impossible, because after a few tracks the drive ejects the disc unexpectedly. If I kill hald-addon-storage responsible for polling the device, and mount everything manually, the problem disappears for data CDs, but then sound-juicer doesn't find any available CD-ROM devices.

I modified addon-storage.c to output detailed response buffer information at the part where the eject button press is checked (see attached patch). Then restarted hald, adding "--daemon=no --verbose=yes" to the command line. According to the output of hald, it seems that the drive responds to the "get event/status notification" command with various event/status notification responses which are unrelated to the original "Media" event type. As you can see from the hald log snippet below, the responses don't have the notification class field set as 4 (Media). (I used the SCSI MMC-3 working draft from www.t10.org as a guide to find out what the bytes in the response buffer mean.) However, they still contain 0x01 on the lower 4 bits of byte 4 of the buffer (didn't check this explicitly, but since we are inside an 'if' block which checks for this condition, I assume this is the case), and therefore are treated as an eject request.

Using Ubuntu Hardy Alpha with hal version 0.5.10.

--------8<-------------------------------

--- data CD

19:07:24.249 [I] device.c:1836: Removing locks from ':1.63'
[2295]: 19:12:05.938 [D] addon-storage.c:462: emitting condition 'EjectPressed' for /dev/scd0
[2295]: 19:12:05.938 [D] addon-storage.c:468: NEA: 0, Notification Class: 0, Supported Event Classes: 0
19:12:05.938 [D] hald_dbus.c:3072: udi=/org/freedesktop/Hal/devices/storage_model_CD_ROM_SR243T
[2295]: 19:12:07.936 [I] addon-storage.c:346: Checking whether device /dev/scd0 is locked on HAL
[2295]: 19:12:07.937 [I] addon-storage.c:354: ... device /dev/scd0 is not locked on HAL
19:12:24.622 [I] device.c:1836: Removing locks from ':1.64'
[2295]: 19:15:11.972 [D] addon-storage.c:462: emitting condition 'EjectPressed' for /dev/scd0
[2295]: 19:15:11.972 [D] addon-storage.c:468: NEA: 0, Notification Class: 2, Supported Event Classes: 0
19:15:11.973 [D] hald_dbus.c:3072: udi=/org/freedesktop/Hal/devices/storage_model_CD_ROM_SR243T
[2295]: 19:15:13.968 [I] addon-storage.c:346: Checking whether device /dev/scd0 is locked on HAL
[2295]: 19:15:13.969 [I] addon-storage.c:354: ... device /dev/scd0 is not locked on HAL
19:15:32.541 [I] device.c:1836: Removing locks from ':1.65'

--- audio CD

[2295]: 19:52:30.980 [I] addon-storage.c:346: Checking whether device /dev/scd0 is locked on HAL
[2295]: 19:52:30.981 [I] addon-storage.c:354: ... device /dev/scd0 is not locked on HAL
[2295]: 19:53:37.432 [I] addon-storage...

Read more...

Revision history for this message
Henri Sivonen (hsivonen) wrote :

Also seen on Gutsy x86 with a Mitsumi CD drive.

Revision history for this message
Henri Sivonen (hsivonen) wrote :

Marking confirmed based on own experience and comment #12 seems to have sufficient data on how to verify the existence of the bug.

Changed in gnome-volume-manager:
status: New → Confirmed
Revision history for this message
jiggles100 (jiggles) wrote :

I believe this bug may also affect the blu-ray drive on ps3.

Revision history for this message
c49 (c49) wrote :

I have similar or same bug. Cdrom ejects i random time amounts, usually every 2-3 hours, even if its empty.
Ubuntu 9.04, default settings.

Revision history for this message
Sebastien Bacher (seb128) wrote :

unsubscribing the review team, this bug didn't recent comments and hal is deprecated now and not running in lucid by default so it's not likely the change will solve issues there

Revision history for this message
dino99 (9d9) wrote :
Changed in hal (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Henri Sivonen (hsivonen) wrote :

FWIW, I've seen this happen on affected ancient Fujitsu hardware with Ubuntu 12.04 still.

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

Other bug subscribers

Remote bug watches

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