CPUClock

Temperature control version

Version 2.01


Background | Installation | Basic operation | The iconbar menu | The choices window | The status window | Contact | Versions | Module details | Licence


Important: CPUClock is only of use on modern hardware that is capable of switching the CPU between two or more speed settings. This means hardware such as the OMAP3, OMAP4, or OMAP5.

When run, CPUClock, the GUI frontend and/or the module, makes some checks on the OS and hardware. If the hardware is unsuitable, CPUClock will not run. If the OS is an old version, then CPUClock may run, but some of the functionality may be disabled.


Background

The following description uses extracts from a post by Jeffrey Lee in the ROOL forum (with permission).

RISC OS does several things to control the speed of the CPU:


Installation

For a new installation, simply drag and drop the CPUClock application into the directory of your choice.

If you have a previous copy of CPUClock you should move the old version of CPUClock somewhere safe and replace it with the new version.


Basic operation

Version 2 of CPUClock operates in the following way.

To run the application, double click on it's icon in a filer window. This will load the GUI front end onto the iconbar. It will also load the CPUClock module (if not already active). It is this module that monitors the cpu temperature, and adjusts the cpu clock speed if necessary. A module is used for this since it remains active even if the wimp enters a single-tasking state when e.g. a task stops polling during a processor intensive operation.

The iconbar icon will show the cpu clock speed as the OS switches between fast and slow, as shown below for a PandaBoard-ES. There is also a user option to include a coloured status indication of the cpu temperature in the iconbar icon. See the description of options in choices below.

     

Clicking on the iconbar icon with Select (or using the iconbar menu) will open the status window, which will show the cpu speed, the temperature, and will allow changing the fast (and slow) speed setting, although there is little to be gained by increasing the slow speed. More details are given below.

CPU speed only operation

If CPUClock finds the OS does not support all the functions required for measurement of temperature and auto-control of cpu temperature and clock speed, then it may revert to simply displaying the cpu clock speed (see below). In this case it may be more useful to revert to using version 1.10 of CPUClock instead. See the page on versions.


The Iconbar Menu

A screen shot of the iconbar menu is shown right.

Info  –  A standard application info box, including a button to go to the web site to check for later versions.

Help...  –  Runs the help file (this one).

Module info  –  Following this option right brings up a small window showing the current setup of the CPUClock module. This should correspond to the choices settings in the CPUClock frontend, if nothing else has changed the settings.

Status...  –  Opens the CPU clock speed status window (see below). Clicking on the iconbar icon with Select will also open the CPU status window.

Choices...  –  This opens the application choices window (see below). The choices window can also be opened by a right click on the iconbar icon.

Quit  –  This terminates the frontend application immediately, but leaves the module active. In addition, following the submenu arrow right leads to a menu with two options. Frontend only will terminate the GUI application. Selecting Module also will terminate the frontend and RMKill the module. Terminating just the GUI frontend means that the module will remain active and continue to operate in the background, monitoring the cpu die temperature, and reducing the cpu clock speed if the temperature exceeds the set value.


The Choices... dialogue

The choices dialogue has a set of action buttons at the bottom of the window.

The actions available are:

Set
This will use the new settings with immediate effect, and they will be used until CPUClock is quit.
Save
This will use the new settings, as in Set above, and will also save the settings to disc, so they will be used when CPUClock is run in the future.
Cancel
Close the dialogue and ignore any changes made since it was opened.

At the top of the window are two tabs, labelled Application and Module. The two sections control the application and module specific settings.

The settings that can be changed are as follows.

Application

The application tab is shown below.

Poll idle delay/cs
CPUClock checks the current speed of the cpu periodically, and writes the value under the iconbar icon, and in to the status window if it is open. The delay between checks can be adjusted using the bump arrors at the right. The value is in centiseconds. The default delay is 100cs (1s). Long delays may miss short bursts of cpu activity, while short delays may actually load the cpu. The temperatures of the cpu and the case (if applicable) are updated at the same time.
Iconbar icon at right
When an application installs an icon on the iconbar, by default it is installed at the left end of the right hand side icons. Thus the position is variable. If you wish to keep an eye on the cpu speed, it might be useful to have the iconbar icon in a relatively constant position. If this is ticked, then the iconbar icon will be installed to the right of the normal application icons (some applications have a high priority for positioning, e.g. the task or display managers, and CPUClock does not install to the right of these). Note that CPUClock will need to be quit and restarted before the change will take place. You will be offered the option of restarting immediately, or waiting.
Open status on launch
If this is ticked, then CPUClock will open the status window whenever it is first loaded. The position at which it will be opened can be set by moving the status window to the position of your choice, then ticking the option Save position now. If choices are now saved, the current position of the status window will be saved as well. The requirement to tick this option means that the setting is not changed when choices are saved at other times, unless a new position is specifically set. Note that the status window will always be opened at the smaller size.

The CPUClock iconbar icon, by default, shows the cpu clock speed as it changes with cpu load. CPUClock can also give a colour coded indication of the cpu temperature status. The next section controls what form this indication takes.

Show colour-coded status
This turns the colour coding on. The colour is shown either as a background to the text under the iconbar icon or as a background to the whole icon. This is set by the two radio icons, Text background and Whole icon. A further option Show low temperature as green toggles between a green background or no background for the low temperature condition. Examples are shown below.
Appearance when Text background is set
Appearance when Whole icon is set
From the left
(1) Cpu at low temperature when Show as green is off. This is also the form of the icon at any cpu temperature when Show colour-coded status is off.
(2) Cpu at low temperature and Show as green is on.
(3) Cpu at temperature between upper and lower limits
(4) Cpu temperature above upper limit.

Module

The module settings are concerned with how the CPUClock frontend interacts with the CPUClock module.

The Module tab is shown below.

Enable auto control
If this option is ticked then CPUClock will enable the cpu temperature regulation in the CPUClock module. The module will reduce the fast speed setting if the temperature exceeds the set maximum value. If it is unticked the CPUClock frontend will simply monitor and display the cpu speed and cpu die temperature.

If the auto speed control is enabled, then the following settings will influence how the control will be actioned

Maximum temperature/°C
This value (in °C) sets the maximum cpu temperature that is allowed before the cpu speed will be reduced. The maximum working temperature for a particular cpu will be found in the reference manual for the board. However, as a rough guide, 65°C is probably a suitable upper limit. 60° would be even safer for long term use.
Differential/°C
This value (in °C) sets the number of degrees by which the temperature must fall below the maximum setting before the cpu speed will be increased again. A setting of 3 or 4°C is usually suitable.
Use rolling average temperature
If the temperature of the cpu die is close to the maximum temperature setting, the short term fluctuations (always present) may trigger the regulation. If this is felt to be a problem, the module can be set to keep a running average of the last four temperature readings. This smooths out the temperature fluctuations, but at the same time the regulation operation will be slower. The default setting is for there not to be averaging.

The CPU clock speed status window

Clicking SELECT on the oconbar icon (or using the iconbar menu) will open the Status window. This may take two forms. The default window shows the cpu clock speed and the cpu die temperature, as shown below.

However, it is possible that the board is fitted with the CJE RTC module with temperature sensor. This sensor measures the temperature close to the board, which will be a function of the ambient case temperature. Assuming CPUClock has detected the presence of the board, an additional field showing the ambient case temperature will be present, as shown below. CJE products such as the PandaRO or RapidO Ig are so fitted. The boards can also be user fitted to a PandaBoard-ES for example.

The display will show the current cpu clock speed (switching between the 'fast' and 'slow' speeds depending upon how hard the CPU is working), the cpu die temperature, and the ambient case temperature if the board is fitted with a sensor. The small coloured icon to the right of the cpu temperature changes from green to orange to red as the cpu temperature approaches and then exceeds the set temperature limit (see Choices).

Note that the CPUClock front end updates the values, by default, every 1 second using wimp NULL poll-idle events. See Choices (above). If the wimp is not multitasking at that instant, e.g. processing an image, then the display cannot be updated. However, in general use you should see the speed being switched between 'fast' and 'slow' as you do things in the desktop. Note that the module will continue to get the temperature and do any auto-controlling required in the background, even if the front end is not being updated.

Clicking on the 'maximise' icon at the top right of the status window title bar will extend it, with two additional fields, showing the configured settings for the 'fast' and 'slow' speeds.

Clicking on the popup menu button to the right of the 'Fast' or 'Slow' fields will raise a menu listing the allowable CPU clock speeds. Selecting one of these speeds will reset the 'Fast' or 'Slow' setting as appropriate to this new value. This is a 'permanent' setting in the sense that it will remain in force until either specifically changed again, or the machine is rebooted.

Reducing the 'Fast' speed may be beneficial in high ambient temperature conditions. It is unlikely there will be any benefit in raising the 'Slow' speed, since this is used when the processor is idling.

CPU speed only mode

If CPUClock is running in cpu speed only mode, then a much simpler status window is used. This contains a field to display the current cpu speed, and the two popup menu buttons and associated display fields to set the fast (and slow) cpu speeds. The window is shown below.


Contact

All communication about the CPUClock frontend and the CPUClock module should be directed to Chris Johnson (Email:chris@chris-johnson.org.uk). Suggestions for new features are always welcome.

Web site

Chris Johnson's web site is at http://www.chris-johnson.org.uk/index.html, with his RISC OS software at http://www.chris-johnson.org.uk/software/index.html.


Screenshots

All the screen shots in these pages were obtained using Snapper, a versatile screen capture application.

Snapper is available from http://www.chris-johnson.org.uk/software/snap.html


CPUClock is © Chris Johnson, 2012
Email:chris@chris-johnson.org.uk

Document last modified on 6th April, 2016