I was sitting on my couch, watching Arrested Development and coding, when I got distracted by the ridiculous heat that was being produced by my laptop. In the past I found some files deep in /proc that could give the current temperature and allow me to change the fan speed. As mentioned in “Nine Traits of the Veteran Unix Admin” by Pual Venezia, I don’t want to just patch the problem and I need to find an elegant solution (traits 4 and 5).
So, in the end I wrote a script that will attempt to keep the average temperature within a specified range by incrementally increasing the fan speed. It also reduces the speed if the temperature drops. In addition, I created a script using the start-strop-daemon so that the fan control script can be properly launched and stopped at startup and shutdown.
I’ve now added the files and install instructions to our Git repository and linked it with a Redmine project: https://redmine.techtonium.com/projects/automatic-laptop-fan-control-script
I no longer have to play hot-potato with my laptop and maybe I’ll be able to focus on documenting one of my other project’s code…. Just maybe….