--- apm.c.bor Tue Dec 18 20:30:08 2001 +++ apm.c Tue Dec 18 20:42:24 2001 @@ -1381,13 +1381,18 @@ */ if (apm_do_idle() != -1) { unsigned long start = jiffies; + unsigned long before; while ((!exit_kapmd) && system_idle()) { - if (apm_do_idle()) { + before = jiffies; + if (apm_do_idle() || (jiffies == before && !current->need_resched)) { set_current_state(TASK_INTERRUPTIBLE); /* APM needs us to snooze .. either the BIOS call failed (-1) or it slowed the clock (1). We sleep - until it talks to us again */ + until it talks to us again. + If clock did not advance CPU was + not halted by BIOS so we do it + now*/ schedule_timeout(1); } if ((jiffies - start) > APM_CHECK_TIMEOUT) {