1.8 KiB
1.8 KiB
Dell OptiPlex 3050 Micro Fan Control Script
This Bash script provides simple, temperature-based fan control for the Dell OptiPlex 3050 Micro. It's designed to reduce idle fan noise by lowering the fan speed when the system is cool, while still ramping it up appropriately under load.
📋 Overview
By reading CPU temperature from the system's hwmon interface and adjusting the fan speed via PWM (pulse-width modulation), this script allows you to override the default, often overly aggressive fan behavior.
⚙️ How It Works
-
Monitors CPU Temperature
- Reads from:
/sys/class/hwmon/hwmon1/temp1_input
(Path may vary depending on your system — adjust as needed.)
- Reads from:
-
Controls Fan Speed
- Writes PWM values to:
/sys/class/hwmon/hwmon2/pwm1
(This controls the fan speed. Also may vary.)
- Writes PWM values to:
-
Temperature-Based Fan Speed Logic
Temperature (°C) Fan Speed (PWM) Approximate Speed < 50°C 25 ~25% 50–59°C 45 ~50% 60–64°C 60 ~75% 65–74°C 120 High ≥ 75°C 255 Maximum ≥ 85°C 255 + warning Emergency max speed -
Failsafe Mechanism
- If temperature exceeds 85°C, the fan is forced to maximum and a message is logged to
/dev/kmsg.
- If temperature exceeds 85°C, the fan is forced to maximum and a message is logged to
🧪 Requirements
- A Linux system with PWM-capable fan control (
/sys/class/hwmon/...) - Root access to write PWM values
- Adjusted system paths if
hwmon1andhwmon2differ on your machine
🚀 Usage
-
Make the script executable:
chmod +x fan_control.sh