Fighting for the power.

Lucius Windschuh lwindschuh at
Mon May 4 18:40:42 UTC 2009

2009/5/4 Alexander Motin <mav at>:
> I would like to summarize some of my knowledge on reducing FreeBSD power
> consumption and describe some new things I have recently implemented in
> 8-CURRENT. The main character of this story is my 12" Acer TravelMate
> 6292 laptop with C2D T7700 2.4GHz CPU, 965GM chipset and SATA HDD, under
> amd64 8-CURRENT.

First, thank you for your report about power saving on current laptops. :-)

> 1. CPU
> [...]
>  - C3 state allows CPU completely stop all internal clocks, reduce
> voltage and disconnect from system bus. This state gives additional
> power saving effect, but it is not cheap and require trade-offs.
> As soon as CPU is completely stopped in C3 state, local APIC timers in
> each CPU core, used by FreeBSD as event sources on SMP, are not
> functioning. It stops system time, breaks scheduling that makes system
> close to dead. The only solution for this problem is to use some
> external timers. Originally, before SMP era, FreeBSD used i8254 (for HZ)
> and RTC (for stats) chipset timers. I have made changes to 8-CURRENT to
> resurrect them for SMP systems. To use them, you can disable local APIC
> timers by adding to /boot/loader.conf:
> hint.apic.0.clock=0

I tried this on CURRENT at r191784 (i386) on a Thinkpad T400 (Intel(R)
Core(TM)2 Duo CPU T9400) with INVARIANTS, etc. enabled.
The result was a panic shortly before /sbin/init is called:

panic: lapic1: zero divisor

So, the KASSERT in sys/i386/local_apic.c:325 fired:
    KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",

Did I forget something?

My /boot/loader.conf:

kernel config:



More information about the freebsd-current mailing list