Re: aic7xxx + apmbios

Rik Faith (faith@cs.unc.edu)
Mon, 11 Mar 1996 10:44:25 -0500


On Mon 11 Mar 1996 08:10:14 +0100,
Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> wrote:
> bash# cat /proc/apm
> 0.8 1.1 0x03 0x01 0xff 0xff 65535% -1 ?
> bash# uname -a
> Linux sirius 1.3.71 #2 Sat Mar 9 22:37:21 MET 1996 i586
> bash#
[...]
> static char * apm_event_name[] =3D {
> @@ -926,9 +928,9 @@
> if (!(error =3D apm_get_power_status(&bx, &cx, &dx))) {
> ac_line_status =3D (bx >> 8) & 0xff;
> battery_status =3D bx & 0xff;
> - if ((cx & 0xff) !=3D 0xff)
> - percentage =3D cx & 0xff;
> -
> + percentage =3D cx & 0xff;
> + if (percentage > 100)
> + percentage =3D 100;

I'm going to change this in some other way, since the problem is with
signed vs. unsigned integers.

Since your machine doesn't have a battery, this should return -1%, which
the apmd utilities that I wrote should report as unavailable.

> Also I've found out that with the configuration
> CONFIG_APM=3Dy
> # CONFIG_APM_IGNORE_USER_SUSPEND is not set
> # CONFIG_APM_DO_ENABLE is not set
> CONFIG_APM_CPU_IDLE=3Dy
> CONFIG_APM_DISPLAY_BLANK=3Dy
>
> I get a message from the kernel:
> [...]
> kernel: APM BIOS version 1.1 Flags 0x03 (Driver version 0.8)
> kernel: Entry f000:8030 cseg16 f000 dseg f8a4 cseg len ff63, dseg
> len a0
> kernel: Connection version 1.1
> kernel: AC on line, battery status unknown, battery life unknown
> kernel: battery flag 0xff, battery life unknown
> [...]
> kernel: apm_bios: set display standby: Unrecognized device ID
>
>
> The device in question should be my graphics card (ATI Graphics Ultra
> Pro Turbo (Mach64)) which is also known as (/proc/pci):

Hmm. I don't know if the APM stuff is supposed to be doing this or if this
is supposed to use some VESA standard for green monitors. I'll look in the
APM manual when I get home, but I doubt it will help. If anyone knows for
sure how APM and the VESA power saving protocol is supposed to work, or can
point me toward appropriate documentation, please let me know. In the mean
time, I will update the "make config" documentation to reflect this
situation.