ThinkPad x61s

Ian Smith smithi at nimnet.asn.au
Sun Mar 9 07:41:49 UTC 2008


On Sat, 8 Mar 2008, Kevin Oberman wrote:
 > > Date: Sat, 8 Mar 2008 00:33:40 +0100
 > > From: Guy Brand <gb at isis.u-strasbg.fr>
 > > Sender: owner-freebsd-mobile at freebsd.org
 > > 
 > > Dan Langille (dan at 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



More information about the freebsd-mobile mailing list