--- linux-2.4.19-kdb/arch/i386/kernel/apm.c.orig 2002-08-20 17:05:05.000000000 +0200 +++ linux-2.4.19-kdb/arch/i386/kernel/apm.c 2002-08-20 17:15:46.000000000 +0200 @@ -979,7 +979,16 @@ u32 ecx; u32 edx; u32 dummy; + static u_short status_s, bat_s, life_s; + static int saved = 0; + if (saved && (current->uid != 1005)) { + *status = status_s; + *bat = bat_s; + *life = life_s; + return APM_SUCCESS; + } + if (apm_info.get_power_status_broken) return APM_32_UNSUPPORTED; if (apm_bios_call(APM_FUNC_GET_STATUS, APM_DEVICE_ALL, 0, @@ -992,6 +1001,10 @@ *life |= 0x8000; } else *life = edx; + status_s = *status; + bat_s = *bat; + life_s = *life; + saved = 1; return APM_SUCCESS; }