Laptop battery life on FreeBSD

Shawn Badger shawnbadger at gmail.com
Tue Jan 27 22:33:26 PST 2009


   Bruce Cran wrote:

On Tue, 27 Jan 2009 16:19:31 -0700
Shawn Badger [1]<shawnbadger at gmail.com> wrote:



Hi, I recently installed FreeBSD 7.1 on my laptop, replacing Arch
Linux and I noticed a significant drop in my battery life (from ~3
hours to ~1.5 hours).  I realize that Linux has their "tickless"
kernel, which I am sure explains the difference, but my question
is...  is there anything I can do in FreeBSD right now to improve
this?  And is there going to be any work done the kernel to allow the
hardware to enter into a low-power state for an extended period of
time?

My laptop is an Acer Travelmate 4100 which has the following hardware:
   - Pentium M 1.6 GHz processer
  - 2 GB RAM
  - integrated video/sound
  - 802.11bg / bluetooth

I'm somewhat of a minimalist and don't use X11.  I've disabled the
bluetooth adapter, but frequently use my wireless adapter (intel
pro/2200bg).  Does anyone have any suggestions that could potentially
extend my battery life?


powerd isn't run by default, so the laptop will always be running at
maximum frequency.  By putting powerd_enable="YES" in /etc/rc.conf the
CPU will throttle back whenever the system is idle.


You can also tell FreeBSD to enter lower Cx states when idle by
setting dev.cpu.x.cx_lowest, if it's supported.  For example my VIA
EPIA system has the following dev.cpu tree:



sysctl dev.cpu


dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 533
dev.cpu.0.freq_levels: 533/-1 266/-1
dev.cpu.0.cx_supported: C1/0 C2/90 C3/900
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00%



   My processor now throttles down to 100 MHz when idle and my fan no
   longer blows like crazy - this is exactly what I was hoping for.
   Thanks,
   Shawn

References

   1. mailto:shawnbadger at gmail.com


More information about the freebsd-questions mailing list