mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: EC interrupt mode by default breaks power button and lid button
@ 2006-02-07  6:52 Yu, Luming
  2006-02-07 14:08 ` Gerhard Schrenk
  0 siblings, 1 reply; 8+ messages in thread
From: Yu, Luming @ 2006-02-07  6:52 UTC (permalink / raw)
  To: Gerhard Schrenk; +Cc: Brown, Len, linux-kernel

>> Please don't revert that patch, and test kernel parameter ec_intr=0
>
>Yes, boot option ec_initr=0 helps power/lid buttons. (Tested with
>yesterdays newest kernel from linus' tree.)

Any difference with ec_initr=1 with this kernel ?
If pressing power button, can you see acpi interrupt increases?

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: EC interrupt mode by default breaks power button and lid button
@ 2006-02-09  1:29 Yu, Luming
  2006-02-10  5:14 ` Gerhard Schrenk
  0 siblings, 1 reply; 8+ messages in thread
From: Yu, Luming @ 2006-02-09  1:29 UTC (permalink / raw)
  To: Gerhard Schrenk; +Cc: Brown, Len, linux-kernel

It's interesting. Could you file a bug in ACPI category on
bugzilla.kernel.org?
I don't want it be lost, because it's so interesting.

BTW, does battery work?

Thanks,
Luming

>
>* Yu, Luming <luming.yu@intel.com> [2006-02-07 13:33]:
>> >> Please don't revert that patch, and test kernel parameter 
>ec_intr=0
>> >
>> >Yes, boot option ec_initr=0 helps power/lid buttons. (Tested with
>> >yesterdays newest kernel from linus' tree.)
>> 
>> Any difference with ec_initr=1 with this kernel ?
>
>No. Neither powerbutton nor lidbutton works with ec_initr=1.
>
>> If pressing power button, can you see acpi interrupt increases?
>
>Where do I find this? Do you mean interrupt 9 "IO-APIC-edge  acpi" in
>/proc/interrupts?
>
>With ec_initr=1 I don't see that interrupt 9 increases. 
>
>--- tmp/ec1/interrupts	2006-02-07 14:31:54.000000000 +0100
>+++ tmp/ec1/interrupts-after-powerbutton	2006-02-07 
>14:33:07.000000000 +0100
>@@ -1,10 +1,10 @@
>            CPU0       
>-  0:      42181    IO-APIC-edge  timer
>-  1:        446    IO-APIC-edge  i8042
>+  0:      60423    IO-APIC-edge  timer
>+  1:        676    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>   9:          1    IO-APIC-edge  acpi
>- 12:       2177    IO-APIC-edge  i8042
>- 14:       6494    IO-APIC-edge  ide0
>+ 12:       3221    IO-APIC-edge  i8042
>+ 14:       6547    IO-APIC-edge  ide0
>  16:          0   IO-APIC-level  uhci_hcd:usb5, i915@pci:0000:00:02.0
>  17:          1   IO-APIC-level  Intel ICH6, ipw2200
>  18:          0   IO-APIC-level  uhci_hcd:usb4
>@@ -12,6 +12,6 @@
>  20:          0   IO-APIC-level  yenta, Intel ICH6 Modem
>  23:          0   IO-APIC-level  ehci_hcd:usb1, uhci_hcd:usb2
> NMI:          0 
>-LOC:      42140 
>+LOC:      60383 
> ERR:          0
> MIS:          0
>
>
>With ec_initr=1 /proc/acpi/button/lid/LID0/state seems to work sane:
>
>gps@medusa:~$ cat /proc/acpi/button/lid/LID0/state # lid opened
>state:      open
>gps@medusa:~$ sleep 5 && cat /proc/acpi/button/lid/LID0/state 
># closing lid quicker than 5 seconds
>state:      closed
>
>With ec_initr=0 (and acpid *stopped*) I see interrupt 9 increases.
>
>--- tmp/ec0/acpid-off/interrupts	2006-02-07 
>14:40:55.000000000 +0100
>+++ tmp/ec0/acpid-off/interrupts-after-powerbutton	
>2006-02-07 14:42:13.000000000 +0100
>@@ -1,10 +1,10 @@
>            CPU0       
>-  0:      27910    IO-APIC-edge  timer
>-  1:        375    IO-APIC-edge  i8042
>+  0:      47228    IO-APIC-edge  timer
>+  1:        599    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>-  9:         27    IO-APIC-edge  acpi
>- 12:        755    IO-APIC-edge  i8042
>- 14:       6259    IO-APIC-edge  ide0
>+  9:         28    IO-APIC-edge  acpi
>+ 12:       2105    IO-APIC-edge  i8042
>+ 14:       6465    IO-APIC-edge  ide0
>  16:          0   IO-APIC-level  uhci_hcd:usb5, i915@pci:0000:00:02.0
>  17:          1   IO-APIC-level  Intel ICH6, ipw2200
>  18:          0   IO-APIC-level  uhci_hcd:usb4
>@@ -12,6 +12,6 @@
>  20:          0   IO-APIC-level  yenta, Intel ICH6 Modem
>  23:          0   IO-APIC-level  ehci_hcd:usb1, uhci_hcd:usb2
> NMI:          0 
>-LOC:      27872 
>+LOC:      47191 
> ERR:          0
> MIS:          0
>
>With ec_initr=0 and acpid *started* I see this change in /var/log/acpid
>
>--- tmp/ec0/acpid-after-boot	2006-02-07 14:20:21.000000000 +0100
>+++ tmp/ec0/acpid-after-powerbutton-and-lid-switch	
>2006-02-07 15:01:50.000000000 +0100
>@@ -327,3 +327,20 @@
> [Tue Feb  7 14:13:41 2006] exiting
> [Tue Feb  7 14:18:44 2006] starting up
> [Tue Feb  7 14:18:44 2006] 8 rules loaded
>+[Tue Feb  7 14:20:25 2006] received event "button/power PWRF 
>00000080 00000001"
>+[Tue Feb  7 14:20:25 2006] executing action 
>"/etc/acpi/actions/my_powerbtn.sh"
>+[Tue Feb  7 14:20:25 2006] BEGIN HANDLER MESSAGES
>+[Tue Feb  7 14:20:37 2006] END HANDLER MESSAGES
>+[Tue Feb  7 14:20:37 2006] action exited with status 0
>+[Tue Feb  7 14:20:37 2006] completed event "button/power PWRF 
>00000080 00000001"
>+[Tue Feb  7 14:23:20 2006] received event "button/lid LID0 
>00000080 00000001"
>+[Tue Feb  7 14:23:20 2006] executing action 
>"/etc/acpi/actions/lm_lid.sh button/lid LID0 00000080 00000001"
>+[Tue Feb  7 14:23:20 2006] BEGIN HANDLER MESSAGES
>+[Tue Feb  7 14:23:20 2006] END HANDLER MESSAGES
>+[Tue Feb  7 14:23:20 2006] action exited with status 0
>+[Tue Feb  7 14:23:20 2006] executing action 
>"/etc/acpi/actions/my_lid.sh button/lid LID0 00000080 00000001"
>+[Tue Feb  7 14:23:20 2006] BEGIN HANDLER MESSAGES
>+[Tue Feb  7 14:24:27 2006] END HANDLER MESSAGES
>+[Tue Feb  7 14:24:27 2006] action exited with status 0
>+[Tue Feb  7 14:24:27 2006] completed event "button/lid LID0 
>00000080 00000001"
>
>Hope this helps
>-- Gerhard
>

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: EC interrupt mode by default breaks power button and lid button
@ 2006-02-06  7:37 Yu, Luming
  2006-02-06  7:37 ` Jiri Slaby
  2006-02-06 13:34 ` Gerhard Schrenk
  0 siblings, 2 replies; 8+ messages in thread
From: Yu, Luming @ 2006-02-06  7:37 UTC (permalink / raw)
  To: Gerhard Schrenk, Brown, Len; +Cc: linux-kernel

Please don't revert that patch, and test kernel parameter ec_intr=0
Also, please send me acpidump output.

I'm wondering how ec interrupt mode breaks power & lid button.

Thanks
Luming 

>-----Original Message-----
>From: Gerhard Schrenk [mailto:deb.gschrenk@gmx.de] 
>Sent: 2006年2月6日 2:04
>To: Brown, Len
>Cc: Yu, Luming; linux-kernel@vger.kernel.org
>Subject: EC interrupt mode by default breaks power button and 
>lid button
>
>Hi,
>
>the following commit breaks power button and lid button on my centrino
>notebook (MSI S260; branded as Medion SIM S2100).
>
>|gps@medusa:~/scratch/kernel-tree$ git bisect good
>|53f11d4ff8797bcceaf014e62bd39f16ce84baec is first bad commit
>|diff-tree 53f11d4ff8797bcceaf014e62bd39f16ce84baec (from 
>02b28a33aae93a3b53068e0858d62f8bcaef60a3)
>|Author: Len Brown <len.brown@intel.com>
>|Date:   Mon Dec 5 16:46:36 2005 -0500
>|
>|    [ACPI] Enable Embedded Controller (EC) interrupt mode by default
>|    
>|    "ec_intr=0" reverts to polling
>|    "ec_burst=" no longer exists.
>|    
>|    Signed-off-by: Len Brown <len.brown@intel.com>
>|    Acked-by: Luming Yu <luming.yu@intel.com>
>|
>|:040000 040000 9eec66712c68ebe372b2fb2c8d78bdc99df942ab 
>e7e62cd09983730aee468edd4ba1cce50786b7e5 M      Documentation
>|:040000 040000 6e7db46918f6124f64a11f6757560078a8a27519 
>aa8abb1023024902300cb2e7a5bf74acd8c579e8 M      drivers
>
>With
>
>  git revert 53f11d4ff8797bcceaf014e62bd39f16ce84baec
>
>on top of linus' tree I have no problems with power/lid buttons and my
>acpid configuration.
>
>Suspend to disk/mem (at least for some seconds/minutes thereafter) with
>an unpatched kernel from linus' tree is another possibility to bring
>power/lid events back to life.
>
>On my debian (etch) system I have following acpid(?) 1.0.4-3 
>configuration:
>
>|gps@medusa$ cat /etc/acpi/events/my_lid
>|event=button[ /]lid
>|action=/etc/acpi/actions/my_lid.sh %e
>
>|gps@medusa:~$ cat /etc/acpi/actions/my_lid.sh 
>|#!/bin/sh
>|# lid button pressed/released event handler
>|
>|# echo "lid-event" | wall
>|echo platform > /sys/power/disk
>|echo disk > /sys/power/state
>
>|gps@medusa:~$ cat /etc/acpi/events/powerbtn 
>|event=button[ /]power
>|action=/etc/acpi/actions/my_powerbtn.sh
>
>|gps@medusa:~$ cat /etc/acpi/actions/my_powerbtn.sh 
>|#!/bin/sh
>|# suspend to disk (hybernation) when the power button has 
>been pressed 
>|# echo "power-button-event" | wall
>|echo mem > /sys/power/state
>
>-- Gerhard
>

^ permalink raw reply	[flat|nested] 8+ messages in thread
* EC interrupt mode by default breaks power button and lid button
@ 2006-02-05 18:04 Gerhard Schrenk
  0 siblings, 0 replies; 8+ messages in thread
From: Gerhard Schrenk @ 2006-02-05 18:04 UTC (permalink / raw)
  To: Len Brown; +Cc: Luming Yu, linux-kernel

Hi,

the following commit breaks power button and lid button on my centrino
notebook (MSI S260; branded as Medion SIM S2100).

|gps@medusa:~/scratch/kernel-tree$ git bisect good
|53f11d4ff8797bcceaf014e62bd39f16ce84baec is first bad commit
|diff-tree 53f11d4ff8797bcceaf014e62bd39f16ce84baec (from 02b28a33aae93a3b53068e0858d62f8bcaef60a3)
|Author: Len Brown <len.brown@intel.com>
|Date:   Mon Dec 5 16:46:36 2005 -0500
|
|    [ACPI] Enable Embedded Controller (EC) interrupt mode by default
|    
|    "ec_intr=0" reverts to polling
|    "ec_burst=" no longer exists.
|    
|    Signed-off-by: Len Brown <len.brown@intel.com>
|    Acked-by: Luming Yu <luming.yu@intel.com>
|
|:040000 040000 9eec66712c68ebe372b2fb2c8d78bdc99df942ab e7e62cd09983730aee468edd4ba1cce50786b7e5 M      Documentation
|:040000 040000 6e7db46918f6124f64a11f6757560078a8a27519 aa8abb1023024902300cb2e7a5bf74acd8c579e8 M      drivers

With

  git revert 53f11d4ff8797bcceaf014e62bd39f16ce84baec

on top of linus' tree I have no problems with power/lid buttons and my
acpid configuration.

Suspend to disk/mem (at least for some seconds/minutes thereafter) with
an unpatched kernel from linus' tree is another possibility to bring
power/lid events back to life.

On my debian (etch) system I have following acpid(?) 1.0.4-3 configuration:

|gps@medusa$ cat /etc/acpi/events/my_lid
|event=button[ /]lid
|action=/etc/acpi/actions/my_lid.sh %e

|gps@medusa:~$ cat /etc/acpi/actions/my_lid.sh 
|#!/bin/sh
|# lid button pressed/released event handler
|
|# echo "lid-event" | wall
|echo platform > /sys/power/disk
|echo disk > /sys/power/state

|gps@medusa:~$ cat /etc/acpi/events/powerbtn 
|event=button[ /]power
|action=/etc/acpi/actions/my_powerbtn.sh

|gps@medusa:~$ cat /etc/acpi/actions/my_powerbtn.sh 
|#!/bin/sh
|# suspend to disk (hybernation) when the power button has been pressed 
|# echo "power-button-event" | wall
|echo mem > /sys/power/state

-- Gerhard

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

end of thread, other threads:[~2006-02-11 10:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-07  6:52 EC interrupt mode by default breaks power button and lid button Yu, Luming
2006-02-07 14:08 ` Gerhard Schrenk
  -- strict thread matches above, loose matches on Subject: below --
2006-02-09  1:29 Yu, Luming
2006-02-10  5:14 ` Gerhard Schrenk
2006-02-06  7:37 Yu, Luming
2006-02-06  7:37 ` Jiri Slaby
2006-02-06 13:34 ` Gerhard Schrenk
2006-02-05 18:04 Gerhard Schrenk

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

all inboxes | Powered by JetHome®