0

Problem

I can't use ipmi to control fan speed.

I have an X570D4U-2L2T motherboard with a Ryzen 5600x and am running Ubuntu 21.04.

Can the community advise how I might use ipmitool or ipmiutil to control the fan speeds – either to set a constant value or to set a curve?

Background information

I tried the web interface. I can log on but it's not particularly easy to use and no matter what settings I change, they seem to revert back.

So I tried the cli, which I prefer anyway.

Here is what happens when I try an "obvious" command to put an upper bound on fan speed of 400RPM:

$ sudo ipmitool sensor thresh "FAN3" upper 400 400 400
Locating sensor record 'FAN3'...
Setting sensor "FAN3" Upper Non-Critical threshold to 400.000
Error setting threshold: Command illegal for specified sensor or record type
Setting sensor "FAN3" Upper Critical threshold to 400.000
Error setting threshold: Command illegal for specified sensor or record type
Setting sensor "FAN3" Upper Non-Recoverable threshold to 400.000
Error setting threshold: Command illegal for specified sensor or record type

Here's a listing of my fans in their current states:

$ sudo ipmiutil sensor | grep FAN
001a SDR Full 01 01 20 a 04 snum 60 FAN1             = 00 Init  0.00 RPM
001b SDR Full 01 01 20 a 04 snum 61 FAN2             = 05 OK   500.00 RPM
001c SDR Full 01 01 20 a 04 snum 62 FAN3             = 05 OK   500.00 RPM
001d SDR Full 01 01 20 a 04 snum 63 FAN4_1           = 00 Init  0.00 RPM
001e SDR Full 01 01 20 a 04 snum 66 FAN4_2           = 00 Init  0.00 RPM
001f SDR Full 01 01 20 a 04 snum 64 FAN5_1           = 00 Init  0.00 RPM
0020 SDR Full 01 01 20 a 04 snum 67 FAN5_2           = 00 Init  0.00 RPM
0021 SDR Full 01 01 20 a 04 snum 65 FAN6_1           = 00 Init  0.00 RPM
0022 SDR Full 01 01 20 a 04 snum 68 FAN6_2           = 00 Init  0.00 RPM

FAN2 and FAN3 are physically connected to fans on the motherboard, and the fans are turning.

Thank you.

2 Answers 2

1

Try

 sudo ipmitool sensor thresh {fan_id} upper 400 400 400

Where "fan_id" is the fan position (ID number). ASRock boards follow a pattern in terms of the Fan ID / fan position order specified in IPMI commands that control the fans. You need to know which fan name corresponds to which fan ID number (position) before you can set the fan's thresholds.

If you want to set the same thresholds for all fans, then it's a lot easier. Just count the total number of fan headers and loop through all of those IDs.

Fan ID will be a number in hex from 0-15 for your board.

Another possibility is the problem is not the Fan ID, but you may have been correct in using the Fan Header Name. If that is true, then the problem is most likely that you're attempting to use a fan speed that is not divisible by the fan hysteresis, and the BMC chip is requiring a value that is. However, normally the BMC will simply round down the value you provide to the nearest hysteresis multiple.

Other possible problems include:

  • the board does not allow you to set the fan thresholds via command-line driven IPMI, in which case you might need to use a GUI version of IPMI or set them via the BIOS
  • you're trying to use IPMI command line out-of-band, and the board won't allow it
  • there is some kind of lock feature which needs to be disabled before the board will allow you to set the thresholds

There are numerous possible explanations, because there can be multiple layers of middle-firmware between you and the fans.

This is a good generic resource: https://www.truenas.com/community/resources/how-to-change-ipmi-sensor-thresholds-using-ipmitool.35/

Supermicro and ASRock generally use the same ordering for fan speed thresholds. This is especially true for mobos with ASPEED AST2500 or AST2600 BMC chipsets. Your X570 board has an AST2500 BMC.

2
  • This support FAQ article on ASRockRack website might help: asrockrack.com/support/faq.cn.asp?id=38
    – user73657
    Jan 22 at 22:23
  • 1
    True, @user73657, but be warned that the information on that page is misleading. ipmitool raw 0x3a 0x01 is more directly applicable to the ASPEED AST2300 ASRock boards than the AST2500. Most of their AST2500 BMC boards use different raw commands. Their own article is very misleading on ASRock's part IMHO, though unfortunately that seems to be the norm these days. Poor documentation that is, even from manufacturers. Jan 25 at 4:49
0

You are trying to set the fan thresholds, and not the actual fan speeds.

The error says that the subject bmc refuses to update threshold data.

So you cannot set the thresholds but you (probably) should be able to set the fan speeds. However, you may need to set the fan speeds to manual first.

Take a look at the examples here: https://gist.github.com/slykar/f90ad596b18d5ab1eb1c66b2ccf51c54

1
  • Not good advice. That link points to info regarding a Dell T610. Unless you know the AsRock X570D4U-2L2T and Dell T610 motherboards share the same BMC chipset, that information is useless to the O.P. The raw IPMI commands are very unlikely to coincide unless the boards use the same BMC. Even then, some BMC chipsets allow different implementations of sensor addresses, which would obviate any info even if the chips are identical models. You need to know the BMC chipset and validate how it's implemented on any given board. Dec 8, 2022 at 5:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .