From owner-freebsd-mobile@FreeBSD.ORG Sun Mar 9 07:41:49 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B37106566C for ; Sun, 9 Mar 2008 07:41:49 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8E18FC15 for ; Sun, 9 Mar 2008 07:41:46 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id SAA25118; Sun, 9 Mar 2008 18:41:36 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sun, 9 Mar 2008 18:41:35 +1100 (EST) From: Ian Smith To: Kevin Oberman In-Reply-To: <20080309020611.D0DCD4500F@ptavv.es.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad x61s X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2008 07:41:49 -0000 On Sat, 8 Mar 2008, Kevin Oberman wrote: > > Date: Sat, 8 Mar 2008 00:33:40 +0100 > > From: Guy Brand > > Sender: owner-freebsd-mobile@freebsd.org > > > > Dan Langille (dan@langille.org) on 04/03/2008 at 07:34 wrote: > > > > > Are you running FreeBSD on a ThinkPad x61s? Details please... > > > > I do. > > > > FreeBSD FreeBSD 8.0-CURRENT #58: Sun Mar 2 17:36:43 CET 2008 > > snd_hda, acpi_ibm, if_wpi for hardware specific support. Xorg > > 7.3 working out of the box. cpufreq behaves strangely going > > from AC power to battery mode and back, so I removed it from > > the kernel config. Fan and thermal controls are fine. 6-cell > > battery provides ca. 260 mn of work time. > > My experience is that you want to remove cpufreq on any newer > ThinkPad. My T43 "works" with CPUFREQ, but behaves very strangely. > Without it I see: > dev.cpu.0.freq_levels: 2000/27000 1750/23625 1600/22600 1400/19775 1333/19666 1166/17207 1066/16733 932/14641 800/13800 700/12075 600/10350 500/8625 400/6900 300/5175 200/3450 100/1725 If I'm not mistaken, these are generated from ACPI tables in the absence of est/p4tcc (or whatever cpufreq drivers are appropriate) taking over. Does your dmesg without cpufreq show acpi_perf? > Without it, (Your correction noted) > With it, > I no longer see any energy values (all show '0') and going > on/off battery sometimes does not switch powerd properly. Also the > system will automatically drop the maximum speed to 800 MHz when on > battery. Why 800MHz, I wonder? Maybe that's falling back to a BIOS setting? > This all happens without cpufreq. What values do you have for these (defaults from /etc/defaults/rc.conf)? performance_cx_lowest="HIGH" # Online CPU idle state performance_cpu_freq="HIGH" # Online CPU frequency economy_cx_lowest="HIGH" # Offline CPU idle state economy_cpu_freq="HIGH" # Offline CPU frequency The thing you've both noted about switching from AC to battery and back is likely /etc/rc.d/power_profile, using the above variables, fighting with powerd's notion of what cpu freq should be set according to load, which causes momentary variations on switching AC/battery profiles unless {performance,economy}_cpu_freq are set to "NONE". The default economy_ values were changed some time ago from "LOW" due to problems, I suspect because modern processors can go so slow like your 100MHz, even 75MHz, unless deliberately overridden with a higher minimum value to remove the lower speed entries from dev.cpu.0.freq_levels As this appears quite common, and poorly/un documented, I'm starting to wonder whether power_profile ought to specifically check if powerd is running before messing with dev.cpu.0.freq at all? I don't think that switching _cx_lowest causes any similar strange effects, and freq switch is just momentary until powerd reasserts itself, but it freaks people :) Thoughts? cheers, Ian