<?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=TNKS</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=TNKS"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/TNKS"/>
	<updated>2026-05-03T22:37:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=List_of_DMI_IDs&amp;diff=24297</id>
		<title>List of DMI IDs</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=List_of_DMI_IDs&amp;diff=24297"/>
		<updated>2006-08-20T14:04:40Z</updated>

		<summary type="html">&lt;p&gt;TNKS: /* T series */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
This page maintains a database of [http://en.wikipedia.org/wiki/Desktop_Management_Interface DMI] information which can be used to identify ThinkPad models. It is intended as an aid for driver development.&lt;br /&gt;
{{HELP|We need more information about older models, especially those released before 2004. Please [[#Adding_entries|add your model]] to the database.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==DMI ID database==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 80%&amp;quot;&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Model&lt;br /&gt;
! &amp;lt;tt&amp;gt;system-&amp;lt;br /&amp;gt;manufa&amp;lt;br /&amp;gt;cturer&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;system-&amp;lt;br /&amp;gt;product-&amp;lt;br /&amp;gt;name&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;system-&amp;lt;br /&amp;gt;version&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;baseboard-&amp;lt;br /&amp;gt;manufa&amp;lt;br /&amp;gt;cturer&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;baseboard-&amp;lt;br /&amp;gt;product-&amp;lt;br /&amp;gt;name&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;baseboard-&amp;lt;br /&amp;gt;version&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;chassis-&amp;lt;br /&amp;gt;manufa&amp;lt;br /&amp;gt;cturer&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;chassis-&amp;lt;br /&amp;gt;version&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;bios-&amp;lt;br /&amp;gt;vendor&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;bios-&amp;lt;br /&amp;gt;version&amp;lt;/tt&amp;gt;&lt;br /&gt;
! &amp;lt;tt&amp;gt;bios-&amp;lt;br /&amp;gt;release-&amp;lt;br /&amp;gt;date&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Embedded controller&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
====Numbered series====&lt;br /&gt;
|-&lt;br /&gt;
| {{600E}} 2645-5AU&lt;br /&gt;
|| IBM || 26455AU || Not Available || IBM || 26455AU || Not Available || IBM || Not Available || IBM || INET36WW || 11/20/1999&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
====A series====&lt;br /&gt;
|-&lt;br /&gt;
| {{A22p}} 2629-USG&lt;br /&gt;
|| IBM || 2629USG || Not Available || IBM || 2629USG || Not Available || IBM || Not Available || IBM || KYET36WW (1.09a) || 10/17/2002 &lt;br /&gt;
||  || no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{A31}} 2652-PBU&lt;br /&gt;
|| IBM || 2652PBU || Not Available || IBM || 2652PBU || Not Available || IBM || Not Available || IBM || 1NET15WW (1.09 ) || 04/06/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1NHT04WW-1.01    ]-&amp;lt;/nowiki&amp;gt; || no system version&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
====G series====&lt;br /&gt;
|-&lt;br /&gt;
| {{G41}} 2881-75M&lt;br /&gt;
|| IBM || 288175M || ThinkPad G41 || IBM || 288175M || Not Available || IBM || Not Available || IBM || 1XET47WW (1.06 ) || 01/14/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
====R series====&lt;br /&gt;
|-&lt;br /&gt;
| {{R40}} 2681-5UU&lt;br /&gt;
|| IBM || 26815UU || Not Available || IBM || 26815UU || Not Available || IBM || Not Available || IBM || 1OET57WW (1.23 ) || 03/23/2005 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{R40}} 2722-B3G&lt;br /&gt;
|| IBM || 2722B3G || Not Available || IBM || 2722B3G || Not Available || IBM || Not Available || IBM || 1PET62WW (1.30 ) || 09/29/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version&lt;br /&gt;
|-&lt;br /&gt;
| {{R40}} 2897-B4U&lt;br /&gt;
|| IBM || 2897B4U || Not Available || IBM || 2897B4U || Not Available || IBM || Not Available || IBM || 1PET52WW (1.20 ) || 03/03/2004&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{R40}} 2681-HSG&lt;br /&gt;
|| IBM || 2681HSG || Not Available || IBM || 2681HSG || Not Available || IBM || Not Available || IBM || 1OET61WW (1.27 ) || 06/29/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
|{{R50e}} 1834-JAG&lt;br /&gt;
|| IBM || 1834JAG || ThinkPad R50e || IBM || 1834JAG || Not Available || IBM || Not Available || IBM || 1WET82WW (2.02 ) || 02/21/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0022, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1VHT28WW-1.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
|{{R50p}} 1832-2AG&lt;br /&gt;
|| IBM || 18322AG || ThinkPad R50p || IBM || 18322AG || Not Available || IBM || Not Available || IBM || 1RETC2WW (3.03 ) || 04/07/2004 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[1RHT66WW-3.00a   ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R51}} 1829-9MG&lt;br /&gt;
|| IBM || 18299MG || ThinkPad R51 || IBM || 18299MG || Not Available || IBM || Not Available || IBM || 1RETDOWW (3.20 ) || 02/27/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R51}} 1829-L7G&lt;br /&gt;
|| IBM || 1829L7G || ThinkPad R51 || IBM || 1829L7G || Not Available || IBM || Not Available || IBM || 1RETDNWW (3.19 ) || 10/13/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT70WW-3.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R51}} 1836-GEU&lt;br /&gt;
|| IBM || 1836GEU || ThinkPad R51 || IBM || 1836GEU || Not Available || IBM || Not Available || IBM || 1RETDLWW  (3.17 ) || 07/27/2005 || &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes. String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R51}} 2883-ELU&lt;br /&gt;
|| IBM || 2883ELU || ThinkPad R51 || IBM || 2883ELU || Not Available || IBM || Not Available || IBM || 1VET69WW (1.27 ) || 03/03/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1VHT28WW-1.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1846-AQG&lt;br /&gt;
|| IBM || 1846AQG || ThinkPad H || IBM || 1846AQG || Not Available || IBM || Not Available || IBM || 76ET58WW (1.18 ) || 07/19/2005 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes	String 1: IBM ThinkPad Embedded Controller -[76HT14WW-1.04    ]-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| weird system version, known fixed in latest BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1846-AQG&lt;br /&gt;
|| IBM || 1846AQG || ThinkPad R52  || IBM || 1846AQG || Not Available || IBM || Not Available || IBM || 76ET65WW (1.25 ) || 05/18/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;      String 1: IBM ThinkPad Embedded Controller -[76HT16WW-1.06    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1847-W62&lt;br /&gt;
|| IBM || 1847W62 || ThinkPad .    || IBM || 1847W62 || Not Available || IBM || Not Available || IBM || 76ET58WW (1.18 ) || 07/19/2005 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[76HT14WW-1.04    ]-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| weird system version, known fixed in latest BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1847-W62&lt;br /&gt;
|| IBM || 1847W62 || ThinkPad R52  || IBM || 1847W62 || Not Available || IBM || Not Available || IBM || 76ET65WW (1.25 ) || 05/18/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[76HT16WW-1.06    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1858-6MM&lt;br /&gt;
|| IBM || 18586MM || ThinkPad R52 || IBM || 18586MM || Not Available || IBM || Not Available || IBM || 70ET40WW (1.04 ) || 06/02/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[70HT26WW-1.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R52}} 1846-4CG&lt;br /&gt;
|| IBM || 18464CG || ThinkPad R52 || IBM || 18464CG || Not Available || IBM || Not Available || IBM || 76ET65WW (1.25 ) || 05/18/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[76HT15WW-1.05    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{R60e}} 0657-4TG&lt;br /&gt;
|| LENOVO || 06574TG || ThinkPad R60e || LENOVO || 06574TG || Not Available || LENOVO || Not Available || LENOVO || 7EET17WW (1.03 ) || 04/20/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[7EHT10WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
====S series====&lt;br /&gt;
|-&lt;br /&gt;
| {{s30}} 2639-4WJ&lt;br /&gt;
|| IBM || 26394WJ || Not Available || IBM || 2609BS1 || Not Available || IBM || Not Available || IBM || 18ET45WW (1.45) || 07/10/2001&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
====T series====&lt;br /&gt;
|-&lt;br /&gt;
| {{T20}} 2647-UC2&lt;br /&gt;
|| IBM || 2647UC2 || Not Available || IBM || 2647UC2 || Not Available || IBM || Not Available || IBM || IYET45WW (1.08a) || 12/21/1999&lt;br /&gt;
||&lt;br /&gt;
|| no system version, very outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T22}} 2647-4EG&lt;br /&gt;
|| IBM || 26474EG || Not Available || IBM || 26474EG || Not Available || IBM || Not Available || IBM || 16ET31WW (1.11 ) ||&lt;br /&gt;
03/20/2003 &lt;br /&gt;
||&lt;br /&gt;
|| no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T22}} 2647-8EU&lt;br /&gt;
|| IBM || 26478EU || Not Available || IBM || 26478EU || Not Available || IBM || Not Available || IBM || 16ET32WW (1.12 ) || 04/27/2004&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T23}} 2647-8MG&lt;br /&gt;
|| IBM || 26478MG || Not Available || IBM || 26478MG || Not Available || IBM || Not Available || IBM || 1AET56WW (1.13 ) || 07/02/2002&lt;br /&gt;
||&lt;br /&gt;
|| no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T30}} 2366-85G&lt;br /&gt;
|| IBM || 236685G || Not Available || IBM || 236685G || Not Available || IBM || Not Available || IBM || 1IET69WW (2.08 ) || 06/11/2004 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1IHT18WW-1.05    ]-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T30}} 2366-GU1&lt;br /&gt;
|| IBM || 2366GU1 || Not Available || IBM || 2366GU1 || Not Available || IBM || Not Available || IBM || 1IET69WW (2.08 ) || 06/11/2004&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0024, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[1IHT19WW-1.06    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T40}} 2378-D2U&lt;br /&gt;
|| IBM || 2378D2U || ThinkPad T40 || IBM || 2378D2U || Not Available || IBM || Not Available || IBM || 1RETC2WW (3.03 ) || 04/07/2004&lt;br /&gt;
|| &lt;br /&gt;
|| EC string missing (known fixed in latest BIOS), very outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T40p}} 2373-G1G&lt;br /&gt;
|| IBM || 2373G1G || ThinkPad T40p || IBM || 2373G1G || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
|{{T41}} 2373-XNX&lt;br /&gt;
|| IBM || 2373XNX || ThinkPad T41  || IBM || 2373XNX || Not Available || IBM || Not Available || IBM || 1RETDOWW (3.20 ) || 02/27/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T41}} 2373-2FG&lt;br /&gt;
|| IBM || 23732FG || ThinkPad T41 || IBM || 23732FG || Not Available || IBM || Not Available || IBM || 1RET84WW (2.11 ) || 10/30/2003&lt;br /&gt;
||&lt;br /&gt;
|| EC string missing (known fixed in latest BIOS), extremely outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{T41p}} 2373-GHG &lt;br /&gt;
|| IBM || 2373GHG || ThinkPad T41p || IBM || 2373GHG || Not Available || IBM || Not Available || IBM || 1RETDIWW (3.14 ) || 01/20/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T41p}} 2373-GEG&lt;br /&gt;
|| IBM || 2373GEG || ThinkPad T41p || IBM || 2373GEG || Not Available || IBM || Not Available || IBM || 1RETDNWW (3.19 ) || 10/13/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt; Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T41p}} 2373-GJJ&lt;br /&gt;
|| IBM || 2373GJJ || ThinkPad T41p || IBM || 2373GJJ || Not Available || IBM || Not Available || IBM || 1RETDOWW (3.20 ) || 02/27/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42}} 2373-FWG&lt;br /&gt;
|| IBM || 2373FWG || ThinkPad T42 || IBM || 2373FWG || Not Available || IBM || Not Available || IBM || 1RETDHWW (3.13 ) || 10/29/2004&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42}} 2373-M1G&lt;br /&gt;
|| IBM || 2373M1G || ThinkPad T42 || IBM || 2373M1G || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42}} 2378-FVU&lt;br /&gt;
|| IBM || 2378FVU || ThinkPad T42 || IBM || 2378FVU || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte	String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42p}} 2373-KUU&lt;br /&gt;
|| IBM || 2373KUU || ThinkPad T42p || IBM || 2373KUU || Not Available || IBM || Not Available || IBM || 1RETDMWW (3.18 ) || 09/15/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42p}} 2373-GYG&lt;br /&gt;
|| IBM || 2373GYG || ThinkPad T42p || IBM || 2373GYG || Not Available || IBM || Not Available || IBM || 1RETDOWW (3.20 ) || 02/27/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42p}} 2374-CP5&lt;br /&gt;
|| IBM || 2374CP5 || ThinkPad T42p || IBM || 2374CP5 || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte	String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42p}} 2379-DYU&lt;br /&gt;
|| IBM || 2379DYU || ThinkPad T42p || IBM || 2379DYU || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T42p}} 2372-Q2G&lt;br /&gt;
|| IBM || 2373Q2G || ThinkPad T42p || IBM || 2373Q2G || Not Available || IBM || Not Available || IBM || 1RETDPWW (3.21 ) || 06/02/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T43}} 1871-F1G&lt;br /&gt;
|| IBM || 1871F1G || ThinkPad T43 || IBM || 1871F1G || Not Available || IBM || Not Available || IBM || 70ET61WW (1.21 ) || 11/01/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[70HT26WW-1.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T43}} 2686-DGU&lt;br /&gt;
|| IBM || 2686DGU || ThinkPad T43 || IBM || 2686DGU || Not Available || IBM || Not Available || IBM || 1YET62WW (1.27 ) || 05/18/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[1YHT29WW-1.06    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T43}} 2669-WE5&lt;br /&gt;
|| IBM || 2669WE5 || ThinkPad T43 || IBM || 2669WE5 || Not Available || IBM || Not Available || IBM || 1YET56WW (1.21 ) || 07/06/2005 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;String 1: IBM ThinkPad Embedded Controller -[1YHT26WW-1.03    ]-&amp;lt;/nowiki&amp;gt; || 2669-CEU with 1GB RAM + BlueTooth&lt;br /&gt;
|-&lt;br /&gt;
| {{T43p}} 2668-G2G&lt;br /&gt;
|| IBM || 2668G2G || ThinkPad T43p || IBM || 2668G2G || Not Available || IBM || Not Available || IBM || 1YET47WW (1.08 ) || 06/09/2005 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[1YHT26WW-1.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T43p}} 2687-D5U&lt;br /&gt;
|| IBM || 2687D5U || ThinkPad T43p || IBM || 2687D5U || Not Available || IBM || Not Available || IBM || 1YET59WW (1.24 ) || 11/07/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0029, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1YHT26WW-1.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T60}} 2007-49G&lt;br /&gt;
|| LENOVO || 200749G || ThinkPad T60 || LENOVO || 200749G || Not Available || LENOVO || Not Available || LENOVO || 79ET62WW (1.07 ) || 06/12/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[79HT45WW-1.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T60p}} 2007-83U&lt;br /&gt;
|| LENOVO || 200783U || ThinkPad T60p || LENOVO || 200783U || Not Available || LENOVO || Not Available || LENOVO || 79ET60WW (1.05a) || 04/18/2006 || &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[79HT43WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T60p}} 2007-93U&lt;br /&gt;
|| LENOVO || 200793U || ThinkPad T60p || LENOVO || 200793U || Not Available || LENOVO || Not Available || LENOVO || 79ET58WW (1.04 ) || 03/31/2006 || &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[79HT43WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{T60p}} 2007-93G&lt;br /&gt;
|| LENOVO || 200793G || ThinkPad T60p || LENOVO || 200793G || Not Available || LENOVO || Not Available || LENOVO || 79ET62WW (1.07 ) || 06/12/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[79HT45WW-1.04    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
====X series====&lt;br /&gt;
|-&lt;br /&gt;
| {{X20}} 266231G&lt;br /&gt;
|| IBM || 266231G || Not Available || IBM || 266231G || Not Available || IBM || Not Available || IBM || IZET9DWW (2.25 ) || 04/17/2003&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version&lt;br /&gt;
|-&lt;br /&gt;
| {{X24}} 2662-MPU&lt;br /&gt;
|| IBM || 62MPUFX || Not Available || IBM || 62MPUFX || Not Available || IBM || Not Available || IBM || 1DET67WW (1.29 ) || 12/18/2002&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt; || no system version, outdated BIOS&lt;br /&gt;
|-&lt;br /&gt;
| {{X32}} 2884-A3U&lt;br /&gt;
|| IBM || 2884A3U || ThinkPad X32 || IBM || 2884A3U || Not Available || IBM || Not Available || IBM || 1QET94WW (3.00d) || 01/23/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 byte   String 1: IBM ThinkPad Embedded Controller -[1QHT22WW-1.07b   ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{X40}} 2386-H4G&lt;br /&gt;
|| IBM || 2386H4G || ThinkPad X40 || IBM || 2386H4G || Not Available || IBM || Not Available || IBM || 1UET92WW (1.42 ) || 09/16/2004 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0024, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[1UHT82WW-1.32    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{X41}} 2525-HU1&lt;br /&gt;
|| IBM || 2525HU1 || ThinkPad X41 || IBM || 2525HU1 || Not Available || IBM || Not Available || IBM || 74ET48WW (1.17a) || 06/07/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0025, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[74HT25WW-1.00    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{X60}} 1709-47U&lt;br /&gt;
|| LENOVO || 170947U || ThinkPad X60 || LENOVO || 170947U || Not Available || LENOVO || Not Available || LENOVO || 7BET44WW (1.04 ) || 03/13/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[7BHT29WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{X60s}} 1702-55G&lt;br /&gt;
|| LENOVO || 170255G || ThinkPad X60s || LENOVO || 170255G || Not Available || LENOVO || Not Available || LENOVO || 7BET44WW (1.04 ) || 03/13/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[7BHT29WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{X60s}} 1704-56G&lt;br /&gt;
|| LENOVO || 170456G || ThinkPad X60s || LENOVO || 170456G || Not Available || LENOVO || Not Available || LENOVO || 7BET43WW (1.03 ) || 02/13/2006 &lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[7BHT28WW-1.01    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
! colspan=14 style=&amp;quot;text-align:center;background:#efefef;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
====Z series====&lt;br /&gt;
|- &lt;br /&gt;
| {{Z60m}} 2529-FKG&lt;br /&gt;
|| IBM || 2529FKG || ThinkPad Z60m || IBM || 2529FKG || Not Available || IBM || Not Available || IBM || 77ET42WW (1.05 ) || 11/19/2005&lt;br /&gt;
||      String 1: IBM ThinkPad Embedded Controller -[77HT28WW-1.02    ]- ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Z61m}} 9453-A11&lt;br /&gt;
|| LENOVO || 9453A11 || ThinkPad Z61m || LENOVO || 9453A11 || Not Available || LENOVO || Not Available || LENOVO || 7FET48WW (1.08 ) || 05/26/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[7FHT21WW-1.03    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Z60t}} 2511-FEU&lt;br /&gt;
|| IBM || 2511FEU || ThinkPad Z60t || IBM || 2511FEU || Not Available || IBM || Not Available || IBM || 77ET42WW (1.05 ) || 11/19/2005&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;     String 1: IBM ThinkPad Embedded Controller -[77HT28WW-1.02    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
|-&lt;br /&gt;
| {{Z61p}} 9453-A12&lt;br /&gt;
|| LENOVO || 9453A12 || ThinkPad Z61p || LENOVO || 9453A12 || Not Available || LENOVO || Not Available || LENOVO || 7FET45WW (1.05 ) || 04/20/2006&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Handle 0x0026, DMI type 11, 5 bytes  String 1: IBM ThinkPad Embedded Controller -[7FHT19WW-1.01    ]-&amp;lt;/nowiki&amp;gt; ||&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding entries==&lt;br /&gt;
&lt;br /&gt;
Click the &amp;quot;Edit&amp;quot; link on the appropriate series above and add an entry of the following form:&lt;br /&gt;
:&amp;lt;tt&amp;gt;!-&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;| &amp;lt;/tt&amp;gt;&amp;lt;i&amp;gt;description of your model&amp;lt;/i&amp;gt;&lt;br /&gt;
:&amp;lt;i&amp;gt;data line 1&amp;lt;/i&amp;gt;&lt;br /&gt;
:&amp;lt;i&amp;gt;data line 2&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the two data lines are genereated by the following &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for X in system-{manufacturer,product-name,version} \&lt;br /&gt;
  baseboard-{manufacturer,product-name,version} \&lt;br /&gt;
  chassis-{manufacturer,version} bios-{vendor,version,release-date}; do \&lt;br /&gt;
  echo -n &amp;quot;|| `sudo /usr/sbin/dmidecode -s $X` &amp;quot;; done; \&lt;br /&gt;
  sudo /usr/sbin/dmidecode | perl -0777 -ne \&lt;br /&gt;
  'm/\n(.*).\n.*\n(.*Embedded Cont.*)\n/i; print &amp;quot;\n|| &amp;lt;nowiki&amp;gt;&amp;lt;&amp;lt;/nowiki&amp;gt;nowiki&amp;gt;$1$2&amp;lt;/nowiki&amp;gt; ||\n&amp;quot;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While at it, you may also want to test [[tp_smapi]] and update its [[tp_smapi#Model-specific_status|model-specific status table]].&lt;br /&gt;
&lt;br /&gt;
==Software using ThinkPad DMI IDs==&lt;br /&gt;
* [[HDAPS]] driver whitelist&lt;br /&gt;
* [[tp_smapi]] driver whitelist&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23519</id>
		<title>Script for Undervolt Stress Testing</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23519"/>
		<updated>2006-07-24T16:10:00Z</updated>

		<summary type="html">&lt;p&gt;TNKS: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People have many different tolerances for how far they will undervolt their system.  Some are eager to just run their Pentium-Ms at 700mV and abandon safety; they ramp their systems as far as they can without crashing their system, and maybe they pull the voltages up a margin from the failure point.  However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.  In the worst case, the system will fail months later, and the blame might be assigned to, say, a kernel upgrade or patch when really the system failed due to intermittent lack of power.  &lt;br /&gt;
&lt;br /&gt;
Many would like to guard themselves again such a failure and consequently have opted to run a prime number stress test such as [http://www.mersenne.org/prime.htm| MPrime] in a &amp;quot;torture test&amp;quot; mode, while they ramp down their voltages to find a comfortable margin from the failure point.  However, as per recommendations from a [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2006-July/034806.html| thread of the Linux-Thinkpad mailing list], perhaps even more can be done.  Following such advice, this script not only runs MPrime, but also toggles on and off a lot of power-demanding features of the laptop throughout the course of the test.  The idea is to more rapidly expose corner cases in which the system might act up.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Please feel ''very free'' to improve/fix this script.  My intent for its posting is to make its ownership as public as possible.  There's no need to try to E-mail me to validate your changes.  If you feel they are in the best interest of the public, just make the changes.  The script attempts to employ pre-conditions to intelligently apply functionality only to those laptops that appear to support it.  Hopefully, its framework will allow for extension without heavy redesign.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN| There are ''very important'' warnings embedded into the comments of this script.  I have left them there because if you copy this script to your system, I would want you to carry these warnings as comments with you.  Please read these comments and the script very carefully.  Stress testing an undervolted system is not a trivial undertaking and you need to be as accountable as possible for what a script like this does.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# DESCRIPTION AND MOTIVATION &lt;br /&gt;
# --------------------------&lt;br /&gt;
# Designed for an undervolted laptops with frequency stepping, this script&lt;br /&gt;
# swings the system between aggressive and low power use, and also swings&lt;br /&gt;
# among the available frequencies.&lt;br /&gt;
# &lt;br /&gt;
# The idea is that such exteme use of the system will likely explore corner&lt;br /&gt;
# cases where the system might fail.  Hopefully, such testing can curtail the&lt;br /&gt;
# time necessary to establish confidence in undervolted systems.&lt;br /&gt;
#&lt;br /&gt;
# In the background the MPrime program, a prime number search engine, runs in a&lt;br /&gt;
# &amp;quot;torture test&amp;quot; mode, in which it tests computations against known results and&lt;br /&gt;
# errs out if there's a discrepancy.  Unless it errs out, this script runs&lt;br /&gt;
# forever.&lt;br /&gt;
# &lt;br /&gt;
# IMPLEMENTATION&lt;br /&gt;
# --------------&lt;br /&gt;
# The design of this script attempts to address laptops beyond the Thinkpad T42&lt;br /&gt;
# for which it was designed.  Many of the function definitions are prepended&lt;br /&gt;
# with conditionals that check the system for functionality and either bail out&lt;br /&gt;
# or disable features accordingly.&lt;br /&gt;
#&lt;br /&gt;
# In particular, the nature of what &amp;quot;aggressive&amp;quot; constitutes is defined by a &lt;br /&gt;
# number of &amp;quot;toggle_&amp;quot; functions.  The pre-pended conditional to these functions&lt;br /&gt;
# appends the function name to $AGGRESSIVE_TOGGLES if the system appears to&lt;br /&gt;
# support the feature.  The toggle_aggression function then calls all the &lt;br /&gt;
# functions in $AGGRESSIVE_TOGGLES.  Look at these &amp;quot;toggle_&amp;quot; functions for &lt;br /&gt;
# examples of how to extend this script for other possible stressing.&lt;br /&gt;
#&lt;br /&gt;
# EXTERNAL PROGRAMS EMPLOYED&lt;br /&gt;
# --------------------------&lt;br /&gt;
# Test system integriy (required):  MPrime - http://www.mersenne.org/prime.htm&lt;br /&gt;
# Download files:  curl - http://curl.haxx.se&lt;br /&gt;
# Read random sectors from CD:  spew (for gorge) - http://spew.berlios.de&lt;br /&gt;
# Keep hard disk active:  stress - http://weather.ou.edu/~apw/projects/stress/&lt;br /&gt;
#&lt;br /&gt;
# EXECUTION&lt;br /&gt;
# ---------&lt;br /&gt;
# Read this script including all the warnings below, and then make sure all the&lt;br /&gt;
# variables in the &amp;quot;Script Globals&amp;quot; section are appropriately set. &lt;br /&gt;
#&lt;br /&gt;
# This script uses the mprime binary with the &amp;quot;-t&amp;quot; switch for the MPrime&lt;br /&gt;
# &amp;quot;torture test.&amp;quot;  This test by default uses all the memory available on the&lt;br /&gt;
# system.  However, if you run this system for many hours, your kernel may run&lt;br /&gt;
# out of memory, and kill mprime and this script.  To spare yourself this&lt;br /&gt;
# problem, use the &amp;quot;NightMemory=&amp;quot; and &amp;quot;DayMemory=&amp;quot; parameters in MPrime's&lt;br /&gt;
# local.ini file, a file typically in the same directory as the mprime&lt;br /&gt;
# executable (read the MPrime documentation for specifics).  The torture test&lt;br /&gt;
# by default uses the greater of these two settings, so just set them both a&lt;br /&gt;
# reasonable margin away from the total amount of memory available on your&lt;br /&gt;
# system.  On a system with 512MB of RAM, I set these parameters both to 448,&lt;br /&gt;
# and had enough memory left over to run my normal set of background processes.&lt;br /&gt;
#&lt;br /&gt;
# The arguments of this script are &amp;quot;aggression&amp;quot; toggles to disable.  Any&lt;br /&gt;
# function below that begins with &amp;quot;toggle_$OPTION&amp;quot; can be disabled by using&lt;br /&gt;
# $OPTION as one of the arguments of this script.  Otherwise, all the stressing&lt;br /&gt;
# that a system supports are enabled by default.&lt;br /&gt;
#&lt;br /&gt;
# Because of Warning 3 below, I recommend you run this script as&lt;br /&gt;
#&lt;br /&gt;
#     stress_test 2&amp;gt;&amp;amp;1 | tee output&lt;br /&gt;
#&lt;br /&gt;
# so that you have a persistent record of what has happened in case your battery&lt;br /&gt;
# drains completely.&lt;br /&gt;
#&lt;br /&gt;
# Keeping in mind Warning 1.1, run the script for as long as it takes to &lt;br /&gt;
# establish confidence in your system (a few hours, half a day, etc.).&lt;br /&gt;
#&lt;br /&gt;
# WARNINGS&lt;br /&gt;
# --------&lt;br /&gt;
# 1) This is a STRESS test, and it is very possible that you may witness some&lt;br /&gt;
# very bad behavior.  Some systems might already be on the verge of breaking,&lt;br /&gt;
# and this script might push them over the edge, and damage them irreparably.&lt;br /&gt;
# Especially since you've probably undervolted your system, please accept the&lt;br /&gt;
# inherent risk in running this script.  In fact, I have even seen some&lt;br /&gt;
# unexpected behavior on non-undervolted systems running this script.  &lt;br /&gt;
#&lt;br /&gt;
# 1.1) This is a STRESS test, and it will run your system very hot at times.&lt;br /&gt;
# Since you are probably running this test because you've undervolted your&lt;br /&gt;
# system, you assumedly care a lot about conserving your battery's charge.&lt;br /&gt;
# However, running a system hot and needlessly running through charging cycles&lt;br /&gt;
# will tax your battery more than just normal use.  It is very difficult to&lt;br /&gt;
# even estimate how much of your battery's life you may throw away running&lt;br /&gt;
# this test.  In all likelihood on a battery that's not too old or too new, it&lt;br /&gt;
# should be imperceptible, and the security you'll gain after running this test&lt;br /&gt;
# will be worth it.  You can alway run this script without the battery&lt;br /&gt;
# connected -- just run it with an &amp;quot;ac_via_smapi&amp;quot; argument to disable &lt;br /&gt;
# toggling from the ac to battery power.&lt;br /&gt;
#&lt;br /&gt;
# 2) Please READ THIS SCRIPT BEFORE RUNNING IT.  It was very much designed for my&lt;br /&gt;
# personal system, and although it worked very well for my needs, it relies &lt;br /&gt;
# heavily on a number of external programs for full functionality.  Finding these&lt;br /&gt;
# programs isn't so bad (with the exception of MPrime all were available as &lt;br /&gt;
# Debian packages -- spew, gorge, curl, etc.).  As I noted above, I've tried to &lt;br /&gt;
# structure this script such that it can be extended (as opposed to overwritten) &lt;br /&gt;
# to support other functionality.  However, you should also read this script &lt;br /&gt;
# entirely because it's not mature, so it's difficult for me to document all the &lt;br /&gt;
# strange ways in which it might behave under various circumstances.&lt;br /&gt;
#&lt;br /&gt;
# 3) This script might drain your battery completely.  It has some strong measures&lt;br /&gt;
# to prevent that from happening, but I can't make guarantees.   &lt;br /&gt;
#&lt;br /&gt;
# 4) Be mindful that upon breaking out of this script, your system maybe not be&lt;br /&gt;
# in an agreeable state.  There is a bash trap that performs a lot of cleanup &lt;br /&gt;
# if you exit with a Ctrl-C.  But I didn't make the code to revert the CD's speed, &lt;br /&gt;
# the wireless device's original txpower, the display's brightness, etc.  Also, the &lt;br /&gt;
# bash trap isn't perfect, and might fail to restore the system.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
set -e  # Script designed to bail out on any irregularities.&lt;br /&gt;
&lt;br /&gt;
##############################################&lt;br /&gt;
# SCRIPT GLOBALS                             #&lt;br /&gt;
#  (may need some adjusting for your system) #&lt;br /&gt;
##############################################&lt;br /&gt;
&lt;br /&gt;
MPRIME_BIN=&amp;quot;./gimps/mprime&amp;quot; # MPrime binary location (get from&lt;br /&gt;
                            #   http://www.mersenne.org/freesoft.htm)&lt;br /&gt;
AGGRESSIVE_SLEEP_SEC=90     # Seconds for &amp;quot;agressive&amp;quot; testing interval when &lt;br /&gt;
                            #   testing with a fixed frequency&lt;br /&gt;
NONAGGRESSIVE_SLEEP_SEC=120 # Seconds for non-&amp;quot;aggressive&amp;quot; testing interval&lt;br /&gt;
                            #   when testing with a fixed frequency&lt;br /&gt;
FREQ_CYCLE_SLEEP_SEC=15     # Seconds for each random frequency when testing&lt;br /&gt;
                            #   with a fixed aggression&lt;br /&gt;
FREQ_CYCLE_NUM=15           # Number of random frequencies to cycle through &lt;br /&gt;
                            #   when testing with a fixed aggression&lt;br /&gt;
CAPACITY_LIMIT=50           # Minimum mWh required in battery before the script&lt;br /&gt;
                            #   takes time out to recharge the battery&lt;br /&gt;
SECONDS_TO_CHARGE=300       # Seconds to charge is $CAPACITY_LIMIT is reached&lt;br /&gt;
WIFI_DEVICE=eth1            # Set to garbage if you don't want to use wifi &lt;br /&gt;
MAX_TXPOWER=20              # Tx power (dB) used for wifi device in aggressive&lt;br /&gt;
                            #   mode (off in non-aggressive mode)&lt;br /&gt;
CDROM_DEV_FILE=/dev/hdc     # Set to garbage if you don't want to use the CD-ROM&lt;br /&gt;
MAX_CD_SPEED=24             # Speed of CD in aggressive mode (off in&lt;br /&gt;
                            #   non-aggressive mode)&lt;br /&gt;
&lt;br /&gt;
# Some services need to be stopped to prevent a conflict with&lt;br /&gt;
# aggressive/non-aggressive mode settings.  These services are restarted in&lt;br /&gt;
# reverse order upon the script's exit.  You can customize the path to these&lt;br /&gt;
# scripts here if your flavor of GNU doesn't use /etc/init.d/.&lt;br /&gt;
#&lt;br /&gt;
SERVICES_TO_STOP=&amp;quot;tpsmapi powernowd acpid sleepd laptop-mode&amp;quot;&lt;br /&gt;
PATH_TO_SERVICES_SCRIPTS=&amp;quot;/etc/init.d&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Some info that should be in SysFS or ProcFS.&lt;br /&gt;
#&lt;br /&gt;
SYS_CPU_DIR=/sys/devices/system/cpu/cpu0/cpufreq&lt;br /&gt;
FREQS=&amp;quot;$(cat $SYS_CPU_DIR/scaling_available_frequencies)&amp;quot;&lt;br /&gt;
FREQS_ARRAY=($FREQS)&lt;br /&gt;
SYS_TPSMAPI_BAT_DIR=/sys/devices/platform/smapi/BAT0&lt;br /&gt;
IBM_ACPI_BRIGHTNESS_FILE=/proc/acpi/ibm/brightness&lt;br /&gt;
RF_KILL_FILE=/sys/class/net/$WIFI_DEVICE/device/rf_kill&lt;br /&gt;
&lt;br /&gt;
############&lt;br /&gt;
# BINARIES #&lt;br /&gt;
############&lt;br /&gt;
#&lt;br /&gt;
# Establishes paths for all binaries to make it easier for functions to test if&lt;br /&gt;
# they are executable with 'test -x &amp;quot;$BINARY_BIN&amp;quot;'.  &lt;br /&gt;
#&lt;br /&gt;
{&lt;br /&gt;
  CURL_BIN=$(which curl)&lt;br /&gt;
  GORGE_BIN=$(which gorge)&lt;br /&gt;
  STRESS_BIN=$(which stress)&lt;br /&gt;
  IWCONFIG_BIN=$(which iwconfig)&lt;br /&gt;
  IFUP_BIN=$(which ifup)&lt;br /&gt;
  IFDOWN_BIN=$(which ifdown)&lt;br /&gt;
  EJECT_BIN=$(which eject)&lt;br /&gt;
  CPUFREQSET_BIN=$(which cpufreq-set)&lt;br /&gt;
  KILLALL_BIN=$(which killall)&lt;br /&gt;
  RENICE_BIN=$(which renice)&lt;br /&gt;
} || true&lt;br /&gt;
&lt;br /&gt;
#############&lt;br /&gt;
# FUNCTIONS #&lt;br /&gt;
############# &lt;br /&gt;
&lt;br /&gt;
# clean_up()&lt;br /&gt;
#&lt;br /&gt;
# Kills mprime background job and starts services that were stopped at the&lt;br /&gt;
# beginning of the scripts execution.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then echo &amp;quot;Sorry, this script uses killall&amp;quot; ; exit 1&lt;br /&gt;
fi&lt;br /&gt;
for service in $SERVICES_TO_STOP ; do&lt;br /&gt;
  if [ ! -x &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service&amp;quot; ]&lt;br /&gt;
    then echo &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service can't be called.&amp;quot; ; exit 1&lt;br /&gt;
  fi&lt;br /&gt;
done&lt;br /&gt;
clean_up()&lt;br /&gt;
{&lt;br /&gt;
  $KILLALL_BIN -q mprime || true&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
  local SERVICES_TO_START=&amp;quot;&amp;quot;&lt;br /&gt;
  for service in $SERVICES_TO_STOP&lt;br /&gt;
    do SERVICES_TO_START=&amp;quot;$service $SERVICES_TO_START&amp;quot;&lt;br /&gt;
  done&lt;br /&gt;
  for service in $SERVICES_TO_START&lt;br /&gt;
    do $PATH_TO_SERVICES_SCRIPTS/$service start&lt;br /&gt;
  done&lt;br /&gt;
}&lt;br /&gt;
trap &amp;quot;echo 'cleaning up...' ; clean_up&amp;quot; SIGINT SIGTERM SIGHUP&lt;br /&gt;
&lt;br /&gt;
# do_sleep()&lt;br /&gt;
#&lt;br /&gt;
# Before starting a testing interval, checks in the battery is low, and charges the&lt;br /&gt;
# battery if necessary.  After the testing interval, the running status of the &lt;br /&gt;
# mprime background job is verified. &lt;br /&gt;
#&lt;br /&gt;
# TODO: I've not addressed multiple batteries, APM, or ACPI.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] &lt;br /&gt;
  then &lt;br /&gt;
    echo -n &amp;quot;WARNING: Thinkpad SMAPI SysFS interface not &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;available to detect if battery&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo -n &amp;quot;         level too low.  This script could drain &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;all of your battery.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
fi&lt;br /&gt;
do_sleep()&lt;br /&gt;
{&lt;br /&gt;
  if [ -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] ; then&lt;br /&gt;
    local REMAINING_CAPACITY&lt;br /&gt;
    while REMAINING_CAPACITY=$(cat $SYS_TPSMAPI_BAT_DIR/remaining_capacity \&lt;br /&gt;
                                2&amp;gt; /dev/std) \&lt;br /&gt;
      &amp;amp;&amp;amp; REMAINING_CAPACITY=${REMAINING_CAPACITY%% *} \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; ] \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; -lt &amp;quot;$CAPACITY_LIMIT&amp;quot; ] ; do&lt;br /&gt;
        echo ; echo -n &amp;quot;Battery is too low to continue, &amp;quot; &lt;br /&gt;
        echo &amp;quot;taking a break to charge up.&amp;quot;&lt;br /&gt;
        OLD_AGGRESSIVE=&amp;quot;$AGGRESSIVE&amp;quot;&lt;br /&gt;
        if [ &amp;quot;AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
        sleep $SECONDS_TO_CHARGE &lt;br /&gt;
        if [ ! &amp;quot;$OLD_AGGRESSIVE&amp;quot; = &amp;quot;$AGGRESSIVE&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    done&lt;br /&gt;
  fi&lt;br /&gt;
  sleep $1&lt;br /&gt;
  if kill -0 $MPRIME_PID 2&amp;gt; /dev/null &lt;br /&gt;
    then return 0&lt;br /&gt;
    else &lt;br /&gt;
      echo ; echo &amp;quot;mprime bailed out here!&amp;quot;&lt;br /&gt;
      clean_up&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# set_frequency()&lt;br /&gt;
#&lt;br /&gt;
# Changes the frequency of the processor to $1.&lt;br /&gt;
#&lt;br /&gt;
# TODO: Perhaps there should be other ways to change the frequency another way.&lt;br /&gt;
#       I found cpufreq-set convenient because it handles both ProcFS _and_&lt;br /&gt;
#       SysFS.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$CPUFREQSET_BIN&amp;quot; ] ; then&lt;br /&gt;
  echo &amp;quot;Sorry, the set_frequency() function needs to be updated&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  echo &amp;quot;    to change frequencies without cpufreq-set.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
set_frequency()&lt;br /&gt;
{&lt;br /&gt;
  $CPUFREQSET_BIN -f $1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ac_via_smapi()&lt;br /&gt;
#&lt;br /&gt;
# If the system is an Thinkpad with the tp_smapi kernel module set up, the &lt;br /&gt;
# ac power is cut in an aggressive mode and returned in the non-agressive mode. &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/force_discharge&amp;quot; \&lt;br /&gt;
  -a -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ac_via_smapi&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ac_via_smapi()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
    else &lt;br /&gt;
      echo 1 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 5 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ibm_acpi_brightness()&lt;br /&gt;
#&lt;br /&gt;
# If the Thinkpad ibm_acpi kernel module is set up, the brightness of screen&lt;br /&gt;
# is set to the brightest setting in an agressive mode and the dimmest setting&lt;br /&gt;
# otherwise.&lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$IBM_ACPI_BRIGHTNESS_FILE&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ibm_acpi_brightness&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ibm_acpi_brightness()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo level 0 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
    else echo level 7 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_intel_wireless()&lt;br /&gt;
#&lt;br /&gt;
# Turns the wireless device on in power-hogging mode when aggressive, and&lt;br /&gt;
# turns the device off otherwise.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Designed for the Intel 2200BG open source driver, and may not be &lt;br /&gt;
#   compatible with much else.  &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$RF_KILL_FILE&amp;quot; -a -x &amp;quot;$PKILL_BIN&amp;quot; -a -x &amp;quot;$IFDOWN_BIN&amp;quot; \&lt;br /&gt;
  -a -x &amp;quot;$IFUP_BIN&amp;quot; -a -x &amp;quot;$IWCONFIG_BIN&amp;quot; -a &amp;quot;$WIFI_DEVICE&amp;quot; ] \&lt;br /&gt;
    &amp;amp;&amp;amp; grep &amp;quot;$WIFI_DEVICE&amp;quot; /proc/net/wireless&lt;br /&gt;
      then &lt;br /&gt;
        AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_intel_wireless&amp;quot;&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE txpower $MAX_TXPOWER&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE power off&lt;br /&gt;
fi&lt;br /&gt;
toggle_intel_wireless()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo 1 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
    else &lt;br /&gt;
      echo 0 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
      $PKILL_BIN ^ifdown$\|^ifup$ || true&lt;br /&gt;
      $IFDOWN_BIN $WIFI_DEVICE 2&amp;gt; /dev/null || true&lt;br /&gt;
      $IFUP_BIN $WIFI_DEVICE 2&amp;gt; /dev/null&lt;br /&gt;
      local NUM_OF_TRIES=0&lt;br /&gt;
      while $IWCONFIG_BIN $WIFI_DEVICE | grep unassociated &amp;gt; /dev/null \&lt;br /&gt;
          &amp;amp;&amp;amp; [ &amp;quot;$NUM_OF_TRIES&amp;quot; -lt 15 ]&lt;br /&gt;
        do sleep 3&lt;br /&gt;
        NUM_OF_TRIES=$(($NUM_OF_TRIES + 1))&lt;br /&gt;
      done&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_gorge()&lt;br /&gt;
#&lt;br /&gt;
# In an aggressive mode, reads data from the CD-ROM at random offsets using the &lt;br /&gt;
# 'gorge' command (http://spew.berlios.de/).&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Don't use a DVD, as the speed set by `eject' doesn't affect DVDs.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Make sure to use a CD with more than 450MB of data.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$GORGE_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; -a -r &amp;quot;$CDROM_DEV_FILE&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_gorge&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_gorge()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $GORGE_BIN || true&lt;br /&gt;
    else &lt;br /&gt;
      $GORGE_BIN -r 450M $CDROM_DEV_FILE 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
      local GORGE_PID=$!&lt;br /&gt;
      #&lt;br /&gt;
      # My laptop needed a little priority push to get gorge CD reading started&lt;br /&gt;
      # in sync with the interval.&lt;br /&gt;
      #&lt;br /&gt;
      if [ -x &amp;quot;$RENICE_BIN&amp;quot; ]&lt;br /&gt;
        then $RENICE_BIN -2 -p $GORGE_PID &amp;gt; /dev/null&lt;br /&gt;
      fi&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_stress()&lt;br /&gt;
#&lt;br /&gt;
# Runs the `stress' program (http://weather.ou.edu/~apw/projects/stress/) in &lt;br /&gt;
# the aggressive mode with settings to issue a large number of write(), &lt;br /&gt;
# unlink(), and sync() events.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$STRESS_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_stress&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_stress()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $STRESS_BIN || true&lt;br /&gt;
    else $STRESS_BIN -q -i 1 -d 1 &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_curl()&lt;br /&gt;
#&lt;br /&gt;
# Downloads a file (to drain power through the wireless device) in the&lt;br /&gt;
# aggressive mode using `curl'.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$CURL_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_curl&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_curl()&lt;br /&gt;
{&lt;br /&gt;
  URL_FIRST_HALF=&amp;quot;http://cdimage.debian.org/cdimage/weekly-builds/&amp;quot;&lt;br /&gt;
  URL_SECOND_HALF=&amp;quot;i386/iso-cd/debian-testing-i386-binary-1.iso&amp;quot;&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $CURL_BIN || true&lt;br /&gt;
    else $CURL_BIN $URL_FIRST_HALF$URL_SECOND_HALF &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_aggression()&lt;br /&gt;
#&lt;br /&gt;
# Runs all the &amp;quot;toggle_&amp;quot; functions supported by the system unless specified&lt;br /&gt;
# as disabled in the script arguments.&lt;br /&gt;
#&lt;br /&gt;
for toggle_to_disable in $@ &lt;br /&gt;
  do AGGRESSIVE_TOGGLES=$(echo $AGGRESSIVE_TOGGLES \&lt;br /&gt;
                            | sed -e &amp;quot;s/toggle_$toggle_to_disable//&amp;quot;)&lt;br /&gt;
done&lt;br /&gt;
toggle_aggression()&lt;br /&gt;
{ &lt;br /&gt;
  for toggle in $AGGRESSIVE_TOGGLES ; do $toggle ; done&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE=&amp;quot;false&amp;quot;&lt;br /&gt;
    else AGGRESSIVE=&amp;quot;true&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#########&lt;br /&gt;
# SETUP #&lt;br /&gt;
#########&lt;br /&gt;
&lt;br /&gt;
# Stopping services that might interfere with the system state this script&lt;br /&gt;
# controls (precondition satisfied in definition of clean_up).&lt;br /&gt;
#&lt;br /&gt;
for service in $SERVICES_TO_STOP&lt;br /&gt;
  do /etc/init.d/$service stop&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Setting CD to a fast speed &lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$EJECT_BIN&amp;quot; ] &lt;br /&gt;
  then $EJECT_BIN -x $MAX_CD_SPEED&lt;br /&gt;
elif [ -x &amp;quot;$HDPARM_BIN&amp;quot; ]&lt;br /&gt;
  then $HDPARM_BIN -E $MAX_CD_SPEED&lt;br /&gt;
fi &lt;br /&gt;
&lt;br /&gt;
# Starting the prime number search&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$MPRIME_BIN&amp;quot; ] ; then &lt;br /&gt;
  echo &amp;quot;mprime program not executable/found.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi  &lt;br /&gt;
$MPRIME_BIN -t &amp;gt; mprime_output.txt &amp;amp;&lt;br /&gt;
MPRIME_PID=$!&lt;br /&gt;
&lt;br /&gt;
########&lt;br /&gt;
# BODY #&lt;br /&gt;
########&lt;br /&gt;
&lt;br /&gt;
while true ; do&lt;br /&gt;
  for f in $FREQS ; do&lt;br /&gt;
    echo &amp;quot;Cycling aggression twice for ${f}kHz: &amp;quot;&lt;br /&gt;
    set_frequency $f&lt;br /&gt;
    if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      echo &amp;quot;    high &amp;quot; ; do_sleep $AGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
      echo &amp;quot;    low &amp;quot; ; do_sleep $NONAGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
    done&lt;br /&gt;
    echo &lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      if [ $i -eq 1 ] &lt;br /&gt;
        then&lt;br /&gt;
          if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under high aggression: &amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under low aggression: &amp;quot;&lt;br /&gt;
      fi &lt;br /&gt;
      for (( i=1 ; i&amp;lt;=$FREQ_CYCLE_NUM ; i+=1 )) ; do&lt;br /&gt;
        FREQ=${FREQS_ARRAY[$(($RANDOM % 6))]}&lt;br /&gt;
        echo &amp;quot;    ${FREQ}...&amp;quot;&lt;br /&gt;
        set_frequency $FREQ&lt;br /&gt;
        do_sleep $FREQ_CYCLE_SLEEP_SEC&lt;br /&gt;
      done&lt;br /&gt;
      echo&lt;br /&gt;
    done&lt;br /&gt;
  done&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23517</id>
		<title>Script for Undervolt Stress Testing</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23517"/>
		<updated>2006-07-24T15:55:15Z</updated>

		<summary type="html">&lt;p&gt;TNKS: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;People have many different tolerances for how far they will undervolt their system.  Some are eager to just run their Pentium-Ms at 700mV and abandon safety; they ramp their systems as far as they can without crashing their system, and maybe they pull the voltages up a margin from the failure point.  However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.  In the worst case, the system will fail months later, and the blame might be assigned to, say, a kernel upgrade or patch when really the system failed due to intermittent lack of power.  &lt;br /&gt;
&lt;br /&gt;
Many would like to guard themselves again such a failure and consequently have opted to run a prime number stress test such as [http://www.mersenne.org/prime.htm| MPrime] in a &amp;quot;torture test&amp;quot; mode, while they ramp down their voltages to find a comfortable margin from the failure point.  However, as per recommendations from a [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2006-July/034806.html| thread of the Linux-Thinkpad mailing list], perhaps even more can be done.  Following such advice, this script not only runs MPrime, but also toggles on and off a lot of power-demanding features of the laptop throughout the course of the test.  The idea is to more rapidly expose corner cases in which the system might act up.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Please feel ''very free'' to improve/fix this script.  My intent for its posting is to make its ownership as public as possible.  There's no need to try to E-mail me to validate your changes.  If you feel they are in the best interest of the public, just make the changes.  The script attempts to employ pre-conditions to intelligently apply functionality only to those laptops that appear to support it.  Hopefully, its framework will allow for extension without heavy redesign.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN| There are ''very important'' warnings embedded into the comments of this script.  I have left them there because if you copy this script to your system, I would want you to carry these warnings as comments with you.  Please read these comments and the script very carefully.  Stress testing an undervolted system is not a trivial undertaking and you need to be as accountable as possible for what a script like this does.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# DESCRIPTION AND MOTIVATION &lt;br /&gt;
# --------------------------&lt;br /&gt;
# Designed for an undervolted laptops with frequency stepping, this script&lt;br /&gt;
# swings the system between aggressive and low power use, and also swings&lt;br /&gt;
# among the available frequencies.&lt;br /&gt;
# &lt;br /&gt;
# The idea is that such exteme use of the system will likely explore corner&lt;br /&gt;
# cases where the system might fail.  Hopefully, such testing can curtail the&lt;br /&gt;
# time necessary to establish confidence in undervolted systems.&lt;br /&gt;
#&lt;br /&gt;
# In the background the MPrime program, a prime number search engine, runs in a&lt;br /&gt;
# &amp;quot;torture test&amp;quot; mode, in which it tests computations against known results and&lt;br /&gt;
# errs out if there's a discrepancy.  Unless it errs out, this script runs&lt;br /&gt;
# forever.&lt;br /&gt;
# &lt;br /&gt;
# IMPLEMENTATION&lt;br /&gt;
# --------------&lt;br /&gt;
# The design of this script attempts to address the laptops beyond the Thinkpad&lt;br /&gt;
# T42 for which it was designed.  Many of the function definitions are prepended&lt;br /&gt;
# with conditionals that check the system for functionality and either bail out&lt;br /&gt;
# or disable features accordingly.&lt;br /&gt;
#&lt;br /&gt;
# In particular, the nature of what &amp;quot;aggressive&amp;quot; constitutes is defined by a &lt;br /&gt;
# number of &amp;quot;toggle_&amp;quot; functions.  The pre-pended conditional to these functions&lt;br /&gt;
# appends the function name to $AGGRESSIVE_TOGGLES if the system appears to&lt;br /&gt;
# support the feature.  The toggle_aggression function then calls all the &lt;br /&gt;
# functions in $AGGRESSIVE_TOGGLES.  Look at these &amp;quot;toggle_&amp;quot; functions for &lt;br /&gt;
# examples of how to extend this script for other possible stressing.&lt;br /&gt;
#&lt;br /&gt;
# EXTERNAL PROGRAMS EMPLOYED&lt;br /&gt;
# --------------------------&lt;br /&gt;
# Test system integriy (required):  MPrime - http://www.mersenne.org/prime.htm&lt;br /&gt;
# Download files:  curl - http://curl.haxx.se&lt;br /&gt;
# Read random sectors from CD:  spew (for gorge) - http://spew.berlios.de&lt;br /&gt;
# Keep hard disk active:  stress - http://weather.ou.edu/~apw/projects/stress/&lt;br /&gt;
#&lt;br /&gt;
# EXECUTION&lt;br /&gt;
# ---------&lt;br /&gt;
# Read this script including all the warnings below, and then make sure all the&lt;br /&gt;
# variables in the &amp;quot;Script Globals&amp;quot; section are appropriately set. &lt;br /&gt;
#&lt;br /&gt;
# This script uses the mprime binary with the &amp;quot;-t&amp;quot; switch for the MPrime&lt;br /&gt;
# &amp;quot;torture test.&amp;quot;  This test by default uses all the memory available on the&lt;br /&gt;
# system.  However, if you run this system for many hours, your kernel may run&lt;br /&gt;
# out of memory, and kill mprime and this script.  To spare yourself this&lt;br /&gt;
# problem, use the &amp;quot;NightMemory=&amp;quot; and &amp;quot;DayMemory=&amp;quot; parameters in MPrime's&lt;br /&gt;
# local.ini file, a file typically in the same directory as the mprime&lt;br /&gt;
# executable (read the MPrime documentation for specifics).  The torture test&lt;br /&gt;
# by default uses the greater of these two settings, so just set them both a&lt;br /&gt;
# reasonable margin away from the total amount of memory available on your&lt;br /&gt;
# system.  On a system with 512MB of RAM, I set these parameters both to 448,&lt;br /&gt;
# and had enough memory left over to run my normal set of background processes.&lt;br /&gt;
#&lt;br /&gt;
# The arguments of this script are &amp;quot;aggression&amp;quot; toggles to disable.  Any&lt;br /&gt;
# function below that begins with &amp;quot;toggle_$OPTION&amp;quot; can be disabled by using&lt;br /&gt;
# $OPTION as one of the arguments of this script.  Otherwise, all the stressing&lt;br /&gt;
# that a system supports are enabled by default.&lt;br /&gt;
#&lt;br /&gt;
# Because of Warning 3 below, I recommend you run this script as&lt;br /&gt;
#&lt;br /&gt;
#     stress_test 2&amp;gt;&amp;amp;1 | tee output&lt;br /&gt;
#&lt;br /&gt;
# so that you have a persistent record of what has happened in case your battery&lt;br /&gt;
# drains completely.&lt;br /&gt;
#&lt;br /&gt;
# Keeping in mind Warning 1.1, run the script for as long as it takes to &lt;br /&gt;
# establish confidence in your system (a few hours, half a day, etc.).&lt;br /&gt;
#&lt;br /&gt;
# WARNINGS&lt;br /&gt;
# --------&lt;br /&gt;
# 1) This is a STRESS test, and it is very possible that you may witness some&lt;br /&gt;
# very bad behavior.  Some systems might already be on the verge of breaking,&lt;br /&gt;
# and this script might push them over the edge, and damage them irreparably.&lt;br /&gt;
# Especially since you've probably undervolted your system, please accept the&lt;br /&gt;
# inherent risk in running this script.  In fact, I have even seen some&lt;br /&gt;
# unexpected behavior on non-undervolted systems running this script.  &lt;br /&gt;
#&lt;br /&gt;
# 1.1) This is a STRESS test, and it will run your system very hot at times.&lt;br /&gt;
# Since you are probably running this test because you've undervolted your&lt;br /&gt;
# system, you assumedly care a lot about conserving your battery's charge.&lt;br /&gt;
# However, running a system hot and needlessly running through charging cycles&lt;br /&gt;
# will tax your battery more than just normal use.  It is very difficult to&lt;br /&gt;
# even estimate how much of your battery's life you may throw away running&lt;br /&gt;
# this test.  In all likelihood on a battery that's not too old or too new, it&lt;br /&gt;
# should be imperceptible, and the security you'll gain after running this test&lt;br /&gt;
# will be worth it.  You can alway run this script without the battery&lt;br /&gt;
# connected -- just run it with an &amp;quot;ac_via_smapi&amp;quot; argument to disable &lt;br /&gt;
# toggling from the ac to battery power.&lt;br /&gt;
#&lt;br /&gt;
# 2) Please READ THIS SCRIPT BEFORE RUNNING IT.  It was very much designed for my&lt;br /&gt;
# personal system, and although it worked very well for my needs, it relies &lt;br /&gt;
# heavily on a number of external programs for full functionality.  Finding these&lt;br /&gt;
# programs isn't so bad (with the exception of MPrime all were available as &lt;br /&gt;
# Debian packages -- spew, gorge, curl, etc.).  As I noted above, I've tried to &lt;br /&gt;
# structure this script such that it can be extended (as opposed to overwritten) &lt;br /&gt;
# to support other functionality.  However, you should also read this script &lt;br /&gt;
# entirely because it's not mature, so it's difficult for me to document all the &lt;br /&gt;
# strange ways in which it might behave under various circumstances.&lt;br /&gt;
#&lt;br /&gt;
# 3) This script might drain your battery completely.  It has some strong measures&lt;br /&gt;
# to prevent that from happening, but I can't make guarantees.   &lt;br /&gt;
#&lt;br /&gt;
# 4) Be mindful that upon breaking out of this script, your system maybe not be&lt;br /&gt;
# in an agreeable state.  There is a bash trap that performs a lot of cleanup &lt;br /&gt;
# if you exit with a Ctrl-C.  But I didn't make the code to revert the CD's speed, &lt;br /&gt;
# the wireless device's original txpower, the display's brightness, etc.  Also, the &lt;br /&gt;
# bash trap isn't perfect, and might fail to restore the system.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
set -e  # Script designed to bail out on any irregularities.&lt;br /&gt;
&lt;br /&gt;
##############################################&lt;br /&gt;
# SCRIPT GLOBALS                             #&lt;br /&gt;
#  (may need some adjusting for your system) #&lt;br /&gt;
##############################################&lt;br /&gt;
&lt;br /&gt;
MPRIME_BIN=&amp;quot;./gimps/mprime&amp;quot; # MPrime binary location (get from&lt;br /&gt;
                            #   http://www.mersenne.org/freesoft.htm)&lt;br /&gt;
AGGRESSIVE_SLEEP_SEC=90     # Seconds for &amp;quot;agressive&amp;quot; testing interval when &lt;br /&gt;
                            #   testing with a fixed frequency&lt;br /&gt;
NONAGGRESSIVE_SLEEP_SEC=120 # Seconds for non-&amp;quot;aggressive&amp;quot; testing interval&lt;br /&gt;
                            #   when testing with a fixed frequency&lt;br /&gt;
FREQ_CYCLE_SLEEP_SEC=15     # Seconds for each random frequency when testing&lt;br /&gt;
                            #   with a fixed aggression&lt;br /&gt;
FREQ_CYCLE_NUM=15           # Number of random frequencies to cycle through &lt;br /&gt;
                            #   when testing with a fixed aggression&lt;br /&gt;
CAPACITY_LIMIT=50           # Minimum mWh required in battery before the script&lt;br /&gt;
                            #   takes time out to recharge the battery&lt;br /&gt;
SECONDS_TO_CHARGE=300       # Seconds to charge is $CAPACITY_LIMIT is reached&lt;br /&gt;
WIFI_DEVICE=eth1            # Set to garbage if you don't want to use wifi &lt;br /&gt;
MAX_TXPOWER=20              # Tx power (dB) used for wifi device in aggressive&lt;br /&gt;
                            #   mode (off in non-aggressive mode)&lt;br /&gt;
CDROM_DEV_FILE=/dev/hdc     # Set to garbage if you don't want to use the CD-ROM&lt;br /&gt;
MAX_CD_SPEED=24             # Speed of CD in aggressive mode (off in&lt;br /&gt;
                            #   non-aggressive mode)&lt;br /&gt;
&lt;br /&gt;
# Some services need to be stopped to prevent a conflict with&lt;br /&gt;
# aggressive/non-aggressive mode settings.  These services are restarted in&lt;br /&gt;
# reverse order upon the script's exit.  You can customize the path to these&lt;br /&gt;
# scripts here if your flavor of GNU doesn't use /etc/init.d/.&lt;br /&gt;
#&lt;br /&gt;
SERVICES_TO_STOP=&amp;quot;tpsmapi powernowd acpid sleepd laptop-mode&amp;quot;&lt;br /&gt;
PATH_TO_SERVICES_SCRIPTS=&amp;quot;/etc/init.d&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Some info that should be in SysFS or ProcFS.&lt;br /&gt;
#&lt;br /&gt;
SYS_CPU_DIR=/sys/devices/system/cpu/cpu0/cpufreq&lt;br /&gt;
FREQS=&amp;quot;$(cat $SYS_CPU_DIR/scaling_available_frequencies)&amp;quot;&lt;br /&gt;
FREQS_ARRAY=($FREQS)&lt;br /&gt;
SYS_TPSMAPI_BAT_DIR=/sys/devices/platform/smapi/BAT0&lt;br /&gt;
IBM_ACPI_BRIGHTNESS_FILE=/proc/acpi/ibm/brightness&lt;br /&gt;
RF_KILL_FILE=/sys/class/net/$WIFI_DEVICE/device/rf_kill&lt;br /&gt;
&lt;br /&gt;
############&lt;br /&gt;
# BINARIES #&lt;br /&gt;
############&lt;br /&gt;
#&lt;br /&gt;
# Establishes paths for all binaries to make it easier for functions to test if&lt;br /&gt;
# they are executable with 'test -x &amp;quot;$BINARY_BIN&amp;quot;'.  &lt;br /&gt;
#&lt;br /&gt;
{&lt;br /&gt;
  CURL_BIN=$(which curl)&lt;br /&gt;
  GORGE_BIN=$(which gorge)&lt;br /&gt;
  STRESS_BIN=$(which stress)&lt;br /&gt;
  IWCONFIG_BIN=$(which iwconfig)&lt;br /&gt;
  IFUP_BIN=$(which ifup)&lt;br /&gt;
  IFDOWN_BIN=$(which ifdown)&lt;br /&gt;
  EJECT_BIN=$(which eject)&lt;br /&gt;
  CPUFREQSET_BIN=$(which cpufreq-set)&lt;br /&gt;
  KILLALL_BIN=$(which killall)&lt;br /&gt;
  RENICE_BIN=$(which renice)&lt;br /&gt;
} || true&lt;br /&gt;
&lt;br /&gt;
#############&lt;br /&gt;
# FUNCTIONS #&lt;br /&gt;
############# &lt;br /&gt;
&lt;br /&gt;
# clean_up()&lt;br /&gt;
#&lt;br /&gt;
# Kills mprime background job and starts services that were stopped at the&lt;br /&gt;
# beginning of the scripts execution.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then echo &amp;quot;Sorry, this script uses killall&amp;quot; ; exit 1&lt;br /&gt;
fi&lt;br /&gt;
for service in $SERVICES_TO_STOP ; do&lt;br /&gt;
  if [ ! -x &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service&amp;quot; ]&lt;br /&gt;
    then echo &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service can't be called.&amp;quot; ; exit 1&lt;br /&gt;
  fi&lt;br /&gt;
done&lt;br /&gt;
clean_up()&lt;br /&gt;
{&lt;br /&gt;
  $KILLALL_BIN -q mprime || true&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
  local SERVICES_TO_START=&amp;quot;&amp;quot;&lt;br /&gt;
  for service in $SERVICES_TO_STOP&lt;br /&gt;
    do SERVICES_TO_START=&amp;quot;$service $SERVICES_TO_START&amp;quot;&lt;br /&gt;
  done&lt;br /&gt;
  for service in $SERVICES_TO_START&lt;br /&gt;
    do $PATH_TO_SERVICES_SCRIPTS/$service start&lt;br /&gt;
  done&lt;br /&gt;
}&lt;br /&gt;
trap &amp;quot;echo 'cleaning up...' ; clean_up&amp;quot; SIGINT SIGTERM SIGHUP&lt;br /&gt;
&lt;br /&gt;
# do_sleep()&lt;br /&gt;
#&lt;br /&gt;
# Before starting a testing interval, checks in the battery is low, and charges the&lt;br /&gt;
# battery if necessary.  After the testing interval, the running status of the &lt;br /&gt;
# mprime background job is verified. &lt;br /&gt;
#&lt;br /&gt;
# TODO: I've not addressed multiple batteries, APM, or ACPI.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] &lt;br /&gt;
  then &lt;br /&gt;
    echo -n &amp;quot;WARNING: Thinkpad SMAPI SysFS interface not &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;available to detect if battery&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo -n &amp;quot;         level too low.  This script could drain &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;all of your battery.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
fi&lt;br /&gt;
do_sleep()&lt;br /&gt;
{&lt;br /&gt;
  if [ -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] ; then&lt;br /&gt;
    local REMAINING_CAPACITY&lt;br /&gt;
    while REMAINING_CAPACITY=$(cat $SYS_TPSMAPI_BAT_DIR/remaining_capacity \&lt;br /&gt;
                                2&amp;gt; /dev/std) \&lt;br /&gt;
      &amp;amp;&amp;amp; REMAINING_CAPACITY=${REMAINING_CAPACITY%% *} \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; ] \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; -lt &amp;quot;$CAPACITY_LIMIT&amp;quot; ] ; do&lt;br /&gt;
        echo ; echo -n &amp;quot;Battery is too low to continue, &amp;quot; &lt;br /&gt;
        echo &amp;quot;taking a break to charge up.&amp;quot;&lt;br /&gt;
        OLD_AGGRESSIVE=&amp;quot;$AGGRESSIVE&amp;quot;&lt;br /&gt;
        if [ &amp;quot;AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
        sleep $SECONDS_TO_CHARGE &lt;br /&gt;
        if [ ! &amp;quot;$OLD_AGGRESSIVE&amp;quot; = &amp;quot;$AGGRESSIVE&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    done&lt;br /&gt;
  fi&lt;br /&gt;
  sleep $1&lt;br /&gt;
  if kill -0 $MPRIME_PID 2&amp;gt; /dev/null &lt;br /&gt;
    then return 0&lt;br /&gt;
    else &lt;br /&gt;
      echo ; echo &amp;quot;mprime bailed out here!&amp;quot;&lt;br /&gt;
      clean_up&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# set_frequency()&lt;br /&gt;
#&lt;br /&gt;
# Changes the frequency of the processor to $1.&lt;br /&gt;
#&lt;br /&gt;
# TODO: Perhaps there should be other ways to change the frequency another way.&lt;br /&gt;
#       I found cpufreq-set convenient because it handles both ProcFS _and_&lt;br /&gt;
#       SysFS.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$CPUFREQSET_BIN&amp;quot; ] ; then&lt;br /&gt;
  echo &amp;quot;Sorry, the set_frequency() function needs to be updated&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  echo &amp;quot;    to change frequencies without cpufreq-set.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
set_frequency()&lt;br /&gt;
{&lt;br /&gt;
  $CPUFREQSET_BIN -f $1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ac_via_smapi()&lt;br /&gt;
#&lt;br /&gt;
# If the system is an Thinkpad with the tp_smapi kernel module set up, the &lt;br /&gt;
# ac power is cut in an aggressive mode and returned in the non-agressive mode. &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/force_discharge&amp;quot; \&lt;br /&gt;
  -a -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ac_via_smapi&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ac_via_smapi()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
    else &lt;br /&gt;
      echo 1 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 5 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ibm_acpi_brightness()&lt;br /&gt;
#&lt;br /&gt;
# If the Thinkpad ibm_acpi kernel module is set up, the brightness of screen&lt;br /&gt;
# is set to the brightest setting in an agressive mode and the dimmest setting&lt;br /&gt;
# otherwise.&lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$IBM_ACPI_BRIGHTNESS_FILE&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ibm_acpi_brightness&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ibm_acpi_brightness()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo level 0 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
    else echo level 7 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_intel_wireless()&lt;br /&gt;
#&lt;br /&gt;
# Turns the wireless device on in power-hogging mode when aggressive, and&lt;br /&gt;
# turns the device off otherwise.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Designed for the Intel 2200BG open source driver, and may not be &lt;br /&gt;
#   compatible with much else.  &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$RF_KILL_FILE&amp;quot; -a -x &amp;quot;$PKILL_BIN&amp;quot; -a -x &amp;quot;$IFDOWN_BIN&amp;quot; \&lt;br /&gt;
  -a -x &amp;quot;$IFUP_BIN&amp;quot; -a -x &amp;quot;$IWCONFIG_BIN&amp;quot; -a &amp;quot;$WIFI_DEVICE&amp;quot; ] \&lt;br /&gt;
    &amp;amp;&amp;amp; grep &amp;quot;$WIFI_DEVICE&amp;quot; /proc/net/wireless&lt;br /&gt;
      then &lt;br /&gt;
        AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_intel_wireless&amp;quot;&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE txpower $MAX_TXPOWER&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE power off&lt;br /&gt;
fi&lt;br /&gt;
toggle_intel_wireless()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo 1 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
    else &lt;br /&gt;
      echo 0 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
      $PKILL_BIN ^ifdown$\|^ifup$ || true&lt;br /&gt;
      $IFDOWN_BIN $WIFI_DEVICE 2&amp;gt; /dev/null || true&lt;br /&gt;
      $IFUP_BIN $WIFI_DEVICE 2&amp;gt; /dev/null&lt;br /&gt;
      local NUM_OF_TRIES=0&lt;br /&gt;
      while $IWCONFIG_BIN $WIFI_DEVICE | grep unassociated &amp;gt; /dev/null \&lt;br /&gt;
          &amp;amp;&amp;amp; [ &amp;quot;$NUM_OF_TRIES&amp;quot; -lt 15 ]&lt;br /&gt;
        do sleep 3&lt;br /&gt;
        NUM_OF_TRIES=$(($NUM_OF_TRIES + 1))&lt;br /&gt;
      done&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_gorge()&lt;br /&gt;
#&lt;br /&gt;
# In an aggressive mode, reads data from the CD-ROM at random offsets using the &lt;br /&gt;
# 'gorge' command (http://spew.berlios.de/).&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Don't use a DVD, as the speed set by `eject' doesn't affect DVDs.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Make sure to use a CD with more than 450MB of data.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$GORGE_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; -a -r &amp;quot;$CDROM_DEV_FILE&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_gorge&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_gorge()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $GORGE_BIN || true&lt;br /&gt;
    else &lt;br /&gt;
      $GORGE_BIN -r 450M $CDROM_DEV_FILE 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
      local GORGE_PID=$!&lt;br /&gt;
      #&lt;br /&gt;
      # My laptop needed a little priority push to get gorge CD reading started&lt;br /&gt;
      # in sync with the interval.&lt;br /&gt;
      #&lt;br /&gt;
      if [ -x &amp;quot;$RENICE_BIN&amp;quot; ]&lt;br /&gt;
        then $RENICE_BIN -2 -p $GORGE_PID &amp;gt; /dev/null&lt;br /&gt;
      fi&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_stress()&lt;br /&gt;
#&lt;br /&gt;
# Runs the `stress' program (http://weather.ou.edu/~apw/projects/stress/) in &lt;br /&gt;
# the aggressive mode with settings to issue a large number of write(), &lt;br /&gt;
# unlink(), and sync() events.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$STRESS_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_stress&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_stress()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $STRESS_BIN || true&lt;br /&gt;
    else $STRESS_BIN -q -i 1 -d 1 &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_curl()&lt;br /&gt;
#&lt;br /&gt;
# Downloads a file (to drain power through the wireless device) in the&lt;br /&gt;
# aggressive mode using `curl'.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$CURL_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_curl&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_curl()&lt;br /&gt;
{&lt;br /&gt;
  URL_FIRST_HALF=&amp;quot;http://cdimage.debian.org/cdimage/weekly-builds/&amp;quot;&lt;br /&gt;
  URL_SECOND_HALF=&amp;quot;i386/iso-cd/debian-testing-i386-binary-1.iso&amp;quot;&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $CURL_BIN || true&lt;br /&gt;
    else $CURL_BIN $URL_FIRST_HALF$URL_SECOND_HALF &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_aggression()&lt;br /&gt;
#&lt;br /&gt;
# Runs all the &amp;quot;toggle_&amp;quot; functions supported by the system unless specified&lt;br /&gt;
# as disabled in the script arguments.&lt;br /&gt;
#&lt;br /&gt;
for toggle_to_disable in $@ &lt;br /&gt;
  do AGGRESSIVE_TOGGLES=$(echo $AGGRESSIVE_TOGGLES \&lt;br /&gt;
                            | sed -e &amp;quot;s/toggle_$toggle_to_disable//&amp;quot;)&lt;br /&gt;
done&lt;br /&gt;
toggle_aggression()&lt;br /&gt;
{ &lt;br /&gt;
  for toggle in $AGGRESSIVE_TOGGLES ; do $toggle ; done&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE=&amp;quot;false&amp;quot;&lt;br /&gt;
    else AGGRESSIVE=&amp;quot;true&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#########&lt;br /&gt;
# SETUP #&lt;br /&gt;
#########&lt;br /&gt;
&lt;br /&gt;
# Stopping services that might interfere with the system state this script&lt;br /&gt;
# controls (precondition satisfied in definition of clean_up).&lt;br /&gt;
#&lt;br /&gt;
for service in $SERVICES_TO_STOP&lt;br /&gt;
  do /etc/init.d/$service stop&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Setting CD to a fast speed &lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$EJECT_BIN&amp;quot; ] &lt;br /&gt;
  then $EJECT_BIN -x $MAX_CD_SPEED&lt;br /&gt;
elif [ -x &amp;quot;$HDPARM_BIN&amp;quot; ]&lt;br /&gt;
  then $HDPARM_BIN -E $MAX_CD_SPEED&lt;br /&gt;
fi &lt;br /&gt;
&lt;br /&gt;
# Starting the prime number search&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$MPRIME_BIN&amp;quot; ] ; then &lt;br /&gt;
  echo &amp;quot;mprime program not executable/found.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi  &lt;br /&gt;
$MPRIME_BIN -t &amp;gt; mprime_output.txt &amp;amp;&lt;br /&gt;
MPRIME_PID=$!&lt;br /&gt;
&lt;br /&gt;
########&lt;br /&gt;
# BODY #&lt;br /&gt;
########&lt;br /&gt;
&lt;br /&gt;
while true ; do&lt;br /&gt;
  for f in $FREQS ; do&lt;br /&gt;
    echo &amp;quot;Cycling aggression twice for ${f}kHz: &amp;quot;&lt;br /&gt;
    set_frequency $f&lt;br /&gt;
    if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      echo &amp;quot;    high &amp;quot; ; do_sleep $AGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
      echo &amp;quot;    low &amp;quot; ; do_sleep $NONAGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
    done&lt;br /&gt;
    echo &lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      if [ $i -eq 1 ] &lt;br /&gt;
        then&lt;br /&gt;
          if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under high aggression: &amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under low aggression: &amp;quot;&lt;br /&gt;
      fi &lt;br /&gt;
      for (( i=1 ; i&amp;lt;=$FREQ_CYCLE_NUM ; i+=1 )) ; do&lt;br /&gt;
        FREQ=${FREQS_ARRAY[$(($RANDOM % 6))]}&lt;br /&gt;
        echo &amp;quot;    ${FREQ}...&amp;quot;&lt;br /&gt;
        set_frequency $FREQ&lt;br /&gt;
        do_sleep $FREQ_CYCLE_SLEEP_SEC&lt;br /&gt;
      done&lt;br /&gt;
      echo&lt;br /&gt;
    done&lt;br /&gt;
  done&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Pentium_M_undervolting_and_underclocking&amp;diff=23502</id>
		<title>Pentium M undervolting and underclocking</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Pentium_M_undervolting_and_underclocking&amp;diff=23502"/>
		<updated>2006-07-24T14:03:09Z</updated>

		<summary type="html">&lt;p&gt;TNKS: Added a stub for a stress testing script I wrote.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
Intel Pentium M processors from the [[Intel Pentium M (Dothan)|Dothan]] and [[Intel Pentium M (Banias)|Banias]] families can be instructed to operate at voltage and clock frequencies lower than the nominal ones recommended by Intel and used by ThinkPads by default. Experience shows that the processor may continue working correctly at lower-than-nominal voltages and frequencies, thereby reducing power consumption, heat and fan noise.&lt;br /&gt;
&lt;br /&gt;
In the Pentium M, speed and voltage are controlled by software (through the MSR registers). It is up to the operating system to choose the right voltage for each frequency. Normally this is done according to tables published by Intel or according to ACPI tables. However, this can be overriden - in the case of Linux, by a kernel patch.&lt;br /&gt;
&lt;br /&gt;
{{WARN|Following this instructions will operate your CPU under conditions it was not designed for. Even if your system seems stable, it may still suffer transient faults leading to arbitrary data corruption. In addition, errors in following these instructions (or changes between processor models) may operate the CPU ''above'' its nominal parameters, which, if taken too far, can cause kernel panics or even possibly hardware damage}}&lt;br /&gt;
&lt;br /&gt;
For an example of what may be achieved, on one ThinkPad {{T43}} all voltages could be reduced by 20-30% and moreover, the minimal frequency reduced from 800MHz to 533MHz; this reduced stable CPU temperature by 7-10deg under both idle and burn-in conditions. Combined with [[how to control fan speed|fan speed control]], this greatly reduced the [[Problem with fan noise|problem with fan noise]].&lt;br /&gt;
&lt;br /&gt;
{{NOTE|While under''volting'' has a clear measurable effect, it's not clear if under''clocking'' really works. &amp;lt;tt&amp;gt;/proc/cpuinfo&amp;lt;/tt&amp;gt; reflects the underclocked frequency, but enabling debug output on &amp;lt;tt&amp;gt;cpufreq&amp;lt;/tt&amp;gt; causes it to say things like &amp;quot;&amp;lt;tt&amp;gt;CPU frequency out of sync: cpufreq and timing core thinks of 533000, is 800000 kHz.&amp;lt;/tt&amp;gt;&amp;quot; where the former is the chosen underclocked frequency and the latter is the documented minimum frequency. This discrepancy also causes [[Software Suspend 2]] to oops during suspend.}}&lt;br /&gt;
&lt;br /&gt;
There are several methods to control CPU voltage in Linux, and currently all of them require a patched kernel.&lt;br /&gt;
&lt;br /&gt;
== Alternative 1: patch with hard-coded voltages ==&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
&lt;br /&gt;
# Determine the stable voltages for each frequency, using some overclocking/undervolting utility that has specific support for Pentium M (&amp;quot;Centrino&amp;quot;) processors. It seems that no such utility exists for Linux. For windows, one good choice is [http://www.pbus-167.com/chc.htm Notebook Hardware Control (NHC)], which conveniently also includes a table of nominal frequencies and voltags (in its help file).&amp;lt;br&amp;gt; Ascertain that at the undervolted settings the CPU actually performs correct computation ([http://www.mersenne.org/freesoft.htm Prime95] in &amp;quot;Tortute Test&amp;quot; mode seems to be a good partial test emphasizing FPU and memory access).&amp;lt;br&amp;gt; Note that beside reducing voltages (undervolting), you can also try to add lower frequencies (underclocking).&lt;br /&gt;
# Determine the model name string reported by the CPU, e.g., via the &amp;quot;&amp;lt;tt&amp;gt;Model name&amp;lt;/tt&amp;gt;&amp;quot; line in {{path|/proc/cpuinfo}}, and likewise the &amp;lt;tt&amp;gt;cpu_family&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;model&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stepping&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Grab a copy of the example patch below and update it to reflect the parameters, frequencies and voltages you found.&lt;br /&gt;
# Apply the patch to your kernel (tested with 2.6.13.1 and 2.6.14-rc2).&lt;br /&gt;
# To prevent the ACPI table from overriding your table, disable the &amp;lt;tt&amp;gt;CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI&amp;lt;/tt&amp;gt; kernel option.&lt;br /&gt;
# Compile and install the new kernel.&lt;br /&gt;
&lt;br /&gt;
The changes should be active now. If you want to see debug information attesting to thus, do the following:&lt;br /&gt;
&lt;br /&gt;
# Reboot in &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; mode.&lt;br /&gt;
# {{cmdroot|echo 2 &amp;gt; /sys/module/cpufreq/parameters/debug}}&lt;br /&gt;
# {{cmdroot|modprobe speedstep-centrino}}&lt;br /&gt;
# {{cmdroot|dmesg}} and check for the message &amp;quot;&amp;lt;tt&amp;gt;speedstep-centrino: found &amp;quot;Intel(R) Pentium(R) M processor &amp;lt;/tt&amp;gt;...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you don't see that message, you got the &amp;lt;tt&amp;gt;cpu_id&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;model_name&amp;lt;/tt&amp;gt; parmaeters wrong. If your system crashes, re-test the voltages and adjust accordingly.&lt;br /&gt;
&lt;br /&gt;
Please report your results (including voltages)!&lt;br /&gt;
&lt;br /&gt;
=== Linux kernel patch (example) ===&lt;br /&gt;
&lt;br /&gt;
The following example shows how to undervolt a Pentium M 750 (1.86GHz) on a ThinkPad {{T43}}. As discussed above, the parameters are specific to this one CPU. You will need to experimentally find the correct settings for your own CPU and adjust the patch accordingly.&lt;br /&gt;
&lt;br /&gt;
Note that the Pentium M 750 has a 533MHz FSB (quad-pumped 133MHz), hence the use of &amp;lt;tt&amp;gt;OP133&amp;lt;/tt&amp;gt;. If you have a Pentium M with 400MHz FSB (i.e., quad-pumped 100MHz, found in [[Intel Pentium M (Banias)|Banias]] and older [[Intel Pentium M (Dothan)|Dothan]]) then in the voltage table change &amp;lt;tt&amp;gt;OP133&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;OP&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;--- linux-2.6.13.1-vanilla/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2005-09-10 05:42:58.000000000 +0300&lt;br /&gt;
+++ linux-2.6.13.1/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2005-10-18 04:46:01.000000000 +0200&lt;br /&gt;
@@ -54,6 +54,7 @@ enum {&lt;br /&gt;
 	CPU_DOTHAN_A1,&lt;br /&gt;
 	CPU_DOTHAN_A2,&lt;br /&gt;
 	CPU_DOTHAN_B0,&lt;br /&gt;
+	CPU_DOTHAN_C0,&lt;br /&gt;
 	CPU_MP4HT_D0,&lt;br /&gt;
 	CPU_MP4HT_E0,&lt;br /&gt;
 };&lt;br /&gt;
@@ -63,6 +64,8 @@ static const struct cpu_id cpu_ids[] = {&lt;br /&gt;
 	[CPU_DOTHAN_A1]	= { 6, 13, 1 },&lt;br /&gt;
 	[CPU_DOTHAN_A2]	= { 6, 13, 2 },&lt;br /&gt;
 	[CPU_DOTHAN_B0]	= { 6, 13, 6 },&lt;br /&gt;
+	[CPU_DOTHAN_C0]	= { 6, 13, 8 },&lt;br /&gt;
 	[CPU_MP4HT_D0]	= {15,  3, 4 },&lt;br /&gt;
 	[CPU_MP4HT_E0]	= {15,  4, 1 },&lt;br /&gt;
 };&lt;br /&gt;
@@ -94,6 +97,12 @@ static struct cpufreq_driver centrino_dr&lt;br /&gt;
 		.frequency = (mhz) * 1000,				\&lt;br /&gt;
 		.index = (((mhz)/100) &amp;lt;&amp;lt; 8) | ((mv - 700) / 16)		\&lt;br /&gt;
 	}&lt;br /&gt;
+/* Likewise, for processors with 133MHz FSB. */&lt;br /&gt;
+#define OP133(mhz, mv)							\&lt;br /&gt;
+	{								\&lt;br /&gt;
+		.frequency = (mhz) * 1000,				\&lt;br /&gt;
+		.index = (((mhz)/133) &amp;lt;&amp;lt; 8) | ((mv - 700) / 16)		\&lt;br /&gt;
+	}&lt;br /&gt;
 &lt;br /&gt;
 /*&lt;br /&gt;
  * These voltage tables were derived from the Intel Pentium M&lt;br /&gt;
@@ -202,7 +211,26 @@ static struct cpufreq_frequency_table ba&lt;br /&gt;
 	OP(1700, 1484),&lt;br /&gt;
 	{ .frequency = CPUFREQ_TABLE_END }&lt;br /&gt;
 };&lt;br /&gt;
+&lt;br /&gt;
+/* Intel Pentium M 750, drastically undervoltaged */&lt;br /&gt;
+static struct cpufreq_frequency_table pentium_m_750[] =&lt;br /&gt;
+{&lt;br /&gt;
+	    /* MHz   mV */&lt;br /&gt;
+	OP133( 800,  700),&lt;br /&gt;
+	OP133(1066,  780),&lt;br /&gt;
+	OP133(1200,  828),&lt;br /&gt;
+	OP133(1333,  876),&lt;br /&gt;
+	OP133(1466,  924),&lt;br /&gt;
+	OP133(1600,  972),&lt;br /&gt;
+	OP133(1733, 1020),&lt;br /&gt;
+	OP133(1866, 1068),&lt;br /&gt;
+	{ .frequency = CPUFREQ_TABLE_END }&lt;br /&gt;
+};&lt;br /&gt;
+&lt;br /&gt;
 #undef OP&lt;br /&gt;
+#undef OP133&lt;br /&gt;
 &lt;br /&gt;
 #define _BANIAS(cpuid, max, name)	\&lt;br /&gt;
 {	.cpu_id		= cpuid,	\&lt;br /&gt;
@@ -225,6 +253,12 @@ static struct cpu_model models[] =&lt;br /&gt;
 	BANIAS(1500),&lt;br /&gt;
 	BANIAS(1600),&lt;br /&gt;
 	BANIAS(1700),&lt;br /&gt;
+	{&lt;br /&gt;
+		.cpu_id     =  &amp;amp;cpu_ids[CPU_DOTHAN_C0],&lt;br /&gt;
+		.model_name = &amp;quot;Intel(R) Pentium(R) M processor 1.86GHz&amp;quot;,&lt;br /&gt;
+		.max_freq   = 1866000,&lt;br /&gt;
+		.op_points  = pentium_m_750&lt;br /&gt;
+	},&lt;br /&gt;
 &lt;br /&gt;
 	/* NULL model_name is a wildcard */&lt;br /&gt;
 	{ &amp;amp;cpu_ids[CPU_DOTHAN_A1], NULL, 0, NULL },&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't forget to disable &amp;lt;tt&amp;gt;CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Alternative 2: patch with user-space control==&lt;br /&gt;
&lt;br /&gt;
{{NOTE|There's a new project under http://linux-phc.sourceforge.net/ with updated patches. Note that the list of voltages may be reversed (lowest frequency first) compared to the original patch disucssed here. }}&lt;br /&gt;
&lt;br /&gt;
If you want to use the Ubuntu 2.6.15 Kernel, please have a look at this thread: http://ubuntuforums.org/showthread.php?t=146366&lt;br /&gt;
&lt;br /&gt;
The [http://fabrice.bellamy.club.fr/bdz.undervolt.2005.10.22.a.patch bdz.undervolt.2005.10.22.a.patch] patch, written by Gentoo-Wiki user &amp;quot;Bdz&amp;quot;, allows voltages to be changed without reboot.&lt;br /&gt;
&lt;br /&gt;
It presents a userspace interface, as in the following example:&lt;br /&gt;
:{{cmdroot|cat /sys/devices/system/cpu/cpu0/cpufreq/voltage_table}}&lt;br /&gt;
:{{cmdresult|1356,1356,1356,1356,1356,1356,1356,1244,1116,988}}&lt;br /&gt;
:{{cmdroot|echo &amp;quot;1084,1084,1084,1084,1084,1084,1084,988,908,860&amp;quot; &amp;gt;/sys/devices/system/cpu/cpu0/cpufreq/voltage_table}}&lt;br /&gt;
&lt;br /&gt;
The relevant [http://gentoo-wiki.com/HOWTO_Undervolt_a_Pentium_M_CPU page] on Gentoo-Wiki providues further information and some helpful hints and scripts for voltage adjustment.&lt;br /&gt;
&lt;br /&gt;
When applying this patch be sure to keep the &amp;quot;ACPI tables for decoding frequency pairs&amp;quot; option -- this patch only allows adjustment of the voltages for the normal clock speeds as reported by the ACPI table in the BIOS.  On some models (e.g., ThinkPad {{T43}}) this does not include all clock speeds supported by the processor.&lt;br /&gt;
&lt;br /&gt;
===Initscript===&lt;br /&gt;
This is a Gentoo initscript for the patch from Gentoo-Wiki user &amp;quot;Bdz&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Configuration file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/conf.d/undervoltage&lt;br /&gt;
&lt;br /&gt;
# voltage table sysfs interface&lt;br /&gt;
VTABLE_SYSFS=&amp;quot;/sys/devices/system/cpu/cpu0/cpufreq/voltage_table&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# switch back to  DEFAULT_VTABLE if undervoltage is stopped? [yes/no]&lt;br /&gt;
SWITCH_BACK=&amp;quot;no&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# pentium-m banias 1,7GHz default voltages&lt;br /&gt;
DEFAULT_VTABLE=&amp;quot;1484,1308,1228,1116,1004,956&amp;quot;&lt;br /&gt;
# pentium-m banias 1,7GHz lowered voltages [ -208mV ]&lt;br /&gt;
MOD_VTABLE=&amp;quot;1276,1100,1020,908,796,748&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initscript&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
# Copyright 1999-2005 Gentoo Foundation&lt;br /&gt;
# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;
# $Header: $&lt;br /&gt;
&lt;br /&gt;
sysfs_check() {&lt;br /&gt;
&lt;br /&gt;
        if ! [ -e ${VTABLE_SYSFS} ]; then&lt;br /&gt;
                logger &amp;quot;No sysfs voltage_table present. Modifying vcore voltage failed.&amp;quot;&lt;br /&gt;
                eerror &amp;quot;It seems that the undervolting patch has not been applied to the kernel.&amp;quot;&lt;br /&gt;
                eerror &amp;quot;see http://gentoo-wiki.com/HOWTO_Undervolt_a_Pentium_M_CPU for further information&amp;quot;&lt;br /&gt;
                return 1&lt;br /&gt;
        fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
        sysfs_check || return 1&lt;br /&gt;
        ebegin &amp;quot;Switching to modified voltage table [${MOD_VTABLE}]&amp;quot;&lt;br /&gt;
                echo ${MOD_VTABLE} &amp;gt; ${VTABLE_SYSFS}&lt;br /&gt;
        eend $?&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# I think it is not necessary to switch to the default voltage table on shutdown&lt;br /&gt;
stop() {&lt;br /&gt;
        if [ $SWITCH_BACK = &amp;quot;yes&amp;quot; ]; then&lt;br /&gt;
                ebegin &amp;quot;Switching back to default voltage table [${DEFAULT_VTABLE}]&amp;quot;&lt;br /&gt;
                        echo ${DEFAULT_VTABLE} &amp;gt; ${VTABLE_SYSFS}&lt;br /&gt;
                eend $?&lt;br /&gt;
        fi &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alternative 3: another patch with user-space control==&lt;br /&gt;
&lt;br /&gt;
The [http://avkrok.net/nw8240/centrino-voltages.diff centrino-voltages.diff] patch, written by Rickard Holmberg, also provides user-space control. See [http://avkrok.net/nw8240/ here] and [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-December/030772.html here] for usage.&lt;br /&gt;
&lt;br /&gt;
==Stress Testing==&lt;br /&gt;
&lt;br /&gt;
This [[Undervolt Stress Testing Script|script]] illustrates a very conservative method to stress test your lowered voltage settings.&lt;br /&gt;
&lt;br /&gt;
==Tested frequencies==&lt;br /&gt;
&lt;br /&gt;
If you have done excessive testing with user defined frequencies (stable system for over a month).&lt;br /&gt;
and no lookups occur when computing primes with mprime http://mersenne.org/ (gentoo: 'emerge gimps')&lt;br /&gt;
you can post your frequencies here. But note that this is just a rough indication, since the stable values will differ between individual processors, even in the same model.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! CPU Type !! GHz !! Frequency Steps&lt;br /&gt;
|-&lt;br /&gt;
| Pentium-M Banias || 1.7  || 1276,1100,1020,908,796,748&lt;br /&gt;
|-&lt;br /&gt;
| Pentium-M Dothan || 1.4 || 924,892,860,828,796,764,732,700&lt;br /&gt;
|-&lt;br /&gt;
| Pentium-M Dothan || 1.86 || 1068,972,876,780,700&lt;br /&gt;
|-&lt;br /&gt;
| Pentium-M SL6F7  || 1.6  || 1196,1052,956,860,780,732&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Patches]]&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=ThinkWiki:Sandbox&amp;diff=23499</id>
		<title>ThinkWiki:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=ThinkWiki:Sandbox&amp;diff=23499"/>
		<updated>2006-07-24T13:51:51Z</updated>

		<summary type="html">&lt;p&gt;TNKS: /* Main Headline Text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the ThinkWiki sandbox.&lt;br /&gt;
Here you can enter anything to explore the functions of the MediaWiki Software.&lt;br /&gt;
&lt;br /&gt;
[http://00007.com/ Spam Test3]&lt;br /&gt;
&lt;br /&gt;
Test Test2 Test3 Test4&lt;br /&gt;
&lt;br /&gt;
'''Some math: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{k=1}^n k = \frac{n(n+1)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
(type '''&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\sum_{k=1}^n k = \frac{n(n+1)}{2}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;''' for this)&lt;br /&gt;
&lt;br /&gt;
math test&lt;br /&gt;
&amp;lt;math&amp;gt;\log_a b = \frac{\log_c b}{\log_c a}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Some italic text''&lt;br /&gt;
&lt;br /&gt;
'''Some bold text'''&lt;br /&gt;
&lt;br /&gt;
= Main Headline Text =&lt;br /&gt;
See [[Script A|Script B]] for a script&lt;br /&gt;
== Headline text ==&lt;br /&gt;
&lt;br /&gt;
=== Subhead Text ===&lt;br /&gt;
&lt;br /&gt;
[http://www.thinkwiki.org External Link] ''hey, that's no external link :-)''&lt;br /&gt;
&lt;br /&gt;
* List 1&lt;br /&gt;
* List 2&lt;br /&gt;
** List 2a&lt;br /&gt;
** List 2b&lt;br /&gt;
* List 3&lt;br /&gt;
abc&lt;br /&gt;
&lt;br /&gt;
This is a test&lt;br /&gt;
&lt;br /&gt;
asdf&lt;br /&gt;
as&lt;br /&gt;
dfv&lt;br /&gt;
asdf&lt;br /&gt;
asd&lt;br /&gt;
f&lt;br /&gt;
asdf&lt;br /&gt;
asd&lt;br /&gt;
&lt;br /&gt;
:{{cmdroot|ls -l}}&lt;br /&gt;
:{{cmduser|ls -l}}&lt;br /&gt;
:{{cmdresult|shell response}}&lt;br /&gt;
{{NOTE|test note}}&lt;br /&gt;
[[test]]&lt;br /&gt;
&lt;br /&gt;
{{Template sandbox|full width hint}}&lt;br /&gt;
&lt;br /&gt;
{{Template sandbox|floating hint|width=20em}}&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
</feed>