Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2012 20:10:27 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= <nm.knife@gmail.com>
Cc:        freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org
Subject:   Re: x220 notes
Message-ID:  <20121017173848.U88114@sola.nimnet.asn.au>
In-Reply-To: <CAHi1Jse0oxb-0HH1acPU7VKK2p8bCF7CrfW7Ybi%2BEK1r3hW0zQ@mail.gmail.com>
References:  <4E836C06.9070405@gmail.com> <CAHi1Jsf9QhA%2BrcMSEt7egHsYtAv7j47jx-XN7_5CzdFfv4N9WQ@mail.gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <CAHi1Jse2Hk3hkg9UF%2BSu%2BwrsrwnddhF%2BhqfYAvkKdHnrvWHQZQ@mail.gmail.com> <4F7DAAB0.2010206@gmail.com> <CAHi1Jsd-vAMXwe_HKTuFxEN3egpbAOT7b9krZy46jP_kBdLZ9Q@mail.gmail.com> <4F7E2D5C.3020506@gmail.com> <CAHi1JsfRQj2MRWtvhuEf_c5DF3306g1M20aef-crF_HY9cOPbQ@mail.gmail.com> <CAN6yY1suoEXwXf3vdAXSMr=tbbqB=pTkisA55CUMDj--tt4nrA@mail.gmail.com> <CAHi1Jsfj9=7_Sm8DXvu7aLqixTitv628CZWADh5cf2rgJKcfVg@mail.gmail.com> <CAHi1JsczUOuuKjVg4xhOLy4cz32ya2ahA6e56yaMaNdDgP7i6g@mail.gmail.com> <4F7F9504.1030405@gmail.com> <CAHi1JscbmOUDDJ4FH7VwJOjKLeNDxFJePt1Zvi8jOdYwa1vzxw@mail.gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <CAHi1JseEEqxi-gwV1SKYenyfBpmaZEEnjL6=R1bjYjkfd8saTQ@mail.gmail.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> <CAHi1Jse0oxb-0HH1acPU7VKK2p8bCF7CrfW7Ybi%2BEK1r3hW0zQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121017173848.U88114>