Saturday 3 September 2016

SpeedFan Fan Curve Profile Made Easier

I use SpeedFan to control my CPU, GPU and case fans. It's useful to have this be temperature dependent and you can set a curve for each fan via Configure -> Fan Control and selecting different fan controllers. You can even have these be triggered by different temperatures from different sensors (MAX of speeds tends to work well here). However, setting these manually with the mouse can be a fairly tedious process, particularly if you want to set a similar fan profile for multiple temperature sensors (e.g. I'd like to ramp up the case fans based on both my CPU, GPU and HDD temperatures).

There is a better way to do this: you can manually edit the speedfansens.cfg file which is found within the main SpeedFan folder (by default, under C:\Program Files (x86)\SpeedFan for me).

A typical entry setting a fan curve looks like this:

xxx FanControllerTemp from FanController 1
temp=1 from INTEL CORE@$0(onISA@$290)
MinTemp=35
MaxTemp=55
hysteresis=2
ControlPoints=0 50 52 54 56 58 60 63 66 70 74 79 84 90 97 100
xxx end

The key values are:
  • MinTemp: which sets the temperature that the first fan speed for ControlPoints triggers at.
  • MaxTemp: which sets the temperature that the last fan speed under ControlPoints triggers at.
  • ControlPoints which sets the fan speed curve values, as a percentage of the maximum fan speed.
The curve will look like this:



I can then add the additional sensors I want (see the extra CPU Core temps: 1 2 and 3), either within the config file or via the SpeedFan GUI then copy my min/max temperatures and control points over. This saves a lot of time and gives you exact control over the curves.

This can be repeated for any fan controller in the list in the GUI or you can add them manually in the config file if you know the IDs.

Saturday 27 August 2016

Fixing an odd Windows on-screen keyboard problem

In Windows 10, every time I open anything which requires admin access (e.g. cmd -> run as administrator), the on-screen keyboard would pop up after clicking OK.

Settings -> Ease of Access -> Keyboard -> Turns on the On-Screen Keyboard was Off as expected, but it'd still happen.

I found that the "fix" was under:

Control Panel -> Ease of Access Center -> Change sign-in settings

where somehow I still had "Type without the keyboard (On-Screen Keyboard) ticked under "After sign-in".

Note that there is also a tick-box under:

Control Panel -> Ease of Access Center -> Use the computer without a mouse or keyboard

which can also cause problems.

Finally it's gone!

Monday 25 March 2013

Using aticonfig over SSH


Want to overclock or underclock your AMD/ATI GPU on a linux box via SSH?

Usually, it'll return "aticonfig: This program must be run as root when no X server is active" or "ERROR - X needs to be running to perform ATI Overdrive(TM) commands" because it's looking for X on your local system. If you run as root and have an AMD card in the local machine then you'll get the info for your local card, not the system you're connected to.

To get around this use:

export DISPLAY=:0
xhost +

and now your aticonfig and amdconfig commands will run as normal on the remote machine, e.g. To check the temperature, retrieve the current core/memory clocks and get the current fanspeed:

aticonfig --odgt
aticonfig --odgc
aticonfig --pplib-cmd "get fanspeed 0"

To set the core and memory clocks

aticonfig --odsc 1000,1200

will set the core to 1000Mhz and memory to 1200Mhz.

To set the fanspeed

aticonfig --pplib-cmd "set fanspeed 0 100"

will set the fan to max speed.

aticonfig --pplib-cmd "set fanspeed 0 auto"

will put it back to temperature controlled.


Friday 15 March 2013

Overclocking Nvidia Cards from the linux command line.

Today, I was interested in overclocking an older nVidia card - a Geforce 240 GT - on a machine running Ubuntu. I'm using the latest nvidia drivers (ver 310.40) and found that simply enabling coolbits in xorg.conf was not quite enough to get the full range of overclocking I wanted.

Firstly, there are different levels to which you can enable coolbits. Under the "Device" section of /etc/X11/xorg.conf (for example: sudo nano /etc/X11/xorg.conf) you need to add Option "Coolbits" "x". Here x indicates what options you want available from the GUI menu. So that section will look something like:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 240"
    Option         "Coolbits" "5"
EndSection

"1" enables the core and memory overclocking.
"4" enables the fanspeed control
"5" enables both core and memory overclocking and fanspeed control.

I haven't checked what the others do, but I think "2" attempts to enable SLI support. It's possible you can adjust the shader clock with the correct integer, but I lost patience.

Now once cool bits is enabled you can adjust the core/memory clocks and fan speeds as you wish. However, the shader clock is tied to the core clock. I wanted to increase this independently and also automatically overclock while I ran a particular program along with increasing the fanspeed to full, followed by putting everything back to stock when I exited the program.

You can control the core, shader and memory clocks from the command line using the following commands (WARNING: USE AT OWN RISK):

nvidia-settings -a [gpu:0]/GPUOverclockingState=1 # Enables overclocking.
nvidia-settings -a [gpu:0]/GPU3DClockFreqs=corefreq,memfreq # set 3D profile's core and memory speeds.
nvidia-settings -a [gpu:0]/GPUCurrentProcessorClockFreqs=shaderfreq # set shader clock speed.

To set things back to default:
nvidia-settings -a [gpu:0]/GPUOverclockingState=0 # Disables overclocking.

To control the fan speeds:
nvidia-settings -a [gpu:0]/GPUFanControlState=1 # Enables manual fan control.
nvidia-settings -a [fan:0]/GPUCurrentFanSpeed=x # set fan speed as a percentage. Note that the attribute is fan, not gpu here.

To set back to default:
nvidia-settings -a [gpu:0]/GPUFanControlState=0 # Disable manual fan control.

You can check the current values and ranges for each of these by using nvidia-settings -q. For example:

nvidia-settings -q GPU3DClockFreqs

which will return the info about the core and memory clock command. Further, you can see every available option with nvidia-settings -q all. Which is probably best piped into a temporary file for readability and searching.

Another extra thing I learned today while using these in my bash script is that you can catch a ctrl+c kill command and perform a set of commands when it is issued using the trap command. For example:

#!/bin/bash
trap ctrl_c INT # trap ctrl-c and call ctrl_c()

ctrl_c() {
  echo "\nExiting..."
  exit
}

for i in $(seq 1 10);do
    sleep 1; echo -n "."
done

This will print 10 dots before exiting or you can interrupt it with Ctrl+C.

Using these two, I got my script as I wanted:

#!/bin/bash
trap ctrl_c INT

ctrl_c(){
nvidia-settings -a [gpu:0]/GPUOverclockingState=0
nvidia-settings -a [gpu:0]/GPUFanControlState=0
echo "clocks and fan back to default.. exiting"
exit
}
nvidia-settings -a [gpu:0]/GPUFanControlState=1
nvidia-settings -a [fan:0]/GPUCurrentFanSpeed=100
nvidia-settings -a [gpu:0]/GPUOverclockingState=1
nvidia-settings -a [gpu:0]/GPU3DClockFreqs=665,1700
nvidia-settings -a [gpu:0]/GPUCurrentProcessorClockFreqs=1700

<commands I wanted to run with overclocked GPU>

You can also nest a trap within the function, so you might want multiple behaviours for each issue of ctrl+c or you might want to iterate the function so that it isn't possible to exit using ctrl+c.