Alex Cruise wrote:
>
> Mine displays a similar failure, except my strace shows:
>
> ioctl(3, APM_IOC_SUSPEND, 0 ) = -1 EAGAIN (Resource temporarily
> unavailable)
>
> I also noticed (as reported by a previous poster) that whether you pass
> "apm=on" or "apm=off" to the kernel, apm gets disabled. When you don't
> specify a setting, it's enabled. I had a look at the arch/i386/kernel/apm.c
> in 2.4.10 though, and it seemed to make sense.
Verified here.
APM doesn't install if apm=on or apm=off is used in 2.4.10.
Here's a small patch for it. With this patch, apm thread,
/proc/apm, misc apm_bios device etc. are created.
~Randy
--------------C95A95DEE71560DBD8E4C7B1
Content-Type: text/plain; charset=us-ascii;
name="apmonoff.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="apmonoff.patch"
--- linux/arch/i386/kernel/apm.c.org Mon Sep 17 22:52:35 2001
+++ linux/arch/i386/kernel/apm.c Thu Sep 27 13:15:33 2001
@@ -1672,7 +1672,7 @@
apm_info.realmode_power_off = 1;
/* User can override, but default is to trust DMI */
if (apm_disabled != -1)
- apm_info.disabled = 1;
+ apm_info.disabled = apm_disabled;
/*
* Fix for the Compaq Contura 3/25c which reports BIOS version 0.1
@@ -1699,8 +1699,7 @@
}
if (apm_info.disabled) {
- if(apm_disabled == 1)
- printk(KERN_NOTICE "apm: disabled on user request.\n");
+ printk(KERN_NOTICE "apm: disabled on user request.\n");
return -ENODEV;
}
if ((smp_num_cpus > 1) && !power_off) {
--------------C95A95DEE71560DBD8E4C7B1--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/