A Python utility for dynamic control of Corsair Commander Pro fan speeds based on CPU temperature.
ccpctl
is a lightweight command-line tool that automatically adjusts Corsair Commander Pro fan speeds based on real-time CPU temperature readings. It provides a simple way to implement dynamic fan curves without relying on proprietary software, giving you better control over your system's cooling and noise levels.
- 🔄 Dynamic fan speed adjustment based on CPU temperature thresholds
- 🌡️ Real-time temperature monitoring using system sensors
- 💡 Fixed LED color control for connected fans
- 📊 Configurable update intervals and temperature change thresholds
- 📝 Detailed logging with multiple verbosity levels
- Python 3.x
- Corsair Commander Pro device connected to your system
- Linux operating system with temperature sensors configured
The following Python packages are required:
docopt
psutil
liquidctl
- Clone this repository:
git clone https://github.com/yourusername/corsair_commander_pro_ctl.git
cd corsair_commander_pro_ctl
- Install the required dependencies:
pip install docopt psutil liquidctl
- Ensure your user has appropriate permissions to access the USB device:
sudo chmod a+rw /dev/hidraw*
Or add a udev rule for more permanent access.
Run the script with:
python ccpctl.py
Usage:
ccpctl [options]
Options:
--interval <seconds> Update interval in seconds [default: 2]
-g, --debug Show debug information on stderr
-v, --verbose Output additional information
- The script connects to your Corsair Commander Pro device
- It continuously monitors the CPU temperature using system sensors
- Based on temperature thresholds, it adjusts the fan speeds:
- Higher temperatures (>80°C) → 100% fan speed
- Lower temperatures (<30°C) → 25% fan speed
- Various steps in between
- It sets a fixed blue color for the LEDs on connected fans
- A temperature change threshold prevents constant speed adjustments for minor fluctuations
You can modify the following parameters in the code:
update_interval
: How often to check temperatures (in seconds)cpu_sensor
: The specific temperature sensor to monitortemp_change_threshold
: Minimum temperature change percentage to trigger fan speed adjustment- Fan speed thresholds in the
set_fan_speed
method - LED colors in the
set_fan_led_fixed_colour
method
Logs are saved to ccpctl.log
in the same directory as the script. Use the --debug
or --verbose
flags to increase logging detail.
- If no devices are found, ensure the Commander Pro is properly connected and recognized by the system
- Check that you have the correct permissions to access USB devices
- Verify that your system's temperature sensors are properly configured and accessible
This project is available as open source under the terms of the MIT License.