# Control Your Computer's Fan Speed

The objective of this question is to create a program that pushes your computer's internal fan speed to its maximum RPM. Upon exiting the program, your fan should return to the normal operating RPM.

Rules:

1. You may not perform a CPU intensive task in order to modify the fan's speed.
2. Exiting the program may be via user input, a timeout period, or a response to a SIGTERM or SIGEXIT signal.
3. Avoid the standard loopholes.
• How should the program exit? Timeout? User input? Signal? – Greg Hewgill Jul 3 '14 at 0:10
• @GregHewgill No requirement is put in place on that, whatever takes the fewest number of characters would make an optimal solution however. – syb0rg Jul 3 '14 at 0:33
• @user3334871, controlling the fan speed is possible. The bit I'm dubious about is resetting it to normal when the program is killed without any opportunity to react. – Peter Taylor Jul 3 '14 at 9:10
• I suspect very strongly that in order to meet this requirement, the program would need to be closed in a controlled manner. As far as I'm aware, this is no way to capture an unmanaged process termination. – primo Jul 3 '14 at 10:21
• "computer's internal fan speed", which fan? – CousinCocaine Jul 4 '14 at 7:02

# OSX + Bash + smcFanControl, 91 bytes

This relies on the third-party smcFanControl suite to do the hard work and is therefore more of a proof-of-concept than a serious answer. Real answers could pick apart the smcFanControl source code and do this without third-party help.

smcFanControl.app is assumed to be installed in /Applications.

p=/Ap*/smcFan*/C*/R*/smc\ -k # Path to CLI utility
f()($p'FS! ' -w000$1)        # function to set fan mode
f 3                          # Set fan speeds to "forced" mode
eval \$p\ F{0,1}"Tg -w5DC0;"  # Set fan 1 and 2 to 6000 RPM target speed
read                         # wait for keyboard input
f 0                          # Return fans to "auto" mode


• depending on your entry the whole point of this contest is to find an utility that has the shortest name and then control the fan with it. how clever one must have to be... and this doesn't mean i don't like your answer. i belive it's already a winner. but the whole challenge is pointless. – bebe Jul 3 '14 at 17:08
• DigitalTrauma found a program that can be controlled like that. What if i find (or make but okay, its a loophole) an utility that does the same if I type maxfan? – bebe Jul 3 '14 at 17:20
• @bebe All good points. See my edit. – Digital Trauma Jul 3 '14 at 17:31
• basically Outsourcing the answer – Not that Charles Jul 3 '14 at 17:33

# GLXGEARS - 8bytes

First thing I thought of was yes, or yes in parallel. As we are not allowed to use the CPU to control the speed, let's use the GPU:

glxgears


# Reboot, 6 bytes

reboot


Just after a boot, the fans start spinning at max rpm because the power is turned on to the fan, before the BIOS loads any real time controllers that will base the speed of the fan on the temperature of the processor. This also keeps the processor from getting excessively hot if you were to try the alternative... which would be to keep the fan off until those controllers were loaded and basing the fan speed on processor temp. More of a safeguard than anything. The processor is starting to work the moment you turn the computer on, but the BIOS still needs time to load. https://superuser.com/a/427723/246895

(Does not work on every pc, but is confirm the OP)

• The program exits before the reboot actually occurs, so the fan spin-up happens after program exit. This is not at all in line with the spec. – Peter Taylor Jul 4 '14 at 15:21
• @PeterTaylor Completely true. – CousinCocaine Jul 4 '14 at 17:07