2007-06-04 10:57:31

by Antonio Mignolli

[permalink] [raw]
Subject: Re: lid switch hangs notebook

Hi.
The problem reported below has not been solved,
I tried with the last stable kernel 2.6.21.3.

But it seems not to be an ACPI issue,
I removed ACPI support from the kernel,
and still have the problem.
What else could be?

On 4/13/07, Bjorn Helgaas <[email protected]> wrote:
> On Thursday 15 March 2007 13:06, Andrew Morton wrote:
> > > On Mon, 12 Mar 2007 15:53:18 +0100 "Antonio Mignolli" <[email protected]> wrote:
> > > Hi,
> > > I'm running a slackware 10.2 on a HP/Compaq nx5000.
> > >
> > > With kernels <= 2.6.17.3 I didn't have problems.
> > > Starting from 2.6.19 if I close the notebook's video,
> > > or if I press the lid switch,
> > > after a couple of time, or after a few seconds, the o.s. hangs
> > > completely. The only thing to do is a brute power off
> > > by pressing for 5 seconds the power button
> > > (If I press for few it should do a clean shutdown -h).
> > > I've tried 2.6.19, 2.6.19.1, 2.6.19.2, 2.6.20, 2.6.20.1, 2.6.20.2,
> > > and all of them seem to give problems.
> > >
> > > I don't have KERNEL_DEBUG set, so I haven't any debug informations,
> > > I will be happy to activate it and provide more info if someone suggests
> > > me which debug parameters I should set.
> > > There's nothing in /var/log/messages and /var/log/syslog,
> > > except for the message "LID switch" added by me
> > > with a logger command in /etc/acpi/acpi_handler.sh.
> > > I've put it after noticing the problem, in order to be sure the event was
> > > detected, and it was.
> >
> > I guess this is an ACPI think, although not necessarily.
> >
> > Len & co: do you think we should ask Antonio to raise a report
> > against ACPI at bugzilla.kernel.org?
>
> I don't see a response to this on the linux-acpi list. Did the
> problem get resolved?
>


2007-06-04 15:42:35

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: lid switch hangs notebook

On Monday 04 June 2007 04:57:21 am Antonio Mignolli wrote:
> The problem reported below has not been solved,
> I tried with the last stable kernel 2.6.21.3.
>
> But it seems not to be an ACPI issue,
> I removed ACPI support from the kernel,
> and still have the problem.
> What else could be?

The lid switch event is probably reported via ACPI. But the
fact that you see your "LID switch" message from /etc/acpi/acpi_handler.sh
means the switch event is getting through.

What else does the acpi_handler.sh script do? Can you add more
log messages in it and any related scripts?

If all else fails, you could try git-bisect to isolate a changeset
that broke it. That's tedious but usually effective.

Bjorn

> On 4/13/07, Bjorn Helgaas <[email protected]> wrote:
> > On Thursday 15 March 2007 13:06, Andrew Morton wrote:
> > > > On Mon, 12 Mar 2007 15:53:18 +0100 "Antonio Mignolli" <[email protected]> wrote:
> > > > Hi,
> > > > I'm running a slackware 10.2 on a HP/Compaq nx5000.
> > > >
> > > > With kernels <= 2.6.17.3 I didn't have problems.
> > > > Starting from 2.6.19 if I close the notebook's video,
> > > > or if I press the lid switch,
> > > > after a couple of time, or after a few seconds, the o.s. hangs
> > > > completely. The only thing to do is a brute power off
> > > > by pressing for 5 seconds the power button
> > > > (If I press for few it should do a clean shutdown -h).
> > > > I've tried 2.6.19, 2.6.19.1, 2.6.19.2, 2.6.20, 2.6.20.1, 2.6.20.2,
> > > > and all of them seem to give problems.
> > > >
> > > > I don't have KERNEL_DEBUG set, so I haven't any debug informations,
> > > > I will be happy to activate it and provide more info if someone suggests
> > > > me which debug parameters I should set.
> > > > There's nothing in /var/log/messages and /var/log/syslog,
> > > > except for the message "LID switch" added by me
> > > > with a logger command in /etc/acpi/acpi_handler.sh.
> > > > I've put it after noticing the problem, in order to be sure the event was
> > > > detected, and it was.
> > >
> > > I guess this is an ACPI think, although not necessarily.
> > >
> > > Len & co: do you think we should ask Antonio to raise a report
> > > against ACPI at bugzilla.kernel.org?
> >
> > I don't see a response to this on the linux-acpi list. Did the
> > problem get resolved?
> >
>


2007-06-04 18:57:28

by Andreas Mohr

[permalink] [raw]
Subject: Re: lid switch hangs notebook

Hi,

On Mon, Jun 04, 2007 at 12:57:21PM +0200, Antonio Mignolli wrote:
> Hi.
> The problem reported below has not been solved,
> I tried with the last stable kernel 2.6.21.3.
>
> But it seems not to be an ACPI issue,
> I removed ACPI support from the kernel,
> and still have the problem.
> What else could be?

Have you enabled local APIC ("lapic" command line) since?
Enabling local APIC is known to cause just these issues on some
machines (HARD lockup on AC power/screen dimming/Fn keys change),
and I'm currently trying to nail what exactly the problem is.
People say it's a broken BIOS (probably one which doesn't contain support
for local APIC despite the CPU offering one), but I'm not willing to assume
this yet, it may just as well be incomplete APIC IRQ routing setup
or so).
OTOH I'm not entirely sure whether "lapic" use is fully independent
from ACPI support (which you disabled), but I think it is, so my reasoning
may be valid.

find /sys -name "*lapic*"
should reveal whether local APIC is currently active or not and thus
whether this might be responsible or not.

Andreas Mohr

2007-06-04 20:26:18

by Antonio Mignolli

[permalink] [raw]
Subject: Re: lid switch hangs notebook

Interesting...
The lid problem was solved, but many others arised.
I don't remember what lapic is, I didn't put the lapic on kernel
command line, but it seemed to be active by default:
# find /sys -name "*lapic*"
/sys/devices/system/lapic_nmi
/sys/devices/system/lapic_nmi/lapic_nmi0
/sys/devices/system/lapic
/sys/devices/system/lapic/lapic0

I put a "nolapic" in cmdline, and this time no hangs,
even WITH acpi support in kernel, pressing the button
a dozen of times (without nolapic it hanged after a couple of times).

BUT:
- Module b44 (broadcom network adapter) fails to load, giving,
with debug actived:
b44 0000:01:0e.0: Cannot find proper PCI device base address, aborting.
- Alsa does not work
... No time for analyze other issues.

Thanks for helping,
I'll take a look to lapic.

On 6/4/07, Andreas Mohr <[email protected]> wrote:
> Hi,
>
> On Mon, Jun 04, 2007 at 12:57:21PM +0200, Antonio Mignolli wrote:
> > Hi.
> > The problem reported below has not been solved,
> > I tried with the last stable kernel 2.6.21.3.
> >
> > But it seems not to be an ACPI issue,
> > I removed ACPI support from the kernel,
> > and still have the problem.
> > What else could be?
>
> Have you enabled local APIC ("lapic" command line) since?
> Enabling local APIC is known to cause just these issues on some
> machines (HARD lockup on AC power/screen dimming/Fn keys change),
> and I'm currently trying to nail what exactly the problem is.
> People say it's a broken BIOS (probably one which doesn't contain support
> for local APIC despite the CPU offering one), but I'm not willing to assume
> this yet, it may just as well be incomplete APIC IRQ routing setup
> or so).
> OTOH I'm not entirely sure whether "lapic" use is fully independent
> from ACPI support (which you disabled), but I think it is, so my reasoning
> may be valid.
>
> find /sys -name "*lapic*"
> should reveal whether local APIC is currently active or not and thus
> whether this might be responsible or not.
>
> Andreas Mohr
>

2007-06-04 20:32:16

by Andreas Mohr

[permalink] [raw]
Subject: Re: lid switch hangs notebook

Hi,

On Mon, Jun 04, 2007 at 10:26:05PM +0200, Antonio Mignolli wrote:
> Interesting...
> The lid problem was solved, but many others arised.
> I don't remember what lapic is, I didn't put the lapic on kernel
> command line, but it seemed to be active by default:
> # find /sys -name "*lapic*"
> /sys/devices/system/lapic_nmi
> /sys/devices/system/lapic_nmi/lapic_nmi0
> /sys/devices/system/lapic
> /sys/devices/system/lapic/lapic0
>
> I put a "nolapic" in cmdline, and this time no hangs,
> even WITH acpi support in kernel, pressing the button
> a dozen of times (without nolapic it hanged after a couple of times).

Just sounds like local APIC issues are really wide-spread then ;)
I'm really wondering whether it's the kernel which is not doing enough here.
Too many BIOSes with issues, it seems.

> BUT:
> - Module b44 (broadcom network adapter) fails to load, giving,
> with debug actived:
> b44 0000:01:0e.0: Cannot find proper PCI device base address, aborting.

Known issue I think, b44 stuff was discussed on LKML very recently.

> - Alsa does not work

Hmm. Known issue, too, I think. ALSA stuff was... (c.f. above ;).

> ... No time for analyze other issues.
>
> Thanks for helping,
> I'll take a look to lapic.

Maybe try pci=routeirq or some other useful parameters from
Documentation/kernel-parameters.txt.

And believe me that I'll take a HARD look at lapic stuff, too.

Andreas Mohr

2007-06-07 12:02:37

by Pavel Machek

[permalink] [raw]
Subject: Re: lid switch hangs notebook

Hi!

> The problem reported below has not been solved,
> I tried with the last stable kernel 2.6.21.3.
>
> But it seems not to be an ACPI issue,
> I removed ACPI support from the kernel,
> and still have the problem.
> What else could be?

Does it hang the box if you close/open the lid on grub prompt?

Also try disabling apm.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html