3.1 KiB
3.1 KiB
Universal K80 Cooling
This is a Linux cooling control software, which uses an Arduino Uno, PWM fan, and Python 3. It was designed for use with a Tesla K80 (a datacenter GPU without fans), but should work with any NVIDIA GPU.
This will determine the speed your fan (connected to your Arduino) should run at based on the highest temperature between your GPUs, then will send that speed to your Arduino.
Make sure to set the port in the .py file you use!
How to use
- Install dependencies using
pip install -r requirements.txt
- Connect the Arduino to the fan according to this diagram:
- Set the port variable
- Instructions for finding the port are in the Python code.
- Create a script to run this every 10 seconds
- Use a text editor to create a script called `every5secs.sh, and add the code below.
- Make a note of where you saved the script, and remember to change
/path/to/tx_cron.py
# This runs the tx_cron.py every 10 seconds
i=0
while [ $i -lt 6 ]; do # 6 ten-second intervals in 1 minute
python3 /path/to/tx_cron.py & #run your command
sleep 10
i=$(( i + 1 ))
done
- Create a cron job
- Run
crontab -e
- Add this line to the bottom of the file:
* * * * * python3 /path/to/every5secs.sh
- Remember to change the path to your script!
- Save and exit with
Escape
,:wq
,Enter
- Run
My setup
- I use this 3D-printed fan adapter for my Tesla K80; I highly recommend it.
- I also remixed it into a 92mm version here!
- Also, I use this fan. It's not necessarily a bad fan, but it's very loud.
In the long-term, I'm planning to build my own front cover for my PC case (a Corsair 175R), and will have a spot for my Arduino and wiring in it.
Pictures will be added later once my setup is complete. Don't expect it to happen anytime soon, though.
Notes and Limitations:
- This currently only supports NVIDIA GPUs
- This currently only supports normal PWM, not delta PWM
- You may need to change some variables in the Arduino code depending on your fan's specifications.
- Try looking up a datasheet
- This was designed for an Arduino Uno, and should work on one. I don't know about running it on anything else, though.
tx_speed.py
works fine, but it's just an infinite loop. I'm working on marking a version that uses a cron job, but it's not done yet.
Resources I used
- Python-Arduino communications library - pySerialTransfer
- Thanks for the help figuring this out, PowerBroker2!
- Arduino PWM fan control - 25 kHz 4 Pin PWM Fan Control with Arduino Uno
- This is the basis of my arduino-fan diagram
- See NVIDIA GPU temperatures - GPUtil
TODO
- Add diagram for wiring LED lights