CpuIdle for Windows 95/98

- Shareware -

CpuIdle is Copyright (C) 1997, 98 Andreas Goetz.

eMail: goetz@stud.uni-hannover.de
Homepage: www.stud.uni-hannover.de/~goetz


  1. What is CpuIdle?
  2. Installation
  3. Introduction
  4. Optimization
  5. Command Line and Features
  6. Supported Hardware
  7. Frequently Asked Questions
  8. Registration
  9. Legal
  10. Thanks

1. What is CpuIdle?

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 StartUp 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 "Power Management" folder you won't be able to use the Control Panel plugin.

3. Introduction

Due to CMOS technology modern microprocessors are manufactured not only with 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 sinks but also actively cooled with fans or Peltier cooling elements. Higher temperatures worsen parasitic effects like electromigration or oxide breakdown that might eventually lead to failure. A temperature increase of 10 degrees centigrade means a halfed lifetime for chips. This holds true for the microprocessor and for the voltage regulation module (VRM) that supplies the I/O and core voltages. Many outdated or cheap motherboard 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 HLT instruction elicits an additional benefit. 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 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

Modern microprocessors include a number of special features that can improve their performance. The problem is that they are not always enabled by common BIOSes. Therefore CpuIdle will detect the type of your CPU and enable th appropriate features.

  Intel
P5/P5MMX
Intel
P II
AMD
K5/K6/K6-2
Cyrix
M1SC/M1/M2
IDT
C6
Write Allocatation*     Yes Yes  
Auto HLT (AHD)*
Low Power on AHD*
Suspend on HLT*
Yes
Yes (MMX only)
Yes

Always On


Yes
Yes
No Locking*   Yes   Yes  
Weak Ordering*         Yes

* If a given feature exists on a CPU it will be enabled by default. 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 see 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 wish to run CpuIdle manually select START, then RUN from the taskbar and specify the CpuIdle.exe file 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 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" although it no longer receives 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 normally shouldn't 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. If you're not sure if you want or need this read the very good manual for 6x86opt from www.alternativecpu.com

Note: These switches are only for the experienced user. You shouldn't normally need them.

-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

* 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 shortcut 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 shortcut 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 to kill the idle process. Windows CPU monitor is one of these. When you start such a program CpuIdle will still display "enabled" although it no longer receives 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 every 30 seconds (this does not consume CPU time) so the longest length of time your CPU will run without support from CpuIdle is 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, K6-2 and upcoming K6-3 (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.

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.

AMDK5-166 K6-166 K6-200 K6-233
DOS5.2A 3.8A 5.0A 7.2A
NT2.8A 1.7A 1.8A 1.9A
Intel P5166 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. Frequently Asked Questions

Q: How can I determine if CpuIdle really works on my computer?
A: Ahh. That is a little bit difficult as this can't be answered by the CpuIdle software. A thermometer placed on your CPU before and after CpuIdle would help. The other way would be to hand-test the temperature of the air blowing from your CPU fan. After running CpuIdle for some minutes it should be definitely cooler than without CpuIdle running (of course only if you don't put heavy CPU load on your PC during that time).
On the other hand it is much simpler to tell if CpuIdle doesn't work. It doesn't if...
  1. CpuIdle simply crashes or displays error messages.
  2. The "About" box shows "disabled" instead of "enabled".
  3. You have a Cyrix CPU and the "CPU Info" sheet in the "About" box shows "Suspend on HLT: disabled"
Otherwise the chances that it works as promised are quite good, but the ultimate answer can only be given by a thermometer or other temperature measuring device.
If you have a mainboard with the TX chipset and you have an on-board system monitor and temperature sensor chips (LM75/78) you can also use mointoring software like CpuMonitor from www.c-lab.de/~chandler/.

Q: Ok, I believe that CpuIdle works, but is it safe?
A: Well, Win NT does is, Linux does it and OS/2 does it. However a cheap PC with low-quality components could possible be crashed by CpuIdle, as well as by any other application.

Q: Does CpuIdle put additional load onto my CPU?
A: Read the documentation. No. It just consumes idle time. Measurements with the Winstone benchmark suite have shown that CpuIdle does not decrease the system performance.

Q: But my CPU monitor suddenly shows 100% CPU load. How can this be?
A: The monitor measures how much idle time it receives, and it won't get any since this time is spent in suspend mode. This does not affect normal applications.

Q: Now. You just said that with CpuIdle the System Monitor shows 100% CPU usage when CpuIdle is running (and working). It doesn't on my system. Is CpuIdle not working?
A: You're probably using the Control Panel plugin provided with CpuIdle 3. When this plugin is enabled, CpuIdle is run just once (during startup) to optimize your CPU, load it's driver (the mysterious VxD) and the quits again, leaving the VxD in memory. Due to this fact the VxD is no longer owned by any program who's name could be shown by the CPU monitor or similiar tools (due to the way these things are implemented). CpuIdle is still working.
If you use the plugin please make sure you see the splash screen at startup to veryfy that the program was started.

Q: When I run CpuIdle my computer immediately crashes/ GPF's/ reboots. What's going on?
A: I honestly don't have the slightest idea. Sorry.

Q: When I run CpuIdle I get random reboots every 10 to 60 minutes. Can you help?
A: No, I'm sorry. Very few people have reported this. Most of them use VX chipsets. I don't know if this is an incompatibility. It could also be (with VX chipsets slightly out of fashion) that these computers use power supplies with an out of date design which isn't living up to the motherboard's and CPU's current expectations.

Q: When I run CpuIdle my fan turns slower and the voltage on the +5V and +12V lines decreases. Doesn't that mean that the CPU is drawing more power?
A: No. Most computer power supplies only compensate higher power demands on the +5V rail, resulting in an increase on the +12V rail when +5V power demand goes up.
Koen Gadeyne says in the readme for set6x86:
"The CPU draws from the +5V rail, but the CPU fan uses +12V, so when the CPU draws more power (due to CPU load), the CPU cooling fan (which is delivered with the CPU by Cyrix) will run a little faster with higher supply voltages, so the significant power drop when the CPU drops into power-suspend mode might cause a noticeable change in the pitch of the buzzing fan sound!"
It depends on the way the switching power supply is designed. The 12V are generated in the same switching transformer as the 5V, and just the 5V is regulated. This means that the 12V voltage will depend on the current flowing by the transformer primary winding. What happens is that when CpuIdle runs, there is less +5V current so the switching power supply sends less current across the transformer primary and therefore the 12V MUST decrease as the feedback regulation loop exist only in the +5V. That's the reason behind the "fan mystery".

Q: When I run CpuIdle I hear terrible static noise or buzzing sound through the speakers attached to my soundcard. What's up?
A: This problem can probably be pinned on a poorly designed power supply and/ or soundcard. I can't help you with that, sorry.

Q: How can I use the command line switches?
A: Make a shortcut to the program, right mouse click on the shortcut, 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 shortcut works, it is recommended to copy it to your StartUp folder.

Q: CpuIdle says "CPUID instruction not available on this machine". What does this mean?
A: This means that your CPU either doesn't have the CPUID machine instruction (like 486 CPUs) or that it isn't enabled. On Cyrix CPUs CPUID can be en/disabled. Normally the BIOS should enable CPUID but on some machines it doesn't. If you have a Cyrix CPU and want to enable CPUID you can use tools like set6x86 to do this. Without CPUID CpuIdle will not be able to determine the clock rate of your CPU. However this does NOT influence other CpuIdle functions.

Q: When I use DosIdle for DOS sessions, should I need to use CpuIdle when I enter Win95? Will it conflict if I use DosIdle in DOS and CpuIdle in Win95?
A: CpuIdle is designed to HLT under Win95/98. It works under a Windows DOS Box as well, but is inefficient with ill-behaving DOS programs like Norton Commander (with these programs in a DOS window you can usually feel your other Windows programs run slower). DosIdle should work under older MS-DOS versions (MS-DOS up to 6.2), Windows DOS Box and MS-DOS 7.00 and above (if you restart in MS-DOS mode from Win95/98).
To have DosIdle enabled all the time, just install it to your Win95/98 Autoexec.bat AND the DOS 6.22 (or below) Autoexec.bat. This way, DosIdle will take care of anything that's DOS related. And it doesn't conflict with CpuIdle!

Q: When I start CpuIdle on my 486 notebook it crashes with a "Fatal Exception 0D in VXD CPUIDLE". What can I do?
A: CpuIdle didn't recognize your CPU and tried to use unsupported features. Please start CpuIdle with the -noopt command line switch.

Q: Not all CPU features are enabled on my new PII CPU -- what's up?
A: I don't have access to a PII machine and couldn't do any testing but it seems as if some PII CPUs don't support all features.

8. Registration

Trial period

CpuIdle is uncrippled shareware. The trial period is 30 days. If you come to the conclusion that you want to use CpuIdle after that time you must register.

What happens when you register?

When I have received your registration fee, you'll be sent the latest version of CpuIdle by eMail. The registration includes all future versions and improvement of CpuIdle as well. You will also have my full support concerning any questions you might have. Since I receive so many mails I can't guarantee to answer all questions of unregistered users.

Registration fee

The registration fee is $10 (or DM20 for German users). The easiest way is cash payment. Send the money directly to me in an envelope. I've made no bad experiences doing it this way, it should be safe.

For multi-site and multi-user licenses, please contact me.

Address

With your registration please don't forget to include your name, address and of course your eMail address. Send all this and your registration fee to

	Andreas Goetz
	Südring 11
	31275 Lehrte
	
	GERMANY
If you read the documentation carefully and still have questions you can reach me at goetz@stud.uni-hannover.de. Please make sure that you read the Frequently Asked Questions. Most points are already covered there.

Thank You!

9. Legal

The CpuIdle shareware version can be distributed freely, as long as it is not sold commercially without permission from the author. 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.

10. 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.