2012/11/17

GPU Fan Speed Controller Project Notes

I'm going to be writing a gui / cron job daemon for regulating the fan speeds of the proprietary nvidia / amd drivers for graphics cards.  Mainly because with Steam coming to Linux and the burgeoning interest in the platform, there really needs to be an easy way (a la Overdrive / EVGA Precision on Windows) to create a software fan curve, and the Nvidia X Server / amdcccle are insufficient in purpose for that.  Fortunately, Nvidia and AMD provide means to access the gpu temperatures and fan controls from aticonfig and nvidia-settings.  So I'll just be writing a configurable GUI frontend, a config file, and a background cron daemon to monitor it and update temperatures accordingly.  I'm basing this project off the work of 2Karl's bash scripts to accomplish the same, but they are a little cumbersome to modify (no one point reference to the names of the scripts, no table of fan speeds, etc).

I'm just writing down my game plan with this little project here:
  • Using Python3 and pyQT, the latter because QT is a nicer GUI framework than GTK at this point, and Python because this isn't processor intensive and doesn't need low level optimizations.
  • One python GUI application (maybe gpu-fan-control) and one background process to watchdog the gpu (gpu-fan-monitor).  The GUI should be writing to a configuration file, probably under ~/.gfancc/profileX.cfg, and the monitor should be set as a startup application that will read this file, monitor the gpu temperatures via pipelining with aticonfig / nvidia-settings, and at a user-defined interval check for temperature thresholds to change fan speed at.
  • The initial goal is to get the daemon and configuration running by hand, then write a nice GUI to set it up.
  • My primary GPU is a GTX 285, so I'll have this working with Nvidia first.  The configuration file should specify the gpu type, and the daemon should have some autocreate functionality in case of a missing configuration.
  • The GUI will probably start with just a few data points of temperature: speed that the background will just build a one to one function out of of fan speeds.  If the temperature hasn't passed a threshold, we shouldn't update the fan speed (to avoid calls into the control software whose performance I can't directly influence).
So I'll be putting this up on github soon.  Hoping to use this as a way to get into qt, packaging in Linux, and it seemed to me like something needed with gaming coming to Linux.

No comments:

Post a Comment