Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controlling the fan speed and detecting the inside temperature of the pc with python?

Tags:

python

cpu

Since my pc's fan is very loud, I'd like to make myself a program to "shut it up" when it's not required to be running at full speed. I want to make it with python, so is there any module that can detect the temperature and/or set the fan speed?

like image 988
Gabriele Cirulli Avatar asked Mar 19 '10 18:03

Gabriele Cirulli


1 Answers

Don't use python, or WMI.

If you have Windows, and if you can't use speedfan, this is best done in the BIOS layer, with Microsoft's ASL Compiler. Using that, you can set temp thresholds for various fan speeds. It works nicely. Be careful though. This will void your warranty and for good reason. Using this tool incorrectly or carelessly, you could set your fan to never turn on, which would cook your components straightaway. So read up on it and get a temperature monitor (software app) before using this tool.

I had this problem on my laptop, waaay too much heat. After investigating, it turns out a major culprit was the graphics chip, which was set to ALWAYS be on, with the default Windows Vista driver install. It wasn't the CPU that was generating the heat. It was the GPU. Apparently it was set this way to support the Aero graphics. So in addition to doing the ASL temp/fan speed thing, I turned down the GPU. Also I turned down the clock speed, because silence and cool temps are more important to me than potential CPU speed.

This super user post describes the problem & the solutions I used in more detail.

like image 198
Cheeso Avatar answered Sep 22 '22 14:09

Cheeso