x220 notes

Ian Smith smithi at nimnet.asn.au
Wed Oct 17 09:11:10 UTC 2012


On Tue, 16 Oct 2012, ??????? ???????? wrote:

 > I set a lower light (5-6) during BIOS boot, and if needed I modify manually
 > in X. I monitored my CPU usage and did notice that the CPU takes its sweet
 > time to lower the frequency (Windows keeps the frequency the same 99.67,
 > but changes the multiplier from 8 to 32). I don't know if FreeBSD does that
 > or it only manipulates the frequency. The multiplier makes more sense.
 > Also, CPU cores in X stay at 50C. In Windows at no activicy they drop to
 > 44C and if no strenuous activity for a while, to 40C.
 > 
 > It would be great if FreeBSD could downgrade the frequency faster upon no
 > load. I use this:
 > powerd_flags="-a hiadaptive -b adaptive -i 85 -r 60 -p 100"

powerd(8) says:
     Adaptive mode attempts to strike a balance by degrading performance when
     the system appears idle and increasing it when the system is busy.  It
     offers a good balance between a small performance loss for greatly
     increased power savings.  Hiadaptive mode is like adaptive mode, but
     tuned for systems where performance and interactivity are more important
     than power consumption.  It increases frequency faster, reduces the fre-
     quency less aggressively and will maintain full frequency for longer.

So you want to use adaptive rather than hiadaptive, as power consumption 
is more important to you.  Also, -i probably should be lower than -r, as 
when load is less than 85% it will decrease frequency, but if it's then 
still higher than 60% powerd might kick it up again.  After experiments 
I wound up using "-a adp -b adp -i 50 -r 80 -p 200" which is nearer the 
defaults, but mine is only a two-speed P3 and not so indicative for you.

Best way is likely to stop powerd (service powerd stop) then run 'powerd 
-v ..' in a root terminal - maybe using script(1) to record results - 
and watch it dance under various sorts of load, with different -i and -r 
parameters.  You will clearly see the difference between adp and hadp.

 > I am always looking for the "perfect" FreeBSD laptop, but I guess it just
 > doesn't exist. And I do need my 7-8 hours of battery with wireless on. If
 > you guys have any suggestions on further optimizing the power usage and
 > automating the regulation, please let me know (like turning off and on USB
 > devices, spinning down the HDD, etc), also if you know about controlling
 > the multiplier instead of the frequency.

Adrian, true to form, has pounced on your wireless :)

I'm not a fan of spinning down HDs myself; if you do, you need to watch 
out for the dreaded Load Cycle Count issue (see ataidle(8)), and things 
like cron tasks that may spin it back up frequently.  This and very much 
more information on power saving by Alexander Motin - who most recently 
updated powerd and added eventtimers(4) to 9.X - in his excellent guide:

 http://wiki.freebsd.org/TuningPowerConsumption

As for the multiplier thing, it depends on which cpufreq(4) drivers your 
system is using.  If it's a Core 2 Duo or i{5,7}, then both voltage and 
frequency are controlled, frequency by changing multiplier I assume; you 
should look at the code used by your processor.  Also, don't miss advice 
there and elsewhere to disable throttling and just use est cpufreq(4) 
drivers, and for using C states to advantage.  Before and after doing 
all that, compare differences for:

% sysctl dev.cpu.0.freq_levels
% sysctl dev.cpu |grep cx

cheers, Ian


More information about the freebsd-mobile mailing list