Re: events for lid stopped working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 04 Oct 2007, Henrique de Moraes Holschuh wrote:
> On Thu, 04 Oct 2007, Peter Jordan wrote:
> > Henrique de Moraes Holschuh, 10/03/07 23:28:
> > > On Wed, 03 Oct 2007, Peter Jordan wrote:
> > >> Henrique de Moraes Holschuh, 10/03/07 19:57:
> > >>> However, if you make a valid case for me for the reason you need the
> > >>> thinkpad-specific 0x5001 and 0x5002 events (and keep in mind that you will
> > >>> STILL get the generic LID events, which could cause things to be triggered
> > >>> twice, etc), I can remove the code that filters them out.
> > >> the problem is, that the generic LID events does not show me if lid has
> > >> been closed or opened, or am i wrong?
> > > 
> > > Yes, they do.  Look at the information in the event.  The events have a
> > > name, a class (0x80 for this), and some information.
> > > 
> > > Here are the events in procfs format (what acpid uses):
> > > 
> > > button/lid LID 00000080 00000001	- lid closed
> > > button/lid LID 00000080 00000002	- lid opened
> > > 
> > 
> > hmmm, my acpid log show me that the last number of the event increases
> > each time I close or open the lid. that makes the differentiation a bit
> > difficult.
> 
> I will check that.  It is indeed cubersome to need to ask ACPI for the lid
> switch state than just getting it from the event, but...

Yep, you're correct.  You get the event, and you need to use procfs or sysfs
to check the LID switch state.  This is... ugly.  Really, really ugly.  I
don't know why it was done this way.

Still, I am wary of leaving a non-generic way to handle LID events, I'd
rather we fix the generic ones to be more useful, or something.

Could you open a wishlist bug on bugzilla.kernel.org against ACPI, asking
them for a way to get the relevant information in button events, instead of
an useless event count?  Maybe if they added a guarantee that all odd events
are "close" and all even events are "open" would be enough...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux