Skip to contentSkip to conversation

ACPI: kbd-pw-on/WOL don't work anymore since 2.4.14

PATCH In review Mario 'BitKoenig' Holbe 2 participants 3 messages Mar 10, 2002 – Mar 12, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: kbd-pw-on/WOL don't work anymore since 2.4.14

Hello,

since I didn't notice any change about the fact, that since 2.4.14 kernel, after issuing 'halt', the Keyboard Power-ON and Wake-On-LAN don't work anymore on my ASUS P3B-F, which I reported Thu, 15 Nov 2001 18:43:22 +0100 here on this list, I wrote a small patch to fix this myself.

The patch does nothing else than suppressing the clearing of the General Purpose Events (GPEs).

Thanks to Patrick Mochel, who explained me, what was changed between 2.4.13 and 2.4.14 regarding my problem.

The patch applies to 2.4.14 up to 2.4.18 at least.

With this patch applied and CONFIG_ACPI_NO_GPE_DISABLE #define'd, Keyboard-Power-ON as well as Wake-On-LAN are working for me, without this patch or with CONFIG_ACPI_NO_GPE_DISABLE #undef'ined, both don't work.

Of course, there would be better ways to dynamically change this behaviour (via some kernel option for example), but the way the patch goes, was the least invasive one for me.

I have no idea about possible side-effects of suppressing the execution of acpi_hw_disable_non_wakeup_gpes(), but i'd like to hear about them, if there are any.

If there are no (relevant) side-effects, I'd be happy, if you'd consider applying it to 2.4.19 or something like that.

And yes, I did notice, that acpi_hw_disable_non_wakeup_gpes() should disable *non-wakeup* GPEs, but however - at least for me it disables more than them :)

PS: I'm not member on the linux-kernel@ list, so please CC me in
replies, thanks.

regards,
Mario

Signature · 3 lines
[mod_nessus for iauth]
<delta> "scanning your system...found depreciated OS...found
        hole...installing new OS...please reboot and reconnect now"
Documentation/Configure.help +6 -0
diff -ur kernel-source-2.4.14.orig/Documentation/Configure.help kernel-source-2.4.14/Documentation/Configure.help
@@ -14727,6 +14727,12 @@
   This driver handles overheating conditions on laptops. It is HIGHLY
   recommended, as your laptop CPU may be damaged without it.
 
+ACPI Dont disable GPE events
+CONFIG_ACPI_NO_GPE_DISABLE
+  Normally we disable all GPE events when we enter a system sleep state.
+  If you experience, that your Keyboard-Power-ON or other Wakeup
+  methods don't work anymore, try setting this to Y. Otherwise, say N.
+  
 Advanced Power Management BIOS support
 CONFIG_APM
   APM is a BIOS specification for saving power using several different
drivers/acpi/Config.in +1 -0
diff -ur kernel-source-2.4.14.orig/drivers/acpi/Config.in kernel-source-2.4.14/drivers/acpi/Config.in
@@ -14,4 +14,5 @@
 dep_tristate '      Embedded Controller' CONFIG_ACPI_EC $CONFIG_ACPI_BUSMGR $CONFIG_ACPI
 dep_tristate '      Control Method Battery' CONFIG_ACPI_CMBATT $CONFIG_ACPI_BUSMGR $CONFIG_ACPI $CONFIG_ACPI_EC
 dep_tristate '      Thermal' CONFIG_ACPI_THERMAL $CONFIG_ACPI_BUSMGR $CONFIG_ACPI  $CONFIG_ACPI_EC
+dep_bool     '      Dont disable GPE events' CONFIG_ACPI_NO_GPE_DISABLE $CONFIG_ACPI
 #endmenu
drivers/acpi/hardware/hwsleep.c +2 -0
diff -ur kernel-source-2.4.14.orig/drivers/acpi/hardware/hwsleep.c kernel-source-2.4.14/drivers/acpi/hardware/hwsleep.c
@@ -171,7 +171,9 @@
 
 	disable ();
 
+#ifndef CONFIG_ACPI_NO_GPE_DISABLE
 	acpi_hw_disable_non_wakeup_gpes();
+#endif /* CONFIG_ACPI_NO_GPE_DISABLE */
 
 	PM1Acontrol = (u16) acpi_hw_register_read (ACPI_MTX_LOCK, PM1_CONTROL);
 
#1 lore raw

Hi!

Quoted 4 lines

With this patch applied and CONFIG_ACPI_NO_GPE_DISABLE #define'd, Keyboard-Power-ON as well as Wake-On-LAN are working for me, without this patch or with CONFIG_ACPI_NO_GPE_DISABLE #undef'ined, both don't work.

I guess this needs to be runtime-configurable at least. It is probably bug. Introducing the config option is not right fix.
Pavel

Signature · 2 lines
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
#2 lore raw
In reply to Mario 'BitKoenig' Holbe
Quoted 2 lines · Pavel Machek

I guess this needs to be runtime-configurable at least. It is probably bug. Introducing the config option is not right fix.

Yes, you are right.
But as I told: It was the least invasive method for me.

Applying it as a config option, would include adding a MODULE_PARM section, which doesn't exist yet (not for me, I have ACPI compiled into the kernel, but to keep it consistent even if compiled as module). I'm not *that* proof with linux kernel source to guarantee side-effect-freeness and so on.

This part I'd like to leave for developers knowing better, what they're doing :)

However, if someone of the ACPI developers or someone of the patch-acceptors (:)) tells me 'do it, we'll patch it in', I'll do it.
If it has no chance to get in, I wont do it - for me myself, my patch is quite enough :)

thanks for your response & regards,
Mario

Signature · 4 lines
Mario 'BitKoenig' Holbe <[email protected]>

"Why are we hiding from the police, daddy?"      | J. E. Guenther
"Because we use SuSE son, they use SYSVR4."      | de.alt.sysadmin.recovery