2001-03-05 17:30:18

by L A Walsh

[permalink] [raw]
Subject: Annoying CD-rom driver error messages

I have a music play program (freeamp) playing MP3's running. It has the
feature in that it scans to see if a CD is in the drive and tries to look it up
in CDDB. Well, I don't have a CD in the drive -- I have a DVD-ROM with UDF file
system on it. Freeamp doesn't complain, but in my syslog/warnings file, every 5 seconds
I get:

Mar 5 09:17:00 xena kernel: hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
Mar 5 09:17:00 xena kernel: hdc: packet command error: error=0x50
Mar 5 09:17:00 xena kernel: ATAPI device hdc:
Mar 5 09:17:00 xena kernel: Error: Illegal request -- (Sense key=0x05)
Mar 5 09:17:00 xena kernel: Cannot read medium - incompatible format -- (asc=0x30, ascq=0x02)
Mar 5 09:17:00 xena kernel: The failed "Read Subchannel" packet command was:
Mar 5 09:17:00 xena kernel: "42 02 40 01 00 00 00 00 10 00 00 00 "
----
Needless to say, this fills up messages/warnings fairly quickly. If there's no
DVD in the drive or if there is a CD in the drive, I don't notice this problem.

Seems like a undesirable feature for the kernel to write out 7-line error messages
everytime a program polls for a CD and fails. Is there a way to disable this when I
have a DVD ROM disk in the drive? (vanilla 2.4.2 kernel).

Thanks...
-l


--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338


2001-03-05 17:39:48

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages


Slightly less annoying -- when no CD is in the drive, I'm getting:

Mar 5 09:30:42 xena kernel: VFS: Disk change detected on device ide1(22,0)
Mar 5 09:31:17 xena last message repeated 7 times
Mar 5 09:32:18 xena last message repeated 12 times
Mar 5 09:33:23 xena last message repeated 13 times
Mar 5 09:34:24 xena last message repeated 12 times

(22,0 = /dev/hdc,cdrom)

Perturbing.

-l

2001-03-05 17:45:19

by Alan

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

> Slightly less annoying -- when no CD is in the drive, I'm getting:
>
> Mar 5 09:30:42 xena kernel: VFS: Disk change detected on device ide1(22,0)
> Mar 5 09:31:17 xena last message repeated 7 times
> Mar 5 09:32:18 xena last message repeated 12 times
> Mar 5 09:33:23 xena last message repeated 13 times
> Mar 5 09:34:24 xena last message repeated 12 times

rpm -e magicdev (or equivalentpackagemanager delete magicdev)

this isnt a kernel problem, its a _very_ stupid app

2001-03-05 17:51:08

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

> this isnt a kernel problem, its a _very_ stupid app
---
Must be more than one stupid app...

xena:/var/log# rpm -q magicdev
package magicdev is not installed
xena:/var/log# locate magicdev
xena:/var/log#
xena:/var/log# rpm -qa |grep -i magic
ImageMagick-5.2.6-4



--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-05 17:53:08

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

LA Walsh wrote:
>
> > this isnt a kernel problem, its a _very_ stupid app
> ---
> Must be more than one stupid app...
>
> xena:/var/log# rpm -q magicdev
> package magicdev is not installed
> xena:/var/log# locate magicdev
> xena:/var/log#
> xena:/var/log# rpm -qa |grep -i magic
> ImageMagick-5.2.6-4
-------

Maybe the stupid app is 'freeamp'? It only happens when I run it...:-(


--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-05 17:57:28

by Jens Axboe

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

On Mon, Mar 05 2001, LA Walsh wrote:
> > > this isnt a kernel problem, its a _very_ stupid app
> > ---
> > Must be more than one stupid app...
> >
> > xena:/var/log# rpm -q magicdev
> > package magicdev is not installed
> > xena:/var/log# locate magicdev
> > xena:/var/log#
> > xena:/var/log# rpm -qa |grep -i magic
> > ImageMagick-5.2.6-4
> -------
>
> Maybe the stupid app is 'freeamp'? It only happens when I run it...:-(

Yep, it's a stupid app if it does CDROMSUBCHNL regardless of the
media type.

--
Jens Axboe

2001-03-05 18:10:41

by Alan

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

> > this isnt a kernel problem, its a _very_ stupid app
> ---
> Must be more than one stupid app...

Could well be. You have something continually trying to open your cdrom and
see if there is media in it

2001-03-05 18:18:21

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

Alan Cox wrote:
>
> > > this isnt a kernel problem, its a _very_ stupid app
> > ---
> > Must be more than one stupid app...
>
> Could well be. You have something continually trying to open your cdrom and
> see if there is media in it
---
Is there some feature they *should* be using instead to check for media
presence so I can forward it to their dev-team?

Thanks!
-l

--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-06 09:21:24

by God

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

On Mon, 5 Mar 2001, Alan Cox wrote:

> > > this isnt a kernel problem, its a _very_ stupid app
> > ---
> > Must be more than one stupid app...
>
> Could well be. You have something continually trying to open your cdrom and
> see if there is media in it

Gnome / KDE? does exactly that... (rather annoying too) .. what app
specificaly I don't know...

2001-03-06 16:33:38

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

God wrote:
>
> On Mon, 5 Mar 2001, Alan Cox wrote:
>
> > > > this isnt a kernel problem, its a _very_ stupid app
> > > ---
> > > Must be more than one stupid app...
> >
> > Could well be. You have something continually trying to open your cdrom and
> > see if there is media in it
>
> Gnome / KDE? does exactly that... (rather annoying too) .. what app
> specificaly I don't know...
---
So I'm still wondering what the "approved and recommended" way for a program
to be "automatically" informed of a CD or floppy change/insertion and be able to
informed of media 'type' w/o kernel warnings/error messages. It sounds like
there is no kernel support for this so far?

Then it seems the less ideal question is what is the "approved and recommended
way for a program to "poll" such devices to check for 'changes' and 'media type'
without the kernel generating spurious WARNINGS/ERRORS?


--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-06 16:46:41

by Alan

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

> Then it seems the less ideal question is what is the "approved and recommended
> way for a program to "poll" such devices to check for 'changes' and 'media type'
> without the kernel generating spurious WARNINGS/ERRORS?

The answer to that could probably fill a book unfortunately. You need to use
the various mtfuji and other ata or scsi query commands intended to notify you
politely of media and other status changes

2001-03-06 16:53:12

by Francis Galiegue

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

On Tue, 6 Mar 2001, LA Walsh wrote:

> So I'm still wondering what the "approved and recommended" way for a program
> to be "automatically" informed of a CD or floppy change/insertion and be able to
> informed of media 'type' w/o kernel warnings/error messages. It sounds like
> there is no kernel support for this so far?
>
> Then it seems the less ideal question is what is the "approved and recommended
> way for a program to "poll" such devices to check for 'changes' and 'media type'
> without the kernel generating spurious WARNINGS/ERRORS?
>

The main problem is, in fact: none of floppy drives/IDE
floppies/CDROMs/whatever can do asynchronous medium change notifications (at
least not that I know of), so you'll need to poll anyway... And of course, the
commands to send depend on the device...

--
Francis Galiegue, [email protected] - Normand et fier de l'?tre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook

2001-03-06 16:56:05

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

Alan Cox wrote:
>
> > Then it seems the less ideal question is what is the "approved and recommended
> > way for a program to "poll" such devices to check for 'changes' and 'media type'
> > without the kernel generating spurious WARNINGS/ERRORS?
>
> The answer to that could probably fill a book unfortunately. You need to use
> the various mtfuji and other ata or scsi query commands intended to notify you
> politely of media and other status changes
---
Taking myself out of the role of someone who knows anything about the kernel --
and only knows application writing in the fields of GUI's and audio, what do you think
I'm going to use to check if their has been a playable CD inserted into the CD drive?

There is an application called 'famd' -- which says it needs some kernel
support to function efficiently -- perhaps that technology needs to be further developed
on Linux so app writers don't also have to be kernel experts and experts in all the
various bus and device types out there?

Just an idea...?
-linda
--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-06 17:00:11

by Alan

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

> support to function efficiently -- perhaps that technology needs to be further developed
> on Linux so app writers don't also have to be kernel experts and experts in all the
> various bus and device types out there?

You mean someone should write a libcdrom that handles stuff like that - quite
possibly

2001-03-06 17:07:41

by L A Walsh

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

Alan Cox wrote:
>
> > support to function efficiently -- perhaps that technology needs to be further developed
> > on Linux so app writers don't also have to be kernel experts and experts in all the
> > various bus and device types out there?
>
> You mean someone should write a libcdrom that handles stuff like that - quite
> possibly
---
More generally -- if I want to know if a DVD has been inserted and of what type
and/or a floppy has been inserted or a removable media of type "X" or perhaps
more generally -- not just if a 'device' has changed but a file or directory?

I think that is what famd is supposed to do, but apparently it does so (I'm
guessing from the external description) by polling and says it needs kernel support
to be more efficient. Famd was apparently ported to Linux from Irix where it had
the kernel ability to be notified of changed file-space items (file-space = anything
accessible w/a pathname).


Now if I can just remember where I saw this mythical port of the 'file-access
monitoring daemon'....

-l

--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice: (650) 933-5338

2001-03-06 17:29:13

by David Balazic

[permalink] [raw]
Subject: Re: Annoying CD-rom driver error messages

LA Walsh ([email protected]) wrote:

> Alan Cox wrote:
> >
> > > support to function efficiently -- perhaps that technology needs to be further developed
> > > on Linux so app writers don't also have to be kernel experts and experts in all the
> > > various bus and device types out there?
> >
> > You mean someone should write a libcdrom that handles stuff like that - quite
> > possibly
>
> ---
> More generally -- if I want to know if a DVD has been inserted and of what type
> and/or a floppy has been inserted or a removable media of type "X" or perhaps
> more generally -- not just if a 'device' has changed but a file or directory?
> I think that is what famd is supposed to do, but apparently it does so (I'm
> guessing from the external description) by polling and says it needs kernel support
> to be more efficient. Famd was apparently ported to Linux from Irix where it had
> the kernel ability to be notified of changed file-space items (file-space = anything
> accessible w/a pathname).
> Now if I can just remember where I saw this mythical port of the 'file-access
> monitoring daemon'....

This notification exists in 2.4.x ( at least the docs say so :-)
see /usr/src/linux/Documentation/dnotify.txt

--
David Balazic
--------------
"Be excellent to each other." - Bill & Ted
- - - - - - - - - - - - - - - - - - - - - -