From owner-freebsd-acpi@FreeBSD.ORG Wed Oct 17 09:11:10 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A658FC8C; Wed, 17 Oct 2012 09:11:10 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id EAA778FC14; Wed, 17 Oct 2012 09:11:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id q9H9AR6c087933; Wed, 17 Oct 2012 20:10:27 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 17 Oct 2012 20:10:27 +1100 (EST) From: Ian Smith To: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= Subject: Re: x220 notes In-Reply-To: Message-ID: <20121017173848.U88114@sola.nimnet.asn.au> References: <4E836C06.9070405@gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <4F7DAAB0.2010206@gmail.com> <4F7E2D5C.3020506@gmail.com> <4F7F9504.1030405@gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 09:11:10 -0000 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