Andrej Borsenkow wrote:
> Just to add my voice to reports. It did it in 2.4.5-3mdk and stopped now -
> it just sits there with "Power off" message.
>
> HW - ASUS CUSL2 motherboard (i815e).
>
There is a configuration change and a bug in apm.c. First, this kernel
(for whatever reason) defines CONFIG_APM_REAL_MODE_POWER_OFF. This never
worked on my system. Unfotunately, the bug in apm.c prevented it from
being reset with apm=no-real-mode-poweroff. apm_setup directly changed
apm_info.real_mode_poweroff, but it was then overwritten in apm_init.
So, you could *enable* it if default was off, but could not *disable* it
if default was on.
May I ask why kernel now defaults to real mode power off? It seems to
not work for most people.
Patch to apm.c attached.
-andrej
BTW apm_setup looks vey funny - code seems to be duplicated. And what is
this warning about "obsolete" - there is no code to check for "realmode"
anywhere.
--- arch/i386/kernel/apm.c.old Wed Jun 13 14:43:06 2001
+++ arch/i386/kernel/apm.c Sat Jun 16 20:20:17 2001
@@ -1590,7 +1590,7 @@
apm_info.get_power_status_broken = 1;
if ((strncmp(str, "realmode-power-off", 18) == 0) ||
(strncmp(str, "realmode_power_off", 18) == 0))
- apm_info.realmode_power_off = 1;
+ realmode_power_off = 1;
invert = (strncmp(str, "no-", 3) == 0);
if (invert)
str += 3;
@@ -1605,7 +1605,7 @@
if (!strncmp(str, "real-mode-poweroff",18)) {
printk(KERN_WARNING "apm: <real-mode-poweroff> is obsolete");
printk(KERN_WARNING "apm: use <realmode> instead");
- apm_info.realmode_power_off = !invert;
+ realmode_power_off = !invert;
}
str = strchr(str, ',');
if (str != NULL)