Skip to content

Add optional 3-stage CPU temperature fan curve#121

Open
kelriclink wants to merge 2 commits into
tigerblue77:masterfrom
kelriclink:feature/cpu-temp-fan-curve
Open

Add optional 3-stage CPU temperature fan curve#121
kelriclink wants to merge 2 commits into
tigerblue77:masterfrom
kelriclink:feature/cpu-temp-fan-curve

Conversation

@kelriclink
Copy link
Copy Markdown

Summary

This PR adds an optional 3-stage CPU temperature fan curve (simple step curve) to the Dell iDRAC fan controller container.

  • Disabled by default (keeps current behavior unchanged)
  • When enabled, fan speed is adjusted automatically using 3 stages based on CPU temperature

Behavior (3 stages)

The controller uses the highest detected CPU temperature (CPU1/CPU2) as T:

  1. Cool (Stage 1): T < CPU_TEMPERATURE_FAN_CURVE_LOW_THRESHOLD
    → apply static fan speed CPU_TEMPERATURE_FAN_CURVE_LOW_FAN_SPEED

  2. Warm (Stage 2): T > CPU_TEMPERATURE_FAN_CURVE_MID_THRESHOLD
    → apply static fan speed CPU_TEMPERATURE_FAN_CURVE_MID_FAN_SPEED

  3. Hot (Stage 3 / Safety): T > CPU_TEMPERATURE_THRESHOLD
    → switch back to Dell default dynamic fan control profile (auto)

Between LOW and MID thresholds, the last applied curve stage is kept to reduce oscillation.

New environment variables

  • ENABLE_CPU_TEMPERATURE_FAN_CURVE (default: false)
  • CPU_TEMPERATURE_FAN_CURVE_LOW_THRESHOLD (default: 60)
  • CPU_TEMPERATURE_FAN_CURVE_LOW_FAN_SPEED (default: 12)
  • CPU_TEMPERATURE_FAN_CURVE_MID_THRESHOLD (default: 75)
  • CPU_TEMPERATURE_FAN_CURVE_MID_FAN_SPEED (default: 20)

Fan speeds support decimal (0–100%) or hex (0x00–0x64), same as FAN_SPEED.

Note: when the curve is enabled, FAN_SPEED is ignored.

Implementation notes

  • Reuses existing IPMI raw commands for switching auto/manual and setting manual fan percentage.
  • Fixes an issue when CPU2 sensor is absent (avoid printing/format errors).
  • Documentation updated with usage examples.

Files changed

  • Dell_iDRAC_fan_controller.sh: adds curve logic + selection
  • functions.sh: adds apply_user_fan_control_profile_with_speed helper + small sensor output fix
  • Dockerfile: adds default ENV values for the new variables
  • README.md: documents the feature and parameters

l have already test it at my dell r730xd ,it works great.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant