public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Fedor Karpelevitch <fedor-ugkMPi23kyXAHCkTjeiZhQ@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: lid state reported incorrectly; no ac events
Date: Wed, 23 Jul 2003 07:28:31 -0700	[thread overview]
Message-ID: <200307230728.31830.fedor@karpelevitch.net> (raw)

Hi, folks.

I have a Presario 900 laptop (I mention this in case the problem is 
specific to this model) and acpi interface appears to be reporting 
lid state incorretly: /proc/acpi/button/lid/LID/state says "state: 
closed" when lid is open and "state: open" when it is closed. Is it 
supposed to be like that?

I figured it comes from this place in drivers/acpi/button.c :

-----------------------
        
status=acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
        if (ACPI_FAILURE(status)){
            p += sprintf(p, "state:      unsupported\n");
        }
        else{
            p += sprintf(p, "state:      %s\n", (state ? "open" :
"closed"));
        }
-----------------------

so state!=0 is interpreted as "open" whereas (it seems to me) since it 
is state of the _button_ (not the lid itself), it would be logical 
that state!=0 means that button is depressed (which means that the 
lid is closed). Am I making sense here? 
The only question here is what happens on other laptops or whether 
this is specified in ACPI docs somewhere?

The other question (issue?) I have is that in acpid log I only see 
messages for power and lid buttons and the battery (BTW when exactly 
do these fire? is it only when battery is critically low/fully 
charged or more often?). I expected to see AC connected/disconnected 
events and maybe thermal events too. When I compile with acpi 
debugging output I do see messages on ac plugging/unplugging so I 
assume it gets detected correctly, but event does not fire. Is that 
ok or is it a bug?

And the last one. Is there any reason why events when lid is closed 
and opened are identical. It would be more convinient if they were 
distinct. Of course one can always read lid state on event, but 
having event provide that info would be handy.

I hope my questions make sense.

Fedor.


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01

             reply	other threads:[~2003-07-23 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 14:28 Fedor Karpelevitch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-25 20:58 lid state reported incorrectly; no ac events Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A847E97081-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-07-25 22:19   ` Fedor Karpelevitch
2003-07-25 23:04   ` Fedor Karpelevitch
2003-07-25 22:30 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A8470255EEAA-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-07-25 22:49   ` Fedor Karpelevitch
2003-07-25 22:55 Grover, Andrew
2003-07-25 23:36 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A8470255EEAB-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-07-26  6:38   ` Fedor Karpelevitch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307230728.31830.fedor@karpelevitch.net \
    --to=fedor-ugkmpi23kyxahcktjeizhq@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox