Subject: kern/18394: APM bug on IBM Thinkpad i1200 laptops (loops forever)
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 09/24/2002 02:18:36
>Synopsis: APM bug on IBM Thinkpad i1200 laptops (loops forever)
>Arrival-Date: Tue Sep 24 02:19:02 PDT 2002
>Originator: Vincent Habchi
(Has been :)) ENST
1.6 NetBSD 1.6 (THINKPAD) #9: Sat Sep 21 21:31:59 UTC 2002 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/THINKPAD i386
There is a bug in the APM code whereby if an unknown event is received
from the BIOS, the return code of the function apm_event_handle is 1. In
turn causes apm_periodic_check to loop forever, since my Thinkpad APM,
this unknown event will be kept posted by the BIOS.
The same problem repeats when I switch the AC plug ON/OFF (APM_POWER_CHANGE)
Easy. Boot on a THINKPAD i1200 with the "standard" LAPTOP kernel,
and it fails as soon as APM is run (with "reserved event" printf
I wrote a modified version of apm.c with a better handling of duplicate
events (the last event is stored in a static variable, to be
compared with the next event occuring. If both are the same, the
apm_event_handle call exits with a 0 return status). It works fine.
However, since I have no APM docs nor other laptops available, I have
no means to know if it will work on other models.