A Linux utility designed to manage fans on Tesla Datacenter GPUs mounted in ATX cases. Named after the Korean word for wind, Baram provides an intuitive, CLI-based interface for optimizing cooling performance and noise management in Linux systems.
Baram is a specialized cooling management tool developed for Nvidia data center GPUs repurposed in ATX-like cases. It enhances thermal performance, extends component longevity, and minimizes noise, making it ideal for enthusiasts and newcomers alike.
The genesis of this tool was sparked by an incredible find on Ebay—an Nvidia P40 for $175, perfect for my burgeoning interest in machine learning. The snag came when I tried integrating this powerhouse into a non-server setup. Cooling it outside of its native server habitat proved daunting. While hardware adaptations were somewhat navigated by others, an intuitive method to regulate fan speed in response to the GPU's temperature or power consumption—especially within the confines of a consumer-grade motherboard—was conspicuously absent.
This challenge morphed into an opportunity. My initial testing has shown that cooling a datacenter grade GPU within an ATX case is not only feasible but can outperform the traditional server case scenario in both simplicity and acoustics. The strategic placement of the GPU's blower fans directly in front of the ATX case's intake fans facilitated a more effective cooling mechanism. Unlike in server cases, where the GPUs are relegated to the rear and subjected to pre-warmed air post-CPU cooling, my setup benefitted from a direct blast of fresh air. This not only enhanced cooling efficiency but also significantly reduced noise levels, making it an effective solution for enthusiasts venturing into machine learning with high-performance, datacenter-grade GPUs in consumer setups.
Baram.py is currently functional and uses NVML (NVIDIA Management Library) for retrieving GPU information. The baram_graphs.py script, which provides real-time graphing capabilities, is currently under development and has been moved to a separate branch.
The current version of Baram has the following Python dependencies:
- pandas
- matplotlib
- pynvml
These dependencies are listed in the requirements.txt
file. To install them, run:
pip install -r requirements.txt
- Dynamic Temperature and Power Monitoring: Adaptive fan control based on real-time GPU temperature and power consumption.
- Configurable Thresholds: Customizable temperature and power thresholds for fine-tuned cooling performance.
- Logging: Detailed logging of GPU temperature, fan speed, PWM values, and power consumption for analysis and troubleshooting.
-
Ensure Python3 and Pip are installed on your system.
-
Install the required Python libraries:
pip install -r requirements.txt
Execute the following command to start Baram:
python baram.py
To ensure Baram runs as a service on Ubuntu, follow these steps:
-
Create a systemd service file:
sudo nano /etc/systemd/system/baram.service
-
Add the following configuration, modifying the
ExecStart
path as necessary:[Unit] Description=Baram Cooling Management Service After=network.target [Service] Type=simple User=your_user ExecStart=/usr/bin/python3 /path/to/baram.py [Install] WantedBy=multi-user.target
-
Enable and start the Baram service:
sudo systemctl enable baram.service sudo systemctl start baram.service
-
Check the service status with:
sudo systemctl status baram.service
-
To view available commands, use:
python baram.py --help
-
For creating and managing profiles, consult the Baram documentation or the help command output.
- The fan shroud used in this project can be found here: 3D Printed Fan Shroud
- The fans used are ARCTIC S4028-15K - 40x40x28 mm Server Fan, 1400-15000 RPM, PWM Regulated, 4-pin Connector, 12 V DC, Rack Cooling Fan.
For load testing the GPU, we recommend using gpu_burn, which can be found here: gpu_burn
It's important to recognize that each chipset is unique, which means that both the access points for fan control interfaces and the module names within the Linux operating system can vary significantly across different motherboards. Specifically, compatibility with 'Baram' has been verified for the Asus Rog Strix B550xe motherboard, which utilizes an AMD chipset. However, given the vast diversity of hardware configurations and specific edge cases, we cannot assure universal compatibility. We recommend consulting your motherboard's documentation or seeking community support for configurations not explicitly mentioned.
We welcome contributions of all kinds, from code to documentation, from all members of the community. Please see our contributing guidelines for more information on how to get involved.
Details about the project's license are included here, outlining the permissions and restrictions for using and distributing Baram.