Messages in this thread Patch in this message |  | | Date | Thu, 27 Sep 2001 13:36:25 -0700 | From | "Randy.Dunlap" <> | Subject | Re: apm suspend broken in 2.4.10 |
| |
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--- 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) { |  |