2008-02-24 11:08:56

by Harald Dunkel

[permalink] [raw]
Subject: strange behavior on multimedia eject button for cdrom

Hi folks,

My laptop (Dell XPS M1330) has some multimedia keys added to the
keyboard, including an eject button for the cdrom drive, instead
of a "regular" eject button built into the drive itself.

When I press it to eject a CD, then Linux becomes pretty mad: The
audio device gets stuck somehow, playing the same tune over and
over again, the network connection is frozen, etc. Once the CD is
out it is back to normal, as it seems.

I would guess that the eject button triggers some bios functionality,
outside of the control of the kernel. But is it? How comes that
Linux seems to loose control in this case?

Kernel is 2.6.24.2 (amd64).

AFAICS this eject button has no keycode. The other multimedia keys
have.


Any helpful idea would be very welcome.


Regards

Harri


2008-02-29 12:47:20

by Mike Keehan

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Hi Harold.

Somewhere on the web I read that some of the M1330 media keys are
directly connected to the drive, hence the lack of keycodes.

If you eject a disk while it is being played, then the Linux driver
will get a read failure. What happens then may not be well defined :)

Mike.


Harald Dunkel wrote:
> Hi folks,
>
> My laptop (Dell XPS M1330) has some multimedia keys added to the
> keyboard, including an eject button for the cdrom drive, instead
> of a "regular" eject button built into the drive itself.
>
> When I press it to eject a CD, then Linux becomes pretty mad: The
> audio device gets stuck somehow, playing the same tune over and
> over again, the network connection is frozen, etc. Once the CD is
> out it is back to normal, as it seems.
>
> I would guess that the eject button triggers some bios functionality,
> outside of the control of the kernel. But is it? How comes that
> Linux seems to loose control in this case?
>
> Kernel is 2.6.24.2 (amd64).
>
> AFAICS this eject button has no keycode. The other multimedia keys
> have.
>
>
> Any helpful idea would be very welcome.
>
>
> Regards
>
> Harri
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>

2008-03-02 20:46:15

by Harald Dunkel

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Hi Mike,

Mike Keehan wrote:
> Hi Harold.
>
> Somewhere on the web I read that some of the M1330 media keys are
> directly connected to the drive, hence the lack of keycodes.
>
> If you eject a disk while it is being played, then the Linux driver will
> get a read failure. What happens then may not be well defined :)
>

Maybe there is some misunderstanding here: I am not playing music
from the CD. It is idle. But if I press the CD eject button, then
audio output (e.g. some mp3 file played from harddisk) gets
corrupted, the network connection is dead, etc.

Ejecting the CD takes about 7 seconds. Durig this time Linux is
dead! I haven't checked any SCHED_FIFO or SCHED_RR applications,
but AFAIK this shouldn't happen.

If I run "eject cdrom" on the console instead, then there is no
such problem.


Regards

Harri

2008-03-02 20:54:33

by Arjan van de Ven

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

On Sun, 02 Mar 2008 21:45:46 +0100
Harald Dunkel <[email protected]> wrote:

> Hi Mike,
>
> Mike Keehan wrote:
> > Hi Harold.
> >
> > Somewhere on the web I read that some of the M1330 media keys are
> > directly connected to the drive, hence the lack of keycodes.
> >
> > If you eject a disk while it is being played, then the Linux driver
> > will get a read failure. What happens then may not be well
> > defined :)
> >
>
> Maybe there is some misunderstanding here: I am not playing music
> from the CD. It is idle. But if I press the CD eject button, then
> audio output (e.g. some mp3 file played from harddisk) gets
> corrupted, the network connection is dead, etc.
>
> Ejecting the CD takes about 7 seconds. Durig this time Linux is
> dead! I haven't checked any SCHED_FIFO or SCHED_RR applications,
> but AFAIK this shouldn't happen.
>
> If I run "eject cdrom" on the console instead, then there is no
> such problem.


try (temporarily) disable the hal storage polling thing.....
that could well avoid the entire issue.


--
If you want to reach me at my work email, use [email protected]
For development, discussion and tips for power savings,
visit http://www.lesswatts.org

2008-03-03 20:15:21

by Mike Keehan

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Harald Dunkel wrote:
> Hi Mike,
>
> Mike Keehan wrote:
>> Hi Harold.
>>
>> Somewhere on the web I read that some of the M1330 media keys are
>> directly connected to the drive, hence the lack of keycodes.
>>
>> If you eject a disk while it is being played, then the Linux driver
>> will get a read failure. What happens then may not be well defined :)
>>
>
> Maybe there is some misunderstanding here: I am not playing music
> from the CD. It is idle. But if I press the CD eject button, then
> audio output (e.g. some mp3 file played from harddisk) gets
> corrupted, the network connection is dead, etc.
>
> Ejecting the CD takes about 7 seconds. Durig this time Linux is
> dead! I haven't checked any SCHED_FIFO or SCHED_RR applications,
> but AFAIK this shouldn't happen.
>
> If I run "eject cdrom" on the console instead, then there is no
> such problem.
>
>
> Regards
>
> Harri
>

Hi again.

Ok, I just tried doing the same thing on my M1330. It behaves
differently to yours in that a small section of music repeats again
and again until the disk is ejected, and then carries on (I was using
RealPlayer with a local file as a simple test).

And it does look like other things stop working while the disk is
ejected - screen updates freeze and network too I think.

I'm going to be travelling for the next few days, so I won't be able
to try anything else till later in the week.

Regards,

Mike.


2008-03-03 21:44:33

by Harald Dunkel

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Hi Mike,

Mike Keehan wrote:
>
> Hi again.
>
> Ok, I just tried doing the same thing on my M1330. It behaves
> differently to yours in that a small section of music repeats again and
> again until the disk is ejected, and then carries on (I was using
> RealPlayer with a local file as a simple test).
>
> And it does look like other things stop working while the disk is
> ejected - screen updates freeze and network too I think.
>

Thats exactly what I see, too.


Regards

Harri

2008-03-03 21:58:43

by Harald Dunkel

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Hi Arjan,

Arjan van de Ven wrote:
>
> try (temporarily) disable the hal storage polling thing.....
> that could well avoid the entire issue.
>
>

Now _that_ was an improvement. After hald has been stopped the problem
is gone.

Even better: Seems that hald was responsible for keeping my CD drive
spinning all the time. Since hald is gone the CD drive stops spinning
after a few seconds :-). And playing DVDs the whole system is _much_
more responsive, the DVD navigation menus are faster, etc.

Hopefully there is a configure option to tell hald to keep the CD drive
alone.


Thanx very much

Harri

2008-03-04 05:54:58

by Harald Dunkel

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Update: The original problem is _not_ gone yet. Now it takes
just 2 seconds to eject the CD (since it is not spinning by
default), but the sound and network are still affected during
this time.

On this page

http://bugs.debian.org/370186

you can find some information to tell HAL to ignore the CD
drive.


Regards

Harri
================================================================
Harald Dunkel wrote:
> Hi Arjan,
>
> Arjan van de Ven wrote:
>>
>> try (temporarily) disable the hal storage polling thing.....
>> that could well avoid the entire issue.
>>
>>
>
> Now _that_ was an improvement. After hald has been stopped the problem
> is gone.
>
> Even better: Seems that hald was responsible for keeping my CD drive
> spinning all the time. Since hald is gone the CD drive stops spinning
> after a few seconds :-). And playing DVDs the whole system is _much_
> more responsive, the DVD navigation menus are faster, etc.
>
> Hopefully there is a configure option to tell hald to keep the CD drive
> alone.
>
>
> Thanx very much
>
> Harri
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


--
Dipl.-Ing. Harald Dunkel | Today's weirdness is tomorrow's reason why.
Muehlenbachstr. 3 | -- Hunter S. Thompson
52134 Herzogenrath, Germany |
+49 2407 565 105 |

2008-03-06 11:23:26

by Mike Keehan

[permalink] [raw]
Subject: Re: strange behavior on multimedia eject button for cdrom

Harald Dunkel wrote:
> Hi Mike,
>
> Mike Keehan wrote:
>>
>> Hi again.
>>
>> Ok, I just tried doing the same thing on my M1330. It behaves
>> differently to yours in that a small section of music repeats again
>> and again until the disk is ejected, and then carries on (I was using
>> RealPlayer with a local file as a simple test).
>>
>> And it does look like other things stop working while the disk is
>> ejected - screen updates freeze and network too I think.
>>
>
> Thats exactly what I see, too.
>
>
> Regards
>
> Harri
>

Hi Harri.

I've just tried ejecting a CD when the Grub boot menu was counting
down, and even that froze until the CD was ejected and the drive motor
noises had stopped. Grub continued the countdown, and then Linux
booted OK.

So I think it is a hardware issue with this laptop.

Mike.