Manual Fanspeed Control through IPMI

2024-04-27

By default, enterprise compute and networking gear from large vendors (Dell, Supermicro, HPE, Cisco, etc) use dynamic fanspeed controls based on system temperature to ensure their vital components remain at a safe operating temperature. That's all well and good in the datacenter space where increased cooling capacity far outweighs an increase in noise. Likewise, sufficient cooling potential is provided by the ambient temperature delta between the cold and hot aisles, letting the BMC simply ramp fan speeds up as users push the hardware ever closer to the redline.

In a homelab though, the calculus changes.

Those fortunate enough to own a basement—one that doesn't flood when it rains—can care less when the natural cooling properties of a subterranean room plus decent sound isolation keep their servers running happily as they were designed. For the rest of us who wish to take advantage of enterprise-grade gear but live in a space-restricted dwelling, we must trade some cooling performance for a reduction in noise to stay sane.

In my lab, I regularly run my server fans at 16-20% their maximum operating speed. I'm rarely stressing my systems above 15% utilization under normal operation for any significant period, and this range provides a workable cooling-to-noise ratio such that I don't feel like my ears are going to start bleeding when I open my server closet.

But enough blabber. Let's talk solutions.

I'll update this post with more vendors as I come across them, but as my lab is largely composed of Supermicro gear due to their less-uptight nature around vendor-specific hardware (cough cough HPE), updates will likely be few and far between.

ipmitool

ipmitool is a command-line tool for interacting with both the host-local and remote IPMI BMCs. It's largely used by sysadmins to administer low-level server function across a fleet, but it's a good back-pocket tool for homelabbers too. In the case of making servers quiet, ipmitool allows for bypassing the lack of proper fanspeed controls in IPMI management web UIs by interfacing directly with the BMC.

Every fan controller implementation is a bit different, so the ultimate source of information for which commands work on what platform would be the vendor's specific documentation.

Supermicro IPMI

To use ipmitool to connect to a remote Supermicro IPMI interface, run ipmitool with the following flags. -P is optional, and an interactive password prompt will appear if it is ommitted.

ipmitool -I lan -H $IPMI_IP_ADDR -U $IPMI_USER [-P $IPMI_PASS] <command>

Supermicro fan controls consist of two zones, "system" and "peripheral". System fans are fans identified with a number (FAN0), and peripheral fans (like hot-swappable power supplies) are identified by letter (FANA). Supermicro provides four fan profiles to users: "Standard", "Full", "Optimal", and "Heavy IO". The definitions of these zones are provided below, but they come from this great ServeTheHome post about controlling fans on the Supermicro x9-x11 platforms.

  • Standard: BMC control of both fan zones, with CPU zone based on CPU temp (target speed 50%) and Peripheral zone based on PCH temp (target speed 50%)
  • Optimal: BMC control of the CPU zone (target speed 30%), with Peripheral zone fixed at low speed (fixed ~30%)
  • Full: all fans running at 100%
  • Heavy IO: BMC control of CPU zone (target speed 50%), Peripheral zone fixed at 75%

To manually set the fan speed to a fixed target, the fans must be set to use the "Full" profile. Other profiles will ignore the manual target speed commands we issue to the BMC.

The post from ServeTheHome omits an 0x01 value from their raw commands, before the configurable values highlighted in my command blocks. These are the commands I use on my Supermicro x10-based SuperServer 6028U-TR4T+ systems and 45Drives Storinators. I'll update this post in the future with more information on this extra magic number.

All of the fan controls here use "raw" ipmi commands with seemingly magic numbers. For instance, here's the command to set the system to use the "Full" fan profile:

# set the system to use the "Full" fan profile
# [args] are the connection arguments listed above
ipmitool [args] raw 0x30 0x45 0x01 0x01
#                                     ^ Fan profile value

The final hex value in the command above is the fan profile for the system to use. 0x01 designates the "Full" profile.

  • Standard: 0
  • Full: 1
  • Optimal: 2
  • Heavy IO: 4

Once the fans are set to "Full", each fan group's PWM duty cycle can be set to a percentage value of 0-100%, using the hex values 0x00 to 0x64. Time for more magic numbers.

#                                          v '0x00' for the "System" fan group, "0x01" for the "Peripheral" group
ipmitool [args] raw 0x30 0x70 0x66 0x01 0x00 0x16
#                                              ^ PWM duty cycle, 0x00 (0%) - 0x64 (100%)

Dell iDRAC

To use ipmitool to connect to a remote Dell iDRAC interface, run ipmitool with the following flags. -P is optional, and an interactive password prompt will appear if it is ommitted.

IPMI_EK=0000000000000000000000000000000000000000 # default idrac encryption key
ipmitool -I lanplus -H $IPMI_IP_ADDR -U $IPMI_USER [-P $IPMI_PASS] -y $IPMI_EK <command>

Similar to the Supermicro section above, we can set a fixed target PWM speed percentage through issuing "raw" commands to our BMC. It's the same two-step process, first setting the fans to their "Full" profile, and then adjusting the PWM duty cycle to our desired value.

These are the commands to control the fans on a Dell r710. Subsequent versions of Dell R-series server iDRACs may have different values. Consult your system's documentation for a full list of options.

# Set fan profile
ipmitool [args] raw 0x30 0x30 0x01 0x00
#                                     ^ Fan Profile selector. 0x00 == "Full", 0x01 == "Optimal/Automatic"

Setting the fan percentage is similar to the Supermicro example, where we pass a percentage value to lock the fans to a particular speed. However, there are no separate zones, and at the time of writing I don't know the actual percentage curve. 0x08 - 0x10 are reasonable for sitting in the same room while offering acceptable cooling performance in environments where the system isn't under heavy stress.

# Set fan percentage
ipmitool [args] raw 0x30 0x30 0x02 0xff 0xYY
#                                         ^ Speed selector value

This ServeTheHome thread has some further discussion on the topic for 11th Generation Dell servers.