README.TXT for CpuIdle Win95/98 CpuIdle is Copyright (C) 1997,98 Andreas Goetz. goetz@stud.uni-hannover.de http://www.stud.uni-hannover.de/~goetz FREEWARE 1. What is it 2. Installation 3. Introduction 4. Optimization 5. Command Line and Features 6. Supported Hardware 7. Availability 8. Legal 9. Thanks 1. What is it CpuIdle runs a HLT command in an idle priority thread under Win95/98. That allows modern microprocessors to save power and stay cool. Great for overclocking. CpuIdle's is also the best and most complete CPU optimizer for Win95/98 that exists. Most CPUs include performance increasing options that are disabled by default. CpuIdle activates them all! 2. Installation Unzip the distribution archive (cpuidleXX.zip) into any directory. There is NO need to copy the VxD into the Windows System directory! Run CpuIdle. If you want to start CpuIdle each time you start Win95/98 you should use the Control Panel plugin. To install this run CpuIdle, select the Control Panel sheet and mark the "Enable CpuIdle Control Panel plugin" checkbox, then press OK. If you don't want to use this plugin it is recommended to place a shortcut pointing to cpuidle.exe into the Windows StartUp folder. Note: If your Control Panel is missing the "Energy" folder you won't be able to use the Control Panel plugin. German users: It has been reported that CpuIdle cannot find it's VxD drivers when it's installed in a path containing mutated vowels (ä, ö...). Do not use the path names for CpuIdle installation directory or copy the VxD into the System directory. 3. Introduction Due to CMOS technology in which modern microprocessors are manufactured they do not only consist of transistors but also capacitors and resistors. The resistors create heat that must be conducted away from the processor. This is easier with higher temperature gradients. It is for that reason that microprocessors are not only equipped with large heat spreaders but also actively cooled with fans or Peltier cooling elements. Higher temperatures worsen parasitic effects like elektromigration or oxide breakdown that might eventually lead to failure. A temperature increase of 10 degrees centigrade means halfed lifetime for chips. This not only holds for the microprocessor but also for the voltage regulation module (VRM) that supplies the IO- and core voltages. Especially out-dated or cheap mainboard designs employ passive VRMs that generate additional heat in the PC. Under normal circumstances the CPU isn't always active but spends much time waiting for the keyboard, harddisk or CD-ROM. What would be more logical than to turn off the CPU for that period? That's exactly what the HLT machine instruction (Opcode F4) does. Whenever the CPU encounters a HLT instruction the clock is halted and the CPU enters suspend mode until an interrupt, NMI or reset happens. With the advent of power saving microprocessors like the Cyrix Cx486S the instruction acquired an additional property. When "Suspend on HLT" is enabled in the configuration register the processor not only stops on HLT but also enters the power saving suspend mode. Modern operating systems like Linux or Windows NT execute the HLT instruction in an idle priority thread. This thread is always executed when- as the name implies- the CPU is otherwise idle. Therefore no additional execution time is needed, the CPU will not run slower. This does not hurt performance since the CPU controls the powering-down of specific internal parts by hardware-control, so there's no software intervention needed for explicitly re-enabling a powered-down part (cited from set6x86 readme by Koen Gadeyne). Using this feature the power consumption at the Windows NT prompt can be- according to German c't magazine- 2.1A (K6-166) to 5.3A (K6 233) lower than at the DOS prompt. With Intel processors the power saving is lower but also measurable. For Cyrix the "Suspend on HLT" feature must first be enabled if the BIOS does not provide support. That can be done with tools like cx86 from http://www.heise.de/ct/ftp or set6x86. Unfortunately, Windows 95 does not support HLT. To remove this limitation CpuIdle provides an idle thread executing HLT for Windows 95. Since HLT is a privileged instruction it can only be executed on ring 0 whereas normal Windows programs run on ring 3. CpuIdle uses a virtual device driver (VxD) that can run on ring 0 to execute HLT. On the test system (K6-200) the temperature as measured below the fan could be lowered by more than 10 degrees centigrade when Windows was idle. 4. Optimization CpuIdle can and does by default enable the following features on your CPU: | P5/P5MMX | PII | K5/K6/K6 3D | M1SC/M1/M2 | IDT C6 --------------------+----------+-------+-------------+------------+--------- Write Allocatation | | | Yes | Yes | --------------------+----------+-------+-------------+------------+--------- Auto HLT | Yes | Yes | | | Yes Low Power on AHD | Yes(MMX) | | | | Suspend on HLT | | | Always On | Yes | --------------------+----------+-------+-------------+------------+--------- No Locking | | Yes | | Yes | --------------------+----------+-------+-------------+------------+--------- Weak Ordering | | | | | Yes When a features exists on a CPU it will be enabled. If you experience problems with this please read the next section on how to disable the features you don't need. 5. Command Line and Features * Popup menu * Right-clicking on CpuIdle reveals a self-explenatory popup menu. Check or uncheck the "Enabled" menu item to turn idling on/ off. The same can be done by double-clicking on the taskbar icon. If started without any parameters CpuIdle will consume about 500KB of 32Bit memory (according to Wintop from MS Kernel Toys). The largest part of this memory is used for the nice interface, icons and bitmaps. If you think that this is too much and you don't need the interface see -loadonly below. * CPU Info sheet * On the "CPU Info" sheet various CPU parameters like vendor (i.e. AMD), family (i.e. family 5 meaning P5), chip stepping and clock rate are displayed. If you the "CPUID not supported on this machine" message you either have a CPU that is too old to support the CPUID instruction (386, some 486) or it is disabled on your machine or you used the -noID switch. Cyrix CPUs allow to enable/ disable the availability of CPUID, you can set this with tools like set6x86 or 6x86opt. For Cyrix CPUs further information is displayed, like Write Allocation or Suspend on HLT (if you see that this is disabled CpuIdle can't do much good for your Cyrix based system). Even if Windows has identified your CPU as "CyrixInstead" (also via CPUID), Windows obviously first enables CPUID, executes the instruction and then disables it again (at least in OSR2). Unfortunately enabling is a privileged instruction and only allowed for the system. Maybe later releases of CpuIdle will address this problem. If your CPU is not or not correctly identified by CpuIdle, or the displayed clock rate is incorrect, CpuIdle's main function, the cooling of your CPU, is NOT impaired. * Command line switches * If you run CpuIdle manually select "Start/Execute" from the taskbar and specify the CpuIdle location and any switches desired. If you have created a link to cpuidle.exe right-click on the link, select "Properties" and enter the switches into "Destination". -hide Loads CpuIdle without displaying the taskbar idle icon. The drawback is that if you want to exit or restart CpuIdle you'll first have to kill the program manually since there's no hotkey available to redisplay the icon. The CpuIdle display can also be hidden by selecting "Hide" in the CpuIdle menu. -quit Tells CpuIdle to quit after optimizing your CPU, loading the Vxd and starting the idle process. The VxD and the idle process will stay in memory. CpuIdle will then need less than 64K of memory. Unfortunately ome programs are able kill the idle process. Windows CPU monitor is one of these. When you start such a program CpuIdle will still display "enabled" though it does no longer receive idle cycles. There is no way for CpuIdle to detect this. To prevent this either CpuIdle or the Control Panel plugin must be running. In this case the failsafe feature will restart the idle process each 30 seconds. -noExt NoExt is used to turn off the use of extened CPUID codes above 0x8000000 since not all CPUs support these codes. You souldn't normally need this since CpuIdle can detect this itself. Switches for disabling processor specific features: Beginning with version 2.5 CpuIdle enables all performance increasing CPU features by default. This removes the need for any DOS-based CPU optimizers. If you do not need or want these features to be enabled, you can use the follwing switches to override the default behaviour. Note: These switches are only for the experienced user. You shouldn't normally need them. If you're not sure if you want or need this read the very good manual for 6x86opt from http://www.alternativecpu.com - nolock: disables the use of "NO_LOCK" on Cyrix and PII processors - nowtalloc: disables the use of "Write Allocation" on Cyrix and AMD K5/K6 processors - nosuspend: disables the use of "Suspend on HLT" on Cyrix, IDT C6 and Intel P5/P5MMX/PII processors - noopt: disables ALL optimization switches Note: The following switches that were introduced with version 2.4 to enable some features specific to Cyrix CPUs are no longer supported by CpuIdle. CpuIdle now enables all performance increasing features by default (equivalent to the use of cxall in v2.4). No longer supported: - cxsusphlt: enable "Suspend on HLT" - cxnolock: enable "NO_LOCK" locked bus cycles are disabled, leading to higher performance - cxwtalloc: enable "WT_ALLOC" - write allocation increases performance of the CPU-memory interface - cxall: enable all of the above options * Example * Let's say you have a Cyrix 6x86MX, you want to get the most out of it, you don't want to use any DOS programs (like 6x86opt) but you still need locked bus cycles (whyever). Thanks to the person who send this "how to": Make a short cut to the program, right mouse click on the short cut, go down and click on properties, select the shortcut tab, you can add the switches where it says target.  After you have verified that the short cut works, it is recommended to copy it to your StartUp folder. The switches you could use in case are: \programs\cpuidle.exe -nolock * Failsafe feature * Since v2.4 CpuIdle has a failsafe feature. As written below (read about -wait switch), some programs are able kill the idle process. Windows CPU monitor is one of these. When you start such a program CpuIdle will still display "enabled" though it does no longer receive idle cycles. There is no way for CpuIdle to detect this. Since this could be dangerous for overclocked CPUs CpuIdle now has a built-in failsafe mode. With this mode CpuIdle will restart the idle process each 30 seconds (this does not consume CPU time) so the longest time for which your CPU will run without support from CpuIdle is below 30 seconds. Note: For this feature to work CpuIdle must be running. It does not work with -loadonly switch since CpuIdle is not in memory if this switch is set (only the VxD). 6. Supported Hardware AMD: CpuIdle should work instantly with AMD Microprocessors K5, K6 and upcoming K6+ (or K6 3D or whatever it is called). All AMD CPUs have built-in "Suspend on HLT" that is always enabled. Intel: Modern Intel P5, P5MMX, PPro and PII type processors are supported. With the P5 Intel introduced "Suspend on HLT" for it's CPUs. This features is hardly documented and by default disabled (shame on all BIOS programmers). To my knowledge CpuIdle is the only software that uses this feature. When this feature is enabled additional 1.8 Amperes can be saved. Without enabled AutoHalt (that's how it's called) Intel CPUs will still run cooler with CpuIdle but from the table below you can see that the power (and temperature) savings will be lower than for AMD or Cyrix processors (these values are taken from c't magazine without AutoHalt enabled). Note: AutoHalt means the same like "Suspend on HLT" Cyrix: Cyrix M1SC, M1 and M2 have a "Suspend on HLT" feature that has to be enabled by software or via BIOS setup. When run without command line switches that override the default settings CpuIdle enables "Suspend on HLT" by default. With the same procedure it should also work with 486 Cyrix, TI and IBM models. "Suspend on Halt" for Cyrix compatible CPUs: The following processors should all be supported by CpuIdle if the "Suspend on Halt" (Bit 3 in Configuration Control Register 2 - CCR2) is enabled. CpuIdle enables this feature by default. Cyrix Cx486S/S2/D/D2/DX/DX2/DX4 IBM BL486DX/DX2 (Blue Lightning) TI TI486DX2,TI486DX4 Cyrix Cx5x86 (M1SC), IBM 5x86 Cyrix Cx6x86 (M1), IBM 6x86 Cyrix Cx6x86MX (M2) Power Consumption DOS prompt vs. NT prompt according to c't magazine (http://www.heise.de/ct). These values are must not be compared since some of the measurements took place on different computing environments (i.e. mainboard). Furthermore they must not be compared to CpuIdle since on NT the HLT is supported by the operating system whereas CpuIdle is just an add-on. AMD K5-166 K6-166 K6-200 K6-233 DOS 5.2A 3.8A 5.0A 7.2A NT 2.8A 1.7A 1.8A 1.9A Pentium 166 MMX-166 MMX-200 MMX-233 DOS 5.1A 3.94A 4.4A 5.2A NT 4.2A 3.25A 4.2A 4.9A 7. Availability CpuIdle is available for download from http://www.stud.uni-hannover.de/~goetz If you feel that this program is just what you've been waiting for and would like to encourage further development and express your gratitude you may want to send $20 or whatever amount you think appropriate to the address given below, though there is no obligation to do so. Please don't send cheques since cashing is extremely expensive in Germany. All donations will be happily accepted. Andreas Goetz Suedring 11 31275 Lehrte GERMANY Due to the overwhelming number of questions and requests I received via email, users that require additional assistance are now strongly encouraged to register. If you read the documentation carefully and still have questions you can reach the author at goetz@stud.uni-hannover.de If you are reporting bugs please make sure that you are using only the latest CpuIdle version. 8. Legal This software can be used freely for any purpose in non-commercial environments. For use in commercial environments contact the author. CpuIdle can be distributed freely, as long as it is not sold commercially without permission from Andreas Goetz. However, including this software on CD-ROMs containing other free software, permission has explicitly to be granted even if this software is not a primary selling argument for the CD. 9. Thanks Special thanks to Virgil Smith for coding the VxD. Without him this program would never have been possible. I'd also like to thank Marton Balog for his enthusiasm in coding DosIdle. Special greetings to Muddle who proof-read this document and first aroused my love for the English language. More thanks to the following authors for their Freeware Delphi components: Ahto Tanner: TUrlLabel Pete Ness: TTrayIcon DISCLAIMER THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO REPONSIBILITIES FOR POSSIBLE DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS PROGRAM. ALL TRADEMARKS ARE PROPERTY OF THEIR RESPECTIVE OWNERS.