public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Gateway 200X (again) - No power button events
@ 2004-01-20 20:15 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A84702C93238-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Grover, Andrew @ 2004-01-20 20:15 UTC (permalink / raw)
  To: Nate Lawson, Greg Sarjeant; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 
> [mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of 
> Nate Lawson
> On Mon, 19 Jan 2004, Greg Sarjeant wrote:
> > So, it looks like it is specified in the DSDT. I'm not sure 
> why I don't
> > get an event when I press the button. I do get events from the sleep
> > button, but the two are declared somewhat differently. Here 

> You have no _STA method for PWRB.  On FreeBSD, we say hw is 
> always present
> if there is no _STA method.  If it is present, it must return 
> the proper
> flags for the hw to be used.  Perhaps Linux always thinks 
> it's not present
> if _STA is not there.  Note that SLPB returns the proper _STA result.

The ACPI spec in fact says that the absence of _STA implies the device
is present and functioning. Linux has code for this case, which I am
assuming (?) works.

In the ASL, you might make sure there are _Qxx methods that call
Notify() on these respective devices. Also, does dmesg indicate the
presence of a fixed-feature power button?

Regards -- Andy


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: Gateway 200X (again) - No power button events
@ 2004-01-21  0:23 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A84702C9323C-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Grover, Andrew @ 2004-01-21  0:23 UTC (permalink / raw)
  To: Greg Sarjeant; +Cc: Nate Lawson, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

 

> From: Greg Sarjeant [mailto:greg-QNIYhHqVzB9kr2E5YSwMOQ@public.gmane.org] 
> Aha! That did the trick.

> And now dmesg reports:
> So, it is picking up the Control Method Power Button, and I get events
> from it now. Outstanding.

> Is this something that might find its way into the main kernel tree?
> Should I submit a bug for this behavior?

Yes open a bug. Sounds like if both are present, CM should be preferred
over FF. This is against what the spec says, so this may come down to a
judgment call by Len. I don't know how common this problem is.

Regards -- Andy


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: Gateway 200X (again) - No power button events
@ 2004-01-20 23:27 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A8470255EFE4-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Grover, Andrew @ 2004-01-20 23:27 UTC (permalink / raw)
  To: Greg Sarjeant; +Cc: Nate Lawson, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> From: Greg Sarjeant [mailto:greg-QNIYhHqVzB9kr2E5YSwMOQ@public.gmane.org] 
> I think it may be detecting a Fixed Feature power button. Here are the
> relevant dmesg lines:
> 
> ACPI: Power Button (FF) [PWRF]
> ACPI: Lid Switch [LID0]
> ACPI: Sleep Button (CM) [SLPB]
> ACPI: AC Adapter [ADP1] (on-line)
> ACPI: Battery Slot [BAT1] (battery present)
> [ACPI Debug] String: Not Support
> ACPI: Thermal Zone [THRM] (47 C)
> ACPI: Fan [FAN0] (on)
> 
> (That "Not Support" is raised by the thermal zone's _SCP Method in the
> DSDT. Guess I can't set the cooling policy on this machine).
> 
> So, unless the FF cleverly stands for something other than Fixed
> Feature, I imagine that that is what I've got. I was just starting to
> read up about Fixed vs Control Method Power Buttons, and I am a bit
> confused. It seems from the spec that a Fixed Feature Power Button
> shouldn't have an implementation in the DSDT. Is that correct, or am I
> misreading? I do see methods for the Power button in the DSDT. Here is
> the _Q50 method, which is defined in the Embedded Control block:

That is correct. So, the code ignores a CM power button if a FF button
is found. There is a bit in the FADT that declares if the power button
is fixed or control-method.

PWR_BUTTON A zero indicates the power button is handled as a fixed
feature programming model; a one indicates the power
button is handled as a control method device. If the system
does not have a power button, this value would be "1" and
no sleep button device would be present.

(I think that "sleep" should be "power" but anyways...)

So the FF pwr button gets priority. You can comment out a few lines in
scan.c acpi_bus_scan_fixed(), and it should not register the FF power
button. That might be interesting to try.

Regards -- Andy


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Gateway 200X (again) - No power button events
@ 2004-01-19 17:34 Greg Sarjeant
       [not found] ` <1074533658.11008.18.camel-bi+AKbBUZKZeoWH0uzbU5w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Sarjeant @ 2004-01-19 17:34 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi,

    I have another question about my Gateway 200X. ACPI is working much
better now, but I just started playing with the power button, and it
turns out that I am not getting any events from it. I looked through the
DSDT, and could not find any Notify (\SW.PWRB, 0x80) statements for it,
so I imagine that that is the problem. Here (I think) are the relevant
DSDT sections:


    Scope (_GPE)
    {
        Method (_L05, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.MODM, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L0B, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.PCIB, 0x02)
            Notify (\_SB.PWRB, 0x02)
        }

        Method (_L1D, 0, NotSerialized)
        {
            Store (\_SB.PHS1 (0x8E, Zero), Local0)
            If (LEqual (Local0, One))
            {
                Notify (\_SB.PWRB, 0x02)
            }

            If (LEqual (Local0, 0x02))
            {
                Notify (\_SB.PWRB, 0x02)
            }
        }
    }


    Device (PWRB)
    {
        Name (_HID, EisaId ("PNP0C0C"))
        Name (_PRW, Package (0x02)
        {
            0x1D, 
            0x04
        })
    }


Do I have to add this Notify statement in the _GPE block? I'm also a bit
confused by the "Notify (\_SB.PWRB, 0x02)" lines. From the spec, I
thought that 0x80 and 0x200 were the expected values from Notify for the
power button. Am I missing something here?

Also, the BIOS does not supply an ECDT. I am using the patch at bug 1690
to get around this, could that be related? 

The power button does shut the macine down in Windows XP. I have tried
passing acpi_os_name="Microsoft Windows XP" to the kernel without
success. I did that because I noticed lines like this:

       If (LEqual (SizeOf (_OS), 0x14))

In the PCI0 device block after seeing the S3D method emails. I haven't
really had the chance to dig into what's going on there yet, so it was a
bit of a blind stab.

For reference, the complete DSDT is posted at
http://www.morningdave.org/acpi/dsdt.dsl


Thanks again for any help,
Greg




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-01-24 19:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20 20:15 Gateway 200X (again) - No power button events Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A84702C93238-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2004-01-20 20:17   ` Nate Lawson
2004-01-20 20:28   ` Greg Sarjeant
     [not found]     ` <1074630523.3313.17.camel-bi+AKbBUZKZeoWH0uzbU5w@public.gmane.org>
2004-01-20 21:17       ` Greg Sarjeant
     [not found]         ` <1074633425.3317.20.camel-bi+AKbBUZKZeoWH0uzbU5w@public.gmane.org>
2004-01-21 10:23           ` Ducrot Bruno
     [not found]             ` <20040121102356.GU25416-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2004-01-21 15:25               ` Greg Sarjeant
  -- strict thread matches above, loose matches on Subject: below --
2004-01-21  0:23 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A84702C9323C-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2004-01-24 19:58   ` Greg Sarjeant
2004-01-20 23:27 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A8470255EFE4-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2004-01-21  0:07   ` Greg Sarjeant
2004-01-19 17:34 Greg Sarjeant
     [not found] ` <1074533658.11008.18.camel-bi+AKbBUZKZeoWH0uzbU5w@public.gmane.org>
2004-01-19 19:51   ` Greg Sarjeant
     [not found]     ` <1074541900.2813.5.camel-bi+AKbBUZKZeoWH0uzbU5w@public.gmane.org>
2004-01-20 15:57       ` Greg Sarjeant
2004-01-20 20:03       ` Nate Lawson
     [not found]         ` <20040120120211.U96919-Y6VGUYTwhu0@public.gmane.org>
2004-01-21 10:11           ` Ducrot Bruno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox