<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Petermartin</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Petermartin"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Petermartin"/>
	<updated>2026-05-06T19:11:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31203</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31203"/>
		<updated>2007-07-13T00:31:01Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Sleep and Hibernate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work (see below).  It went very smoothly -- only had to answer one relevant question:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is '''much''' easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Different {{T42}} models have different wireless cards -- but this card, the Intel PRO/Wireless 2200BG, needs the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], which installed by default, is taking care of all the networking whatnot just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb]; and then added the '''ibm_acpi''' and '''nvram''' to the list of modules to be loaded at boot time:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;ibm_acpi&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;nvram&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The '''force''' option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
At this point the sleep button worked, and the hibernate button did something -- namely, induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, doing simply {{cmdroot|modprobe -r e1000}} caused the machine to hang.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], '''even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}'''.  {{HELP|Any ideas why MODULES_WHITELIST doesn't work?}}  Perhaps the best thing to do about this would be to compile a new kernel with the newest version of e1000?  Instead, since everything seems to work fine without unloading any modules, I just turned off the modules-unload script by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==CPU Frequency Scaling==&lt;br /&gt;
&lt;br /&gt;
I've found the gnome CPU frequency scaling monitor to be useful, to see if things are working.  This was installed by default; to view it, right-click on the panel and follow '''Add to panel...'''.  To get it to work, it needs to be installed SUID root.  I had to do:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|dpkg-reconfigure gnome-applets}}&lt;br /&gt;
&lt;br /&gt;
and answer *yes*.  (*note:* you should probably pay attention to the warning it gives!)&lt;br /&gt;
&lt;br /&gt;
[[How_to_make_use_of_Dynamic_Frequency_Scaling|This page]] says that the '''acpi-cpufreq''' module is the best one.  This doesn't work on my system; rather, I've used the '''speedstep-centrino''' module.  So, if the following modules aren't already loaded by default, the {{path|/etc/modules}} file should also have the following lines:&lt;br /&gt;
&lt;br /&gt;
   battery&lt;br /&gt;
   ac&lt;br /&gt;
   thermal&lt;br /&gt;
   processor&lt;br /&gt;
   speedstep-centrino&lt;br /&gt;
   cpufreq_conservative&lt;br /&gt;
   cpufreq_ondemand&lt;br /&gt;
   cpufreq_userspace&lt;br /&gt;
   cpufreq_powersave&lt;br /&gt;
   cpufreq_stats&lt;br /&gt;
&lt;br /&gt;
To set your default, you can edit {{path|/etc/default/cpufreq}}.  Mine looks like:&lt;br /&gt;
&lt;br /&gt;
   ENABLE=&amp;quot;true&amp;quot;&lt;br /&gt;
   GOVERNOR=&amp;quot;conservative&amp;quot;&lt;br /&gt;
   MAX_SPEED=1700000&lt;br /&gt;
   MIN_SPEED=600000&lt;br /&gt;
&lt;br /&gt;
As mentioned in [[How_to_make_use_of_Dynamic_Frequency_Scaling|this page]], I also changed my BIOS settings to &amp;quot;maximum performance&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31202</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31202"/>
		<updated>2007-07-13T00:27:12Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Wireless */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work (see below).  It went very smoothly -- only had to answer one relevant question:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is '''much''' easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Different {{T42}} models have different wireless cards -- but this card, the Intel PRO/Wireless 2200BG, needs the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], which installed by default, is taking care of all the networking whatnot just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb] and told it to load the ibm_acpi and nvram modules:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;ibm_acpi&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;nvram&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The '''force''' option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
Now the sleep button worked, and the hibernate button did something -- it induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, if I do {{cmdroot|modprobe -r e1000}}, the machine '''freezes'''.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], '''even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}'''.  {{HELP|Any ideas why WHITELIST doesn't work?}}  The best thing to do about this would be to compile a new kernel with the newest version of e1000...}} but instead, I just turned off the modules-unload script, since everything seems to work fine without unloading any modules, by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==CPU Frequency Scaling==&lt;br /&gt;
&lt;br /&gt;
I've found the gnome CPU frequency scaling monitor to be useful, to see if things are working.  This was installed by default; to view it, right-click on the panel and follow '''Add to panel...'''.  To get it to work, it needs to be installed SUID root.  I had to do:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|dpkg-reconfigure gnome-applets}}&lt;br /&gt;
&lt;br /&gt;
and answer *yes*.  (*note:* you should probably pay attention to the warning it gives!)&lt;br /&gt;
&lt;br /&gt;
[[How_to_make_use_of_Dynamic_Frequency_Scaling|This page]] says that the '''acpi-cpufreq''' module is the best one.  This doesn't work on my system; rather, I've used the '''speedstep-centrino''' module.  So, if the following modules aren't already loaded by default, the {{path|/etc/modules}} file should also have the following lines:&lt;br /&gt;
&lt;br /&gt;
   battery&lt;br /&gt;
   ac&lt;br /&gt;
   thermal&lt;br /&gt;
   processor&lt;br /&gt;
   speedstep-centrino&lt;br /&gt;
   cpufreq_conservative&lt;br /&gt;
   cpufreq_ondemand&lt;br /&gt;
   cpufreq_userspace&lt;br /&gt;
   cpufreq_powersave&lt;br /&gt;
   cpufreq_stats&lt;br /&gt;
&lt;br /&gt;
To set your default, you can edit {{path|/etc/default/cpufreq}}.  Mine looks like:&lt;br /&gt;
&lt;br /&gt;
   ENABLE=&amp;quot;true&amp;quot;&lt;br /&gt;
   GOVERNOR=&amp;quot;conservative&amp;quot;&lt;br /&gt;
   MAX_SPEED=1700000&lt;br /&gt;
   MIN_SPEED=600000&lt;br /&gt;
&lt;br /&gt;
As mentioned in [[How_to_make_use_of_Dynamic_Frequency_Scaling|this page]], I also changed my BIOS settings to &amp;quot;maximum performance&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31201</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31201"/>
		<updated>2007-07-13T00:24:49Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work (see below).  It went very smoothly -- only had to answer one relevant question:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is '''much''' easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Note that different {{T42}} models have different wireless cards -- but mine, the Intel PRO/Wireless 2200BG need the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], installed by default, is taking care of everything just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb] and told it to load the ibm_acpi and nvram modules:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;ibm_acpi&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;nvram&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The '''force''' option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
Now the sleep button worked, and the hibernate button did something -- it induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, if I do {{cmdroot|modprobe -r e1000}}, the machine '''freezes'''.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], '''even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}'''.  {{HELP|Any ideas why WHITELIST doesn't work?}}  The best thing to do about this would be to compile a new kernel with the newest version of e1000...}} but instead, I just turned off the modules-unload script, since everything seems to work fine without unloading any modules, by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==CPU Frequency Scaling==&lt;br /&gt;
&lt;br /&gt;
I've found the gnome CPU frequency scaling monitor to be useful, to see if things are working.  This was installed by default; to view it, right-click on the panel and follow '''Add to panel...'''.  To get it to work, it needs to be installed SUID root.  I had to do:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|dpkg-reconfigure gnome-applets}}&lt;br /&gt;
&lt;br /&gt;
and answer *yes*.  (*note:* you should probably pay attention to the warning it gives!)&lt;br /&gt;
&lt;br /&gt;
[[How_to_make_use_of_Dynamic_Frequency_Scaling|This page]] says that the '''acpi-cpufreq''' module is the best one.  This doesn't work on my system; rather, I've used the '''speedstep-centrino''' module.  So, if the following modules aren't already loaded by default, the {{path|/etc/modules}} file should also have the following lines:&lt;br /&gt;
&lt;br /&gt;
   battery&lt;br /&gt;
   ac&lt;br /&gt;
   thermal&lt;br /&gt;
   processor&lt;br /&gt;
   speedstep-centrino&lt;br /&gt;
   cpufreq_conservative&lt;br /&gt;
   cpufreq_ondemand&lt;br /&gt;
   cpufreq_userspace&lt;br /&gt;
   cpufreq_powersave&lt;br /&gt;
   cpufreq_stats&lt;br /&gt;
&lt;br /&gt;
To set your default, you can edit {{path|/etc/default/cpufreq}}.  Mine looks like:&lt;br /&gt;
&lt;br /&gt;
   ENABLE=&amp;quot;true&amp;quot;&lt;br /&gt;
   GOVERNOR=&amp;quot;conservative&amp;quot;&lt;br /&gt;
   MAX_SPEED=1700000&lt;br /&gt;
   MIN_SPEED=600000&lt;br /&gt;
&lt;br /&gt;
As mentioned in [[How_to_make_use_of_Dynamic_Frequency_Scaling|this page]], I also changed my BIOS settings to &amp;quot;maximum performance&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31158</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31158"/>
		<updated>2007-07-11T19:28:04Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work(see below).  It went very smoothly -- only had two answer two questions:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
*{{cmdresult | GRUB install in MBR?}} -&amp;gt; yes.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is '''much''' easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Note that different {{T42}} models have different wireless cards -- but mine, the Intel PRO/Wireless 2200BG need the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], installed by default, is taking care of everything just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb] and told it to load the ibm_acpi and nvram modules:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;ibm_acpi&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;nvram&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The '''force''' option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
Now the sleep button worked, and the hibernate button did something -- it induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, if I do {{cmdroot|modprobe -r e1000}}, the machine '''freezes'''.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], '''even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}'''.  {{HELP|Any ideas why WHITELIST doesn't work?}}  The best thing to do about this would be to compile a new kernel with the newest version of e1000...}} but instead, I just turned off the modules-unload script, since everything seems to work fine without unloading any modules, by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==CPU Frequency Scaling==&lt;br /&gt;
&lt;br /&gt;
I've found the gnome CPU frequency scaling monitor to be useful, to see if things are working.  This was installed by default; to view it, right-click on the panel and follow '''Add to panel...'''.  To get it to work, it needs to be installed SUID root.  I had to do:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|dpkg-reconfigure gnome-applets}}&lt;br /&gt;
&lt;br /&gt;
and answer *yes*.  (*note:* you should probably pay attention to the warning it gives!)&lt;br /&gt;
&lt;br /&gt;
[[How_to_make_use_of_Dynamic_Frequency_Scaling|This page]] says that the '''acpi-cpufreq''' module is the best one.  This doesn't work on my system; rather, I've used the '''speedstep-centrino''' module.  So, if the following modules aren't already loaded by default, the {{path|/etc/modules}} file should also have the following lines:&lt;br /&gt;
&lt;br /&gt;
   battery&lt;br /&gt;
   ac&lt;br /&gt;
   thermal&lt;br /&gt;
   processor&lt;br /&gt;
   speedstep-centrino&lt;br /&gt;
   cpufreq_conservative&lt;br /&gt;
   cpufreq_ondemand&lt;br /&gt;
   cpufreq_userspace&lt;br /&gt;
   cpufreq_powersave&lt;br /&gt;
   cpufreq_stats&lt;br /&gt;
&lt;br /&gt;
To set your default, you can edit {{path|/etc/default/cpufreq}}.  Mine looks like:&lt;br /&gt;
&lt;br /&gt;
   ENABLE=&amp;quot;true&amp;quot;&lt;br /&gt;
   GOVERNOR=&amp;quot;conservative&amp;quot;&lt;br /&gt;
   MAX_SPEED=1700000&lt;br /&gt;
   MIN_SPEED=600000&lt;br /&gt;
&lt;br /&gt;
As mentioned in [[How_to_make_use_of_Dynamic_Frequency_Scaling|this page]], I also changed my BIOS settings to &amp;quot;maximum performance&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Dynamic_Frequency_Scaling&amp;diff=31157</id>
		<title>How to make use of Dynamic Frequency Scaling</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Dynamic_Frequency_Scaling&amp;diff=31157"/>
		<updated>2007-07-11T19:10:37Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==General==&lt;br /&gt;
Linux supports dynamic frequency scaling for systems with the following processors:&lt;br /&gt;
*[[Intel Mobile Pentium III]]&lt;br /&gt;
*[[Intel Mobile Pentium III-M]]&lt;br /&gt;
*[[Intel Mobile Pentium 4]]&lt;br /&gt;
*[[Intel Mobile Pentium 4-M]]&lt;br /&gt;
*[[Intel Pentium M (Banias)]]&lt;br /&gt;
*[[Intel Pentium M (Dothan)]]&lt;br /&gt;
*[[Intel Core Solo (Yonah)]]&lt;br /&gt;
*[[Intel Core Duo (Yonah)]]&lt;br /&gt;
*[[Intel Core 2 Duo]]&lt;br /&gt;
*Mobile Athlon&lt;br /&gt;
*AMD64&lt;br /&gt;
*Opteron&lt;br /&gt;
&lt;br /&gt;
==Configuring the Kernel==&lt;br /&gt;
===2.4 Kernels===&lt;br /&gt;
There were various frequency scaling implementations in the 2.4 series of kernels. They all were preliminary and a standard was raised with the introduction of the sysfs filesystem in 2.6 kernels. It is recommended to use a 2.6 kernel, if possible.&lt;br /&gt;
&lt;br /&gt;
===2.6 Kernels===&lt;br /&gt;
You need to enable the CPU frequency scaling for your kernel (usually your distros kernel will have this enabled), under {{kernelconf||||CPU Frequency scaling|Power management options (ACPI, APM)|||}}: {{kernelconf|CONFIG_CPU_FREQ|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
If you own a Dothan processor, you need to enable Enhanced SpeedStep functionalities.&lt;br /&gt;
:{{kernelconf|CONFIG_X86_SPEEDSTEP_CENTRINO|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, there seems to be some advocacy of a switch over to &lt;br /&gt;
:{{kernelconf|CONFIG_X86_ACPI_CPUFREQ|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
for controlling speedstep technology. Apparently this newer kernel option is more aware of acpi powersaving that's done in the BIOS. In any case, both {{kernelconf|CONFIG_X86_SPEEDSTEP_CENTRINO|&amp;lt;*&amp;gt;|||||}} and {{kernelconf|CCONFIG_X86_ACPI_CPUFREQ|&amp;lt;*&amp;gt;|||||}} were found to work on a Menrom (Core 2).&lt;br /&gt;
&lt;br /&gt;
You also need to enable governors, if not already done in your distros default kernel:&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_PERFORMANCE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''performance''' CPU governor lets your CPU frequency always to the highest available.&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_POWERSAVE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''powersave''' governor sets the frequency to the lowest available. That's not the best choice for battery lifetime on modern Intel CPU, though (see above).&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_USERSPACE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''userspace''' governor allows you to set the frequency manually, unlike the others. Some [[#Using Frequency Scaling Daemons|frequency scaling daemons]] require this governor to operate correctly.  This is typically the recommended option with older processors like A30p's pIIIm-1200.&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_ONDEMAND|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_CONSERVATIVE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''ondemand''' (available since 2.6.10) and '''conservative''' (since 2.6.12) are governors based on in kernel implementations of CPU scaling algorithms: they scale the CPU frequencies according to the needs (like does the userspace frequency scaling daemons, but in kernel). They differs in the way they scale up and down. The ondemand governor switches to the highest frequency immediately when there is load, while the conservative governor increases frequency step by step. Likewise they behave the other way round for stepping down frequency when the CPU is idle. The conservative governor is good for battery powered environments on AMD64 (but may not work on older ThinkPads like the T21). Ondemand may not work on older laptops without Enhanced SpeedStep due to [http://lists.debian.org/debian-powerpc/2005/05/msg00542.html latency reasons]. Anyway, for recent enough Intel CPU, it's the one recommended for power efficiency (over userspace, and even over &amp;quot;powersave&amp;quot;) by the Intel's kernel developer Arjan van de Ven (see [http://www.bughost.org/pipermail/power/2007-May/000166.html], [http://www.bughost.org/pipermail/power/2007-May/000073.html], [http://www.bughost.org/pipermail/power/2007-May/000071.html])&lt;br /&gt;
&lt;br /&gt;
=== 2.6 doing it with modules ===&lt;br /&gt;
With the Debian flavour of 2.6.21 and possibly earlier versions as well as other distros, all of the above kernel options are compiled as modules out of the box. You'll have to load them yourself to get speedstep functionality. This can be done simply enough in an /etc/modules file with the lines&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
acpi-cpufreq&lt;br /&gt;
cpufreq_ondemand&lt;br /&gt;
cpufreq_userspace&lt;br /&gt;
cpufreq_conservative&lt;br /&gt;
cpufreq_powersave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
of course, this is a bit excessive if you're only going to use one governor (see below), you only need to load the modules for the governor(s) you are going to use. It seems that &amp;quot;performance&amp;quot; is not a loadable module in my case. Probably because it's built into the kernel as the default. Finally if you're a fan of useless statistics, you can load cpufreq_stats so that you can see how long your processor spends in each state and how many times it transitions with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/total_trans&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using the Sys Interface==&lt;br /&gt;
The files in {{path|/sys/devices/system/cpu/cpu0/cpufreq/}} provide information and a means of controlling the frequency scaling subsystem.&lt;br /&gt;
Seed values are given in Khz. You need to be root to access the /sys filesystem.&lt;br /&gt;
&lt;br /&gt;
Your max speed is at {{path|/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq}}.&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq}}&lt;br /&gt;
:{{cmdresult|700000}}&lt;br /&gt;
Your min speed is at {{path|/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq}}.&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq}}&lt;br /&gt;
:{{cmdresult|500000}}&lt;br /&gt;
If you are using the userspace governor, you can write to {{path|/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}} to change the current speed.&lt;br /&gt;
:{{cmdroot|echo 700000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}}&lt;br /&gt;
:{{cmdroot|cat /proc/cpuinfo  | grep &amp;quot;cpu MHz&amp;quot;}}&lt;br /&gt;
:{{cmdresult|cpu MHz         : 697.252}}&lt;br /&gt;
:{{cmdroot|echo 900000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}}&lt;br /&gt;
:{{cmdroot|cat /proc/cpuinfo  | grep &amp;quot;cpu MHz&amp;quot;}}&lt;br /&gt;
:{{cmdresult|cpu MHz         : 976.152}}&lt;br /&gt;
&lt;br /&gt;
==Using Frequency Scaling Governors==&lt;br /&gt;
You can get a list of available governors with (as root):&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors}}&lt;br /&gt;
:{{cmdresult|conservative ondemand powersave userspace performance}}&lt;br /&gt;
&lt;br /&gt;
Note: If the governors are compiled as modules, load them first:&lt;br /&gt;
:{{cmdroot|modprobe cpufreq_performance cpufreq_ondemand cpufreq_conservative cpufreq_powersave cpufreq_userspace}}&lt;br /&gt;
&lt;br /&gt;
Now we set our governor:&lt;br /&gt;
What is our current governor?&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdresult|userspace}}&lt;br /&gt;
Set new governor and watch if it has changed&lt;br /&gt;
:{{cmdroot|echo conservative &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdresult|conservative}}&lt;br /&gt;
&lt;br /&gt;
Congrats! Your governor is active.&lt;br /&gt;
&lt;br /&gt;
You may set the governor in your rc.local, to make it used on every boot.&lt;br /&gt;
&lt;br /&gt;
==Using Frequency Scaling Daemons==&lt;br /&gt;
Frequency Scaling Daemons adapt the frequency policy to different situations. A typical configuration would be to use the ondemand governor running off batteries and performance otherwise, or combining powersave with conservative on laptops with heat problems. More sophisticated setups adapt to battery level, CPU temperature or even running programs. Some daemons are able to control other power management features like hard disks or graphic cards.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Daemons are optional. If you don't plan to change policies depending on the situation, you don't need one and you can stick to the &amp;lt;tt&amp;gt;ondemand&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;conservative&amp;lt;/tt&amp;gt; frequency scaling governors, available in kernels after 2.6.10 or 2.6.12 respectively. See [[#Using Frequency Scaling Governors|above]]. They require less configuration and have generally been experienced to flawlessly adapt to the situations at hand.}}&lt;br /&gt;
&lt;br /&gt;
Some daemons use the kernel governors (see above), others implement the functionality on their own. In the latter case you have to enable the userspace governor. If it is built as module, load it as &amp;lt;tt&amp;gt;cpufreq-userspace&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are plenty of userspace frequency scaling daemons available:&lt;br /&gt;
&lt;br /&gt;
*[[How to configure cpudynd | cpudynd]]&lt;br /&gt;
*[[How to configure cpufreqd | cpufreqd]]&lt;br /&gt;
*[[How to use cpufrequtils | cpufrequtils]]&lt;br /&gt;
*[[How to configure powernowd | powernowd]]&lt;br /&gt;
*[[How to configure powersaved | powersaved]]&lt;br /&gt;
*[[How to configure speedfreqd | speedfreqd]]&lt;br /&gt;
*[[laptop-mode-tools]] can also be configured to switch governors when the laptop is plugged in and unplugged&lt;br /&gt;
&lt;br /&gt;
==Debian notes==&lt;br /&gt;
Instead of compiling your own kernel, you can use the {{Debian}} &amp;quot;stock&amp;quot; kernel. In Debian/Etch the 2.6.18 kernel image with an {{path|/etc/modules}} file that includes:&lt;br /&gt;
&lt;br /&gt;
 battery&lt;br /&gt;
 ac&lt;br /&gt;
 thermal&lt;br /&gt;
 processor&lt;br /&gt;
 acpi-cpufreq&lt;br /&gt;
 cpufreq-userspace&lt;br /&gt;
&lt;br /&gt;
With the powernowd package and you should be setup.&lt;br /&gt;
&lt;br /&gt;
{{Debian}} Etch now has {{path|rc.local}} (see package initscripts).&lt;br /&gt;
&lt;br /&gt;
However, a better alternative for Debian, rather than modifying bootscripts, is to install the [http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&amp;amp;version=all&amp;amp;exact=1&amp;amp;keywords=sysfsutils sysfsutils package]. Then edit {{path|/etc/sysfs.conf}} (as root), where you can setup values to sysfs entries that you want to be modified automatically on boot.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
*If you have a Coppermine-piix-smi based ThinkPads like from the A2x, X2x and T2x series you need to enable the &amp;lt;tt&amp;gt;speedstep-smi&amp;lt;/tt&amp;gt; driver in the kernel and load it if it's built as module. You might want to look at [[How to get SpeedStep working on Coppermine-piix4-smi based ThinkPads | this page]].&lt;br /&gt;
&lt;br /&gt;
*If you have a p4-class celeron based ThinkPad like the R40e you might want to look at [[How to get SpeedStep working on P4-class-Celeron based ThinkPads | this page]]&lt;br /&gt;
&lt;br /&gt;
*You may need to set your BIOS to &amp;quot;maximum performance&amp;quot; if you are using Linux to set the CPU speed.  This is necessary to prevent odd behaviour (cpufreq 'freezing' at certain frequencies) with the T4x series.&lt;br /&gt;
&lt;br /&gt;
*You will need to have the cpufreq-selector applet installed at SUID root to use the gnome cpufreq applet.  See [http://ubuntu.wordpress.com/2005/11/04/enabling-cpu-frequency-scaling/ this page] for info.&lt;br /&gt;
&lt;br /&gt;
==Finetuning voltages and available frequencies==&lt;br /&gt;
See [[Pentium M undervolting and underclocking]].&lt;br /&gt;
&lt;br /&gt;
==A note about CPU throttling==&lt;br /&gt;
&lt;br /&gt;
Throttling the CPU through ACPI &amp;quot;T&amp;quot; states is generally useless for power consumption reduction nowadays.  It is an artifact of the past, when there was no clock frequency scaling and ACPI &amp;quot;C&amp;quot; states were mostly not implemented or didn't exist.&lt;br /&gt;
&lt;br /&gt;
Throttling does not decrease clock frequency at all, and it can even increase power consumption in a modern CPU capable of ACPI &amp;quot;C&amp;quot; states, as it can interfere with the CPU reaching the higher C states (such as C2).&lt;br /&gt;
&lt;br /&gt;
On a T43, setting a CPU to a ACPI Throttle state different than T0 (no throttling) can cause it to draw more than 100mW extra power, as it will reach C2 less often.&lt;br /&gt;
&lt;br /&gt;
In case your BIOS offers &amp;quot;cpu power management&amp;quot; and &amp;quot;pci bus power management&amp;quot; disabled by default (that's the case in X40 with the 2.08 BIOS), you should turn them on (or choose &amp;quot;automatic&amp;quot;). Despite what the BIOS online documentation says (&amp;quot;rarely needed&amp;quot;), this is quite useful, since it make the deepests (C3 and C4) ACPI C-states avaibles. On a kernel more with dynticks (2.6.21 and over), this should save about 2W or more.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://kernel.org/pub/linux/kernel/people/lenb/acpi/doc/OLS2006-ondemand-presentation.pdf ''The Ondemand Governor''], Intel Open Source Technology Center (Venkatesh Pallipadi, Alexey Starikovskiy, Len Brown), presentation at Ottawa Linux Symposium, July 19 2006&lt;br /&gt;
&lt;br /&gt;
[[Category:600X]] [[Category:A20m]] [[Category:A20p]] [[Category:A21e]] [[Category:A21m]] [[Category:A21p]] [[Category:A22e]] [[Category:A22m]] [[Category:A22p]] [[Category:A30]] [[Category:A30p]] [[Category:A31]] [[Category:A31p]] [[Category:i1200]] [[Category:i1300]] [[Category:i1620]] [[Category:G40]] [[Category:G41]] [[Category:R30]] [[Category:R31]] [[Category:R32]] [[Category:R40]] [[Category:R40e]] [[Category:R50]] [[Category:R50e]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:R60e]] [[Category:T20]] [[Category:T21]] [[Category:T22]] [[Category:T23]] [[Category:T30]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:T61]] [[Category:X20]] [[Category:X21]] [[Category:X22]] [[Category:X23]] [[Category:X24]] [[Category:X30]] [[Category:X31]] [[Category:X32]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Z61t]] [[Category:Z61e]] [[Category:TransNote]]&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31156</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31156"/>
		<updated>2007-07-11T18:28:04Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Sleep and Hibernate */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work(see below).  It went very smoothly -- only had two answer two questions:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
*{{cmdresult | GRUB install in MBR?}} -&amp;gt; yes.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is *much* easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Note that different {{T42}} models have different wireless cards -- but mine, the Intel PRO/Wireless 2200BG need the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], installed by default, is taking care of everything just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb] and told it to load the ibm_acpi and nvram modules:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;ibm_acpi&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
   {{cmdroot|echo &amp;quot;nvram&amp;quot; &amp;gt;&amp;gt;/etc/modules}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The *force* option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
Now the sleep button worked, and the hibernate button did something -- it induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, if I do {{cmdroot|modprobe -r e1000}}, the machine *freezes*.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], *even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}*.  {{HELP|Any ideas why WHITELIST doesn't work?}}  The best thing to do about this would be to compile a new kernel with the newest version of e1000...}} but instead, I just turned off the modules-unload script, since everything seems to work fine without unloading any modules, by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Dynamic_Frequency_Scaling&amp;diff=31155</id>
		<title>How to make use of Dynamic Frequency Scaling</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Dynamic_Frequency_Scaling&amp;diff=31155"/>
		<updated>2007-07-11T18:21:28Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* 2.4 Kernels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==General==&lt;br /&gt;
Linux supports dynamic frequency scaling for systems with the following processors:&lt;br /&gt;
*[[Intel Mobile Pentium III]]&lt;br /&gt;
*[[Intel Mobile Pentium III-M]]&lt;br /&gt;
*[[Intel Mobile Pentium 4]]&lt;br /&gt;
*[[Intel Mobile Pentium 4-M]]&lt;br /&gt;
*[[Intel Pentium M (Banias)]]&lt;br /&gt;
*[[Intel Pentium M (Dothan)]]&lt;br /&gt;
*[[Intel Core Solo (Yonah)]]&lt;br /&gt;
*[[Intel Core Duo (Yonah)]]&lt;br /&gt;
*[[Intel Core 2 Duo]]&lt;br /&gt;
*Mobile Athlon&lt;br /&gt;
*AMD64&lt;br /&gt;
*Opteron&lt;br /&gt;
&lt;br /&gt;
==Configuring the Kernel==&lt;br /&gt;
===2.4 Kernels===&lt;br /&gt;
There were various frequency scaling implementations in the 2.4 series of kernels. They all were preliminary and a standard was raised with the introduction of the sysfs filesystem in 2.6 kernels. It is recommended to use a 2.6 kernel, if possible.&lt;br /&gt;
&lt;br /&gt;
===2.6 Kernels===&lt;br /&gt;
You need to enable the CPU frequency scaling for your kernel (usually your distros kernel will have this enabled), under {{kernelconf||||CPU Frequency scaling|Power management options (ACPI, APM)|||}}: {{kernelconf|CONFIG_CPU_FREQ|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
If you own a Dothan processor, you need to enable Enhanced SpeedStep functionalities.&lt;br /&gt;
:{{kernelconf|CONFIG_X86_SPEEDSTEP_CENTRINO|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, there seems to be some advocacy of a switch over to &lt;br /&gt;
:{{kernelconf|CONFIG_X86_ACPI_CPUFREQ|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
for controlling speedstep technology. Apparently this newer kernel option is more aware of acpi powersaving that's done in the BIOS. In any case, both {{kernelconf|CONFIG_X86_SPEEDSTEP_CENTRINO|&amp;lt;*&amp;gt;|||||}} and {{kernelconf|CCONFIG_X86_ACPI_CPUFREQ|&amp;lt;*&amp;gt;|||||}} were found to work on a Menrom (Core 2).&lt;br /&gt;
&lt;br /&gt;
You also need to enable governors, if not already done in your distros default kernel:&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_PERFORMANCE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''performance''' CPU governor lets your CPU frequency always to the highest available.&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_POWERSAVE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''powersave''' governor sets the frequency to the lowest available. That's not the best choice for battery lifetime on modern Intel CPU, though (see above).&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_USERSPACE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''userspace''' governor allows you to set the frequency manually, unlike the others. Some [[#Using Frequency Scaling Daemons|frequency scaling daemons]] require this governor to operate correctly.  This is typically the recommended option with older processors like A30p's pIIIm-1200.&lt;br /&gt;
&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_ONDEMAND|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
:{{kernelconf|CONFIG_CPU_FREQ_GOV_CONSERVATIVE|&amp;lt;*&amp;gt;|||||}}&lt;br /&gt;
&lt;br /&gt;
The '''ondemand''' (available since 2.6.10) and '''conservative''' (since 2.6.12) are governors based on in kernel implementations of CPU scaling algorithms: they scale the CPU frequencies according to the needs (like does the userspace frequency scaling daemons, but in kernel). They differs in the way they scale up and down. The ondemand governor switches to the highest frequency immediately when there is load, while the conservative governor increases frequency step by step. Likewise they behave the other way round for stepping down frequency when the CPU is idle. The conservative governor is good for battery powered environments on AMD64 (but may not work on older ThinkPads like the T21). Ondemand may not work on older laptops without Enhanced SpeedStep due to [http://lists.debian.org/debian-powerpc/2005/05/msg00542.html latency reasons]. Anyway, for recent enough Intel CPU, it's the one recommended for power efficiency (over userspace, and even over &amp;quot;powersave&amp;quot;) by the Intel's kernel developer Arjan van de Ven (see [http://www.bughost.org/pipermail/power/2007-May/000166.html], [http://www.bughost.org/pipermail/power/2007-May/000073.html], [http://www.bughost.org/pipermail/power/2007-May/000071.html])&lt;br /&gt;
&lt;br /&gt;
=== 2.6 doing it with modules ===&lt;br /&gt;
With the Debian flavour of 2.6.21 and possibly earlier versions as well as other distros, all of the above kernel options are compiled as modules out of the box. You'll have to load them yourself to get speedstep functionality. This can be done simply enough in an /etc/modules file with the lines&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
acpi-cpufreq&lt;br /&gt;
cpufreq_ondemand&lt;br /&gt;
cpufreq_userspace&lt;br /&gt;
cpufreq_conservative&lt;br /&gt;
cpufreq_powersave&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
of course, this is a bit excessive if you're only going to use one governor (see below), you only need to load the modules for the governor(s) you are going to use. It seems that &amp;quot;performance&amp;quot; is not a loadable module in my case. Probably because it's built into the kernel as the default. Finally if you're a fan of useless statistics, you can load cpufreq_stats so that you can see how long your processor spends in each state and how many times it transitions with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/total_trans&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using the Sys Interface==&lt;br /&gt;
The files in {{path|/sys/devices/system/cpu/cpu0/cpufreq/}} provide information and a means of controlling the frequency scaling subsystem.&lt;br /&gt;
Seed values are given in Khz. You need to be root to access the /sys filesystem.&lt;br /&gt;
&lt;br /&gt;
Your max speed is at {{path|/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq}}.&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq}}&lt;br /&gt;
:{{cmdresult|700000}}&lt;br /&gt;
Your min speed is at {{path|/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq}}.&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq}}&lt;br /&gt;
:{{cmdresult|500000}}&lt;br /&gt;
If you are using the userspace governor, you can write to {{path|/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}} to change the current speed.&lt;br /&gt;
:{{cmdroot|echo 700000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}}&lt;br /&gt;
:{{cmdroot|cat /proc/cpuinfo  | grep &amp;quot;cpu MHz&amp;quot;}}&lt;br /&gt;
:{{cmdresult|cpu MHz         : 697.252}}&lt;br /&gt;
:{{cmdroot|echo 900000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed}}&lt;br /&gt;
:{{cmdroot|cat /proc/cpuinfo  | grep &amp;quot;cpu MHz&amp;quot;}}&lt;br /&gt;
:{{cmdresult|cpu MHz         : 976.152}}&lt;br /&gt;
&lt;br /&gt;
==Using Frequency Scaling Governors==&lt;br /&gt;
You can get a list of available governors with (as root):&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors}}&lt;br /&gt;
:{{cmdresult|conservative ondemand powersave userspace performance}}&lt;br /&gt;
&lt;br /&gt;
Note: If the governors are compiled as modules, load them first:&lt;br /&gt;
:{{cmdroot|modprobe cpufreq_performance cpufreq_ondemand cpufreq_conservative cpufreq_powersave cpufreq_userspace}}&lt;br /&gt;
&lt;br /&gt;
Now we set our governor:&lt;br /&gt;
What is our current governor?&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdresult|userspace}}&lt;br /&gt;
Set new governor and watch if it has changed&lt;br /&gt;
:{{cmdroot|echo conservative &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}}&lt;br /&gt;
:{{cmdresult|conservative}}&lt;br /&gt;
&lt;br /&gt;
Congrats! Your governor is active.&lt;br /&gt;
&lt;br /&gt;
You may set the governor in your rc.local, to make it used on every boot.&lt;br /&gt;
&lt;br /&gt;
==Using Frequency Scaling Daemons==&lt;br /&gt;
Frequency Scaling Daemons adapt the frequency policy to different situations. A typical configuration would be to use the ondemand governor running off batteries and performance otherwise, or combining powersave with conservative on laptops with heat problems. More sophisticated setups adapt to battery level, CPU temperature or even running programs. Some daemons are able to control other power management features like hard disks or graphic cards.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Daemons are optional. If you don't plan to change policies depending on the situation, you don't need one and you can stick to the &amp;lt;tt&amp;gt;ondemand&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;conservative&amp;lt;/tt&amp;gt; frequency scaling governors, available in kernels after 2.6.10 or 2.6.12 respectively. See [[#Using Frequency Scaling Governors|above]]. They require less configuration and have generally been experienced to flawlessly adapt to the situations at hand.}}&lt;br /&gt;
&lt;br /&gt;
Some daemons use the kernel governors (see above), others implement the functionality on their own. In the latter case you have to enable the userspace governor. If it is built as module, load it as &amp;lt;tt&amp;gt;cpufreq-userspace&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are plenty of userspace frequency scaling daemons available:&lt;br /&gt;
&lt;br /&gt;
*[[How to configure cpudynd | cpudynd]]&lt;br /&gt;
*[[How to configure cpufreqd | cpufreqd]]&lt;br /&gt;
*[[How to use cpufrequtils | cpufrequtils]]&lt;br /&gt;
*[[How to configure powernowd | powernowd]]&lt;br /&gt;
*[[How to configure powersaved | powersaved]]&lt;br /&gt;
*[[How to configure speedfreqd | speedfreqd]]&lt;br /&gt;
*[[laptop-mode-tools]] can also be configured to switch governors when the laptop is plugged in and unplugged&lt;br /&gt;
&lt;br /&gt;
==Debian notes==&lt;br /&gt;
Instead of compiling your own kernel, you can use the {{Debian}} &amp;quot;stock&amp;quot; kernel. In Debian/Etch the 2.6.18 kernel image with an {{path|/etc/modules}} file that includes:&lt;br /&gt;
&lt;br /&gt;
 battery&lt;br /&gt;
 ac&lt;br /&gt;
 thermal&lt;br /&gt;
 processor&lt;br /&gt;
 acpi-cpufreq&lt;br /&gt;
 cpufreq-userspace&lt;br /&gt;
&lt;br /&gt;
With the powernowd package and you should be setup.&lt;br /&gt;
&lt;br /&gt;
{{Debian}} Etch now has {{path|rc.local}} (see package initscripts).&lt;br /&gt;
&lt;br /&gt;
However, a better alternative for Debian, rather than modifying bootscripts, is to install the [http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&amp;amp;version=all&amp;amp;exact=1&amp;amp;keywords=sysfsutils sysfsutils package]. Then edit {{path|/etc/sysfs.conf}} (as root), where you can setup values to sysfs entries that you want to be modified automatically on boot.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
*If you have a Coppermine-piix-smi based ThinkPads like from the A2x, X2x and T2x series you need to enable the &amp;lt;tt&amp;gt;speedstep-smi&amp;lt;/tt&amp;gt; driver in the kernel and load it if it's built as module. You might want to look at [[How to get SpeedStep working on Coppermine-piix4-smi based ThinkPads | this page]].&lt;br /&gt;
&lt;br /&gt;
*If you have a p4-class celeron based ThinkPad like the R40e you might want to look at [[How to get SpeedStep working on P4-class-Celeron based ThinkPads | this page]]&lt;br /&gt;
&lt;br /&gt;
*You may need to set your BIOS to &amp;quot;maximum performance&amp;quot; if you are using Linux to set the CPU speed.  This is necessary to prevent odd behaviour (cpufreq 'freezing' at certain frequencies) with the T4x series.&lt;br /&gt;
&lt;br /&gt;
==Finetuning voltages and available frequencies==&lt;br /&gt;
See [[Pentium M undervolting and underclocking]].&lt;br /&gt;
&lt;br /&gt;
==A note about CPU throttling==&lt;br /&gt;
&lt;br /&gt;
Throttling the CPU through ACPI &amp;quot;T&amp;quot; states is generally useless for power consumption reduction nowadays.  It is an artifact of the past, when there was no clock frequency scaling and ACPI &amp;quot;C&amp;quot; states were mostly not implemented or didn't exist.&lt;br /&gt;
&lt;br /&gt;
Throttling does not decrease clock frequency at all, and it can even increase power consumption in a modern CPU capable of ACPI &amp;quot;C&amp;quot; states, as it can interfere with the CPU reaching the higher C states (such as C2).&lt;br /&gt;
&lt;br /&gt;
On a T43, setting a CPU to a ACPI Throttle state different than T0 (no throttling) can cause it to draw more than 100mW extra power, as it will reach C2 less often.&lt;br /&gt;
&lt;br /&gt;
In case your BIOS offers &amp;quot;cpu power management&amp;quot; and &amp;quot;pci bus power management&amp;quot; disabled by default (that's the case in X40 with the 2.08 BIOS), you should turn them on (or choose &amp;quot;automatic&amp;quot;). Despite what the BIOS online documentation says (&amp;quot;rarely needed&amp;quot;), this is quite useful, since it make the deepests (C3 and C4) ACPI C-states avaibles. On a kernel more with dynticks (2.6.21 and over), this should save about 2W or more.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://kernel.org/pub/linux/kernel/people/lenb/acpi/doc/OLS2006-ondemand-presentation.pdf ''The Ondemand Governor''], Intel Open Source Technology Center (Venkatesh Pallipadi, Alexey Starikovskiy, Len Brown), presentation at Ottawa Linux Symposium, July 19 2006&lt;br /&gt;
&lt;br /&gt;
[[Category:600X]] [[Category:A20m]] [[Category:A20p]] [[Category:A21e]] [[Category:A21m]] [[Category:A21p]] [[Category:A22e]] [[Category:A22m]] [[Category:A22p]] [[Category:A30]] [[Category:A30p]] [[Category:A31]] [[Category:A31p]] [[Category:i1200]] [[Category:i1300]] [[Category:i1620]] [[Category:G40]] [[Category:G41]] [[Category:R30]] [[Category:R31]] [[Category:R32]] [[Category:R40]] [[Category:R40e]] [[Category:R50]] [[Category:R50e]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:R60e]] [[Category:T20]] [[Category:T21]] [[Category:T22]] [[Category:T23]] [[Category:T30]] [[Category:T40]] [[Category:T40p]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:T61]] [[Category:X20]] [[Category:X21]] [[Category:X22]] [[Category:X23]] [[Category:X24]] [[Category:X30]] [[Category:X31]] [[Category:X32]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Z61t]] [[Category:Z61e]] [[Category:TransNote]]&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31153</id>
		<title>Installing Debian 4.0 (Etch) on a ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Debian_4.0_(Etch)_on_a_ThinkPad_T42&amp;diff=31153"/>
		<updated>2007-07-11T17:13:37Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: Etch on a ThinkPad T42&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==The machine==&lt;br /&gt;
Got a used T42 from craigslist:&lt;br /&gt;
&lt;br /&gt;
*Intel Pentium M 1.70GHz&lt;br /&gt;
*500M RAM&lt;br /&gt;
*Fujitsu MHT 2040AH HD (35G)&lt;br /&gt;
*1024x768 LCD panel&lt;br /&gt;
*CDRW/DVD combo: HL-DT-ST RW/DVD&lt;br /&gt;
*ATI Mobility Radeon 7500&lt;br /&gt;
*Intel PRO/Wireless 2200BG&lt;br /&gt;
*BIOS version 3.23&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
I installed Debian Etch 4.0r0 from the netinst CD image (July 6, 2007 version).  I had to do the install over ethernet, as the wireless driver needs some extra work(see below).  It went very smoothly -- only had two answer two questions:&lt;br /&gt;
&lt;br /&gt;
*{{cmdresult | uswsusp didn't find active swap partition}} -&amp;gt; I told it not to continue, and did {{cmdroot | aptitude reinstall uswsusp}} after installation and it worked fine.&lt;br /&gt;
*{{cmdresult | GRUB install in MBR?}} -&amp;gt; yes.&lt;br /&gt;
&lt;br /&gt;
Post-install, gnome automatically popped up an kernel update, which applied fine.&lt;br /&gt;
&lt;br /&gt;
... and with this, most everything works!  This is *much* easier than it used to be.  There were enough remaining issues to consume some hours, though:&lt;br /&gt;
&lt;br /&gt;
==Wireless==&lt;br /&gt;
&lt;br /&gt;
Note that different {{T42}} models have different wireless cards -- but mine, the Intel PRO/Wireless 2200BG need the [http://sourceforge.net/projects/ipw2200 ipw2200] driver, and the associated firmware.  So:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|aptitude install ipw2200-modules-2.6-686}}&lt;br /&gt;
&lt;br /&gt;
Then I downloaded version 3.0 of the firmware from http://ipw2200.sourceforge.net/firmware.php and copied it to {{path|/lib/firmware}} -- crossing my fingers a bit, since nowhere could I find confirmation that the [[ipw2200]] driver included in ipw2200-modules-2.6-686 is version 1.1.1 or newer.&lt;br /&gt;
&lt;br /&gt;
[http://www.gnome.org/projects/NetworkManager/ NetworkManager], installed by default, is taking care of everything just fine.  I added two files to make it work with sleep and hibernate:&lt;br /&gt;
&lt;br /&gt;
in {{path|/etc/acpi/suspend.d/07-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager stop&lt;br /&gt;
&lt;br /&gt;
and in {{path|/etc/acpi/suspend.d/63-network-manager.sh}}:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    /etc/dbus-1/event.d/25NetworkManager start&lt;br /&gt;
&lt;br /&gt;
{{todo|although I haven't tested if creating these files is necessary.  You could try without.}}&lt;br /&gt;
&lt;br /&gt;
==Sleep and Hibernate==&lt;br /&gt;
&lt;br /&gt;
Immediately post-install, including reinstalling uswsusp, both sleep and hibernate worked fine from the command line.  As for the special buttons, sleep (Fn-F4) worked fine, but hibernate (Fn-F12) didn't do anything.  So, this is what I did, hope it helps.  First, installed [http://www.nongnu.org/tpb/ tpb]:&lt;br /&gt;
&lt;br /&gt;
   {{cmdroot|aptitude install tpb}}&lt;br /&gt;
&lt;br /&gt;
... at which point neither sleep nor hibernate did anything.  As others have found, this is because both {{path|/etc/acpi/events/ibm-sleepbtn}} and {{path|/etc/acpi/events/ibm-hibernatebtn}} use acpi_fakekey, which isn't set up to do anything.  The easy fix is to change {{path|/etc/acpi/events/ibm-sleepbtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/sleep.sh force&lt;br /&gt;
&lt;br /&gt;
and to change {{path|/etc/acpi/events/ibm-hibernatebtn}} to:&lt;br /&gt;
&lt;br /&gt;
    event=ibm/hotkey HKEY 00000080 00001004&lt;br /&gt;
    action=/etc/acpi/hibernate.sh&lt;br /&gt;
&lt;br /&gt;
The *force* option in {{path|ibm-sleepbtn}} is necessary on my distribution because otherwise the sleep script defers to gnome-power-manager, and does nothing.&lt;br /&gt;
&lt;br /&gt;
Now the sleep button worked, and the hibernate button did something -- it induced a kernel panic.  After some investigation, it turned out that this was coming from the modules-unload script in {{path|/etc/acpi/suspend.d}} -- and, indeed, if I do {{cmdroot|modprobe -r e1000}}, the machine *freezes*.  Indeed, {path|/etc/acpi/suspend.d/70-modules-unload.sh}} tries to unload [[e1000]] and [[ipw2200]], *even if they are added to MODULES_WHITELIST in {{path|/etc/default/acpi-support}}*.  {{HELP|Any ideas why WHITELIST doesn't work?}}  The best thing to do about this would be to compile a new kernel with the newest version of e1000...}} but instead, I just turned off the modules-unload script, since everything seems to work fine without unloading any modules, by doing this:&lt;br /&gt;
&lt;br /&gt;
    {{cmdroot|mv /etc/acpi/suspend.d/70-modules-unload.sh /etc/acpi/suspend.d/70-modules-unload.sh-off}}&lt;br /&gt;
&lt;br /&gt;
Now the suspend and sleep hotkeys work, and everything seems to continue fine, afterwards.&lt;br /&gt;
&lt;br /&gt;
==The CRT/LCD hotkey and a Projector==&lt;br /&gt;
&lt;br /&gt;
Initially, the Fn-F7 key did nothing -- and neither did {{cmdroot|echo -n 'video_switch' &amp;gt; /proc/acpi/ibm/video}}.  However, adding the line&lt;br /&gt;
&lt;br /&gt;
    Option &amp;quot;BIOSHotkeys&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the Device section of {{path|/etc/X11/xorg.conf}} seems to have done the trick -- after a hard reboot.  I need to use this for a bit longer, but it seems like it'll keep working.&lt;br /&gt;
&lt;br /&gt;
To get a projector to work, all I had to do was to plug it in, then put it to sleep and have it come back.  It still wouldn't play video, though -- the window where the video was playing would be blank on the projected screen.  To fix this, I did the easiest thing, which was to add the line&lt;br /&gt;
&lt;br /&gt;
    Option          &amp;quot;MonitorLayout&amp;quot; &amp;quot;LVDS,NONE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
also to the Device section of {{path|/etc/X11/xorg.conf}}.&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installation_instructions_for_the_ThinkPad_T42&amp;diff=31137</id>
		<title>Installation instructions for the ThinkPad T42</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installation_instructions_for_the_ThinkPad_T42&amp;diff=31137"/>
		<updated>2007-07-10T22:50:24Z</updated>

		<summary type="html">&lt;p&gt;Petermartin: /* Distro specific instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Specific installation notes for the ThinkPad {{T42}}.&lt;br /&gt;
&lt;br /&gt;
==General Notes==&lt;br /&gt;
&lt;br /&gt;
==Distro specific instructions==&lt;br /&gt;
*{{Install|Debian|/Etch|T42}}&lt;br /&gt;
*{{Install|Debian|/Sarge|T42}}&lt;br /&gt;
*{{Install|Debian|/Sarge (alternative)|T42}}&lt;br /&gt;
*{{Install|Ubuntu|/Breezy|T42}}&lt;br /&gt;
*{{Install|Fedora| Core|T42}}&lt;br /&gt;
*{{Install|Slackware|/11.0|T42}}&lt;br /&gt;
&lt;br /&gt;
==External Sources==&lt;/div&gt;</summary>
		<author><name>Petermartin</name></author>
		
	</entry>
</feed>