I created a script to control the fan speed of nvidia gpus in linux using a custom fan_speed vs temperature curve. I found this feature in msi afterburner really useful when conducting long renders or preview sessions in cycles. Unfortunately no such feature exists in linux. I’ve decided to share this script now after a while, and created a video explaining how to set it up.
When you are using:
cards with stock cooling
cards in sli (although I havn’t added support for multiple gpu’s yet)
are usually a good indication when you need to check how your card is performing thermally.
no need to adjust the fan speed manually, script adjusts it according to situation.
also, you might notice that my current triple slot card runs at 65c when using default nvidia fan settings. This is probably fine, and this script is not needed. But my previous card, with it’s stock cooler, and small case easily approached 75 degrees during long renders and on hot days.
If you want the script to work well, I highly recommend taking the time to adjust the curve to suit your own card and your own preferences about heat and noise levels.
Please feel free to post if you have a fix for some of the smaller bugs that exist in it, but it should be very usable if the instructions are followed.
The instructions are fairly specific to the 500/400 series, so I’m not sure whether it will work with earlier cards, but one can always give it a go (I’m pretty sure you might not even need to edit xorg.conf with 200 series cards).
I forgot to include explanation about how to edit the fan curve yourself, but there is a lengthy comment in the code for that, which will hopefully suffice. I’m considering creating a simple pyside interface for doing this at some stage if this tool is popular enough
I went to the effort of making this script and publishing it for other people to use… I’m not exactly sure how to take that comment, but I’ll assume you’re not trolling or whatever, and are just making a joke about how few people use linux. Also, fyi, cycles runs a good deal faster in linux, which for me is enough just to use linux while doing rendering and render setups.
You’ve got a good point (If I was trying to make money from this). Also, in this case, I, (“the mechanic”), don’t have access to your card/computer hardware/specific case setup, (“car”), so I can’t tweak it for you to achieve the results you want. Thus I mentioned I’ll probably bring in a pyside gui interface for average joe to tweak it themselves without having to open the dreaded text editor to change the values in the curve. Option B isn’t really an option right now (unless you are using windows, but that defeats the purpose)
Please remember, some of these problems/bugs stem from the limitations of the Nvidia settings commandline interface.
Thx for this great script! I use it sucessfully on my Gentoo Box with a MSI GTX 560 TC Twin Frozr II with comes with an annoying default Fan Profile. While in Windows u are able to use control the fan via the Afterburner Tool, there is no way to do this in Linux …until i saw this script. Only problem was that the Card was fixed to minimum 40% fan usage, so i needed to flash an VBIOS with has no under limit. This could be done very easy with the nvflash Tool. Then i played a little with your default temperature profile, its quite good, on my card minimum fan should be @ around 25% but that differs obviously from card to card.
Hi risq, I’m glad there is someone out there who had the same problems as me who can find some use for this script! Thanks for letting me know you found it ;). Feel free to let me know if you think something needs changing.
Thanks for this, recently got a couple 480 GTX Supeclocked to replace my single 460 (which was really cool), I’m using them on two different PCs, however I was still worried about the temps reaching 90+ C on an open case which is quite dramatic(?)
I’m now rendering a long scene with manual fan speed set to 80% thanks to your help and temps don’t go over 68C which is quite a reduction!
I might later try your custom curve script too, but this is way better as a start
Actually i 'm still worried about temp. Specially since our render times tend to take 3 days or so. But i have an idea! what if we make this script an addon for blender. So when rendering we can set it to a defined fan speed percentage and when not it can be set to auto
Sorry to bump this thread, but I just wanted to say thanks for this awesome script - I’m still configuring my Linux Mint 13 setup for Blender work, and the Python script really works wonders on temperatures - I had the GPU fan running at 45% for 70C when on automatic, now I’m getting much better temperatures Thanks a million, lfrisken!
Hey Philippe, No problem! I’m also newly on mint 13, it’s awesome eh
I just got an email from another guy who was having trouble with the script, and trying to adjust it, so I think I’ll try to make a simple gui with pyside to adjust the fan curve, or perhaps integrate it into blender as a python addon and use some of the curve editing elements I’ve seen in blender such as in sculpt mode. The main problem I see with making it an addon for blender is it requires several steps to install, some of which have nothing at all to do with blender. Also, I’m on holidays and with free time in a couple of weeks, I can get back and finish off the GSOC project
and another thing I think might make it not such a good idea as an addon, is the fact that, if you kill blender for whatever reason, or blender crashes and doesn’t exit normally, the manual fan speed control might remain set in nvidia-settings on a low value! I’ve thought about it for a while, but there is no easy way to get around this, short of running some kind of daemon permanently outside of blender to check this doesn’t happen.
Have to agree with you there - I never run it within Blender since I also play Minecraft in Mint 13, which can be rather GPU-intensive, so I simply run it in a Guake terminal. Start it up once I log in and it stays out of the way, always running :yes: I think having it as a stand-alone would be more ideal and more versatile since, like you said, having it as an add-on could cause problems if you kill/crash/quit Blender without resetting the fan-speed to automatic in nvidia-settings.