ASRock Rack BMC Fan Control?

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
I have an ASRock Rack EPYCD8 motherboard and I'm not seeing anyway to control the fans via IPMI. Am I missing something? I'm not seeing my CPU fan ramp up at all when my CPU gets warmer.
 
  • Like
Reactions: Bradford

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
What do you get from the output of: ipmitool sdr ?
Code:
root@BEAST:/dev# ipmitool sdr
3VSB             | 3.40 Volts        | ok
5VSB             | 5.13 Volts        | ok
VCPU             | 1.12 Volts        | ok
VSOC             | 0.85 Volts        | ok
VCCM ABCD        | 1.21 Volts        | ok
VCCM EFGH        | 1.22 Volts        | ok
BAT              | 3.04 Volts        | ok
3V               | 3.32 Volts        | ok
5V               | 5.04 Volts        | ok
12V              | 12.30 Volts       | ok
MB Temp          | 32 degrees C      | ok
Card Side Temp   | 45 degrees C      | ok
CPU Temp         | 42 degrees C      | ok
TR1 Temp         | no reading        | ns
DDR4_A Temp      | 43 degrees C      | ok
DDR4_B Temp      | 46 degrees C      | ok
DDR4_C Temp      | 46 degrees C      | ok
DDR4_D Temp      | 46 degrees C      | ok
DDR4_E Temp      | 40 degrees C      | ok
DDR4_F Temp      | 42 degrees C      | ok
DDR4_G Temp      | 44 degrees C      | ok
DDR4_H Temp      | 42 degrees C      | ok
CPU1_FAN1        | 1700 RPM          | ok
FRNT_FAN1        | 600 RPM           | ok
FRNT_FAN2        | 600 RPM           | ok
FRNT_FAN3        | 600 RPM           | ok
FRNT_FAN4        | no reading        | ns
REAR_FAN1        | 700 RPM           | ok
REAR_FAN2        | 600 RPM           | ok
CPU1_FAN1_2      | no reading        | ns
FRNT_FAN1_2      | no reading        | ns
FRNT_FAN2_2      | no reading        | ns
FRNT_FAN3_2      | no reading        | ns
FRNT_FAN4_2      | no reading        | ns
REAR_FAN1_2      | no reading        | ns
REAR_FAN2_2      | no reading        | ns
PSU1 PIN         | no reading        | ns
PSU2 PIN         | no reading        | ns
PSU1 POUT        | no reading        | ns
PSU2 POUT        | no reading        | ns
PSU1 VIN         | no reading        | ns
PSU2 VIN         | no reading        | ns
PSU1 IOUT        | no reading        | ns
PSU2 IOUT        | no reading        | ns
ChassisIntr      | 0x00              | ok
CPU_PROCHOT      | 0x00              | ok
CPU_THERMTRIP    | 0x00              | ok
PSU1 Status      | 0x00              | ok
PSU1 AC lost     | Not Readable      | ns
PSU2 Status      | 0x00              | ok
PSU2 AC lost     | Not Readable      | ns
The CPU fan speed doesn't budge no matter what the CPU temp goes to. And I know the fan works because it's only 2 months old and just worked perfectly on a supermicro board I was previously using a few weeks ago.
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
Have you tried adjusting the fan thresholds as shown in ipmitool sensor ?
Oh strange, looks like they're not completely set at all. Never seen that before. I guess I'm just used to SuperMicro.

Code:
CPU Temp         | 40.000     | degrees C  | ok    | na        | na        | na        | 95.000    | na        | na      
CPU1_FAN1        | 1700.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na      
FRNT_FAN1        | 600.000    | RPM        | ok    | na        | na        | 100.000   | na        | na        | na      
FRNT_FAN2        | 600.000    | RPM        | ok    | na        | na        | 100.000   | na        | na        | na      
FRNT_FAN3        | 600.000    | RPM        | ok    | na        | na        | 100.000   | na        | na        | na      
REAR_FAN1        | 700.000    | RPM        | ok    | na        | na        | 100.000   | na        | na        | na      
REAR_FAN2        | 600.000    | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
Now I need to figure out what to set these to...
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
Even when you (factory) reset the ipmi/bmc?
I guess I can try that. I've upgraded the BMC firmware since I got the board so I assumed it was wiped but I'll try and manually wipe it and see what happens.
 

vanfawx

Active Member
Jan 4, 2015
369
68
28
42
Vancouver, Canada
And if the thresholds still aren't there, you should contact support from your board vendor. Hopefully an IPMI config reset will get you right again though.
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
Well I've done a factory reset, a re-flash to the latest firmware and a flash to the previous version. No dice. Guess I'll have to contact support.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,395
499
83
IamSpartacus - suspect that if your fans aren't ramping up with increased load/temps it might be a bug (there was a bug in the beta BIOS for my board that stopped the sensors working properly) but just in case you find it useful I've been using the following ipmitool raws to manually set the fan duty cycles on my X470D4U. I've just replaced the ~7000rpm NPM fans in my case with Noctuas but at default smart fan settings they were running at ~900-1000rpm which wasn't shifting enough air to keep the HDDs cool so I finally had a dig in to tweaking the ASRock IPMI manually.

The duty cycle thresholds can usually be tweaked in the BIOS but of curse much more convenient to be able to do it from within the OS.

See the available fan channels in IPMI:
Code:
effrafax@wug:~$ ipmitool sensor|grep -i fan
FAN1             | 1000.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN2             | 1000.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN3             | 1000.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN4             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
FAN5             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
FAN6             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
This raw should tell you the current duty cycle for each of the above six fan channels (plus two extra numbers at the end, possibly for boards with 8 fan headers):
Code:
effrafax@wug:~$ ipmitool raw 0x3a 0x02
 00 00 00 00 00 00 00 00
Those first six numbers directly correlate to each of the FANx channels seen in the IPMI sensors, i.e. FAN1 = 1st hex, FAN2 = 2nd hex, etc. I haven't figured out what the last two hex numbers represent. As you can see from above they're all currently set to zero; 0x00 refers to the default "smart fan" setting, 0x04 through to 0x64 represent the duty cycle with 0x04 meaning minimum rpm and 0x64 meaning maximum rpm.

As such, you can use the following raw command to set the duty cycle of each of those fans individually using the prefix 0x3a 0x01 (as opposed to 0x3a 0x02 for reading). The below command sets FAN1 (the CPU fan) to max duty cycle, FAN2 to ~50% duty cycle, FAN3 to ~90% duty cycle, FAN4 to Smart Fan and FAN5 and 6 to max duty cycle. I've left the last two octets at 0 but changing them to other values didn't seem to make any difference.
Code:
ipmitool raw 0x3a 0x01 0x64 0x32 0x56 0x00 0x64 0x64 0x00 0x00
The results should take effect immediately; re-read to check and the fan speeds should have changed accordingly:
Code:
effrafax@wug:~$ ipmitool raw 0x3a 0x02
 64 32 56 00 64 64 00 00
effrafax@wug:~$ ipmitool sensor|grep -i fan
FAN1             | 2600.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN2             | 1100.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN3             | 2000.000   | RPM        | ok    | na        | na        | 100.000   | na        | na        | na
FAN4             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
FAN5             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
FAN6             | na         | RPM        | na    | na        | na        | 100.000   | na        | na        | na
These speeds aren't persistent so for the time being I've chucked a command in my rc.local to load on boot.

I'm still experimenting with the granularity of this but on my board at least it gives me a lot of scope for quite fine-grained control over the fans depending on temperature in various zones, much more flexible than the Supermicro route for my purposes. Hope they fix your BIOS soon and that this'll be useful in the interim.

P.S. I've not had cause to tinker with it yet but the setting of the sensor thresholds seems to work the same way as for other IPMI implementations, e.g.
Code:
ipmitool sensor thresh FAN1 lower 100 200 3000
 

brewmonkey

New Member
Feb 26, 2020
13
1
3
My E3C246D4U does the same thing with latest BIOS/BMC firmware - fans do not seem to ramp with CPU load even though BIOS setting of "AUTO" seems to suggest it will do just that. Hard to believe they let such a fundamental function get so screwed up.
 

tinfoil3d

QSFP28
May 11, 2020
285
109
43
Japan
Absolutely saved me. Thank you. Thanks for this research and knowledge share, the thing is I've just upgraded into BIOS 2.60 that supports EPYC ROME on my EPYCD8-2T, and all the fan control options disappeared from BIOS. Noctua PWM fans weren't creating any airflow at all, and this solved it. Absolutely amazing! I can control my fans live and script it now. Was about to call my rep to look into this. I'm still waiting for an answer by email, maybe he'll share more ways but this is very much sufficient.
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,337
568
113
Absolutely saved me. Thank you. Thanks for this research and knowledge share, the thing is I've just upgraded into BIOS 2.60 that supports EPYC ROME on my EPYCD8-2T, and all the fan control options disappeared from BIOS. Noctua PWM fans weren't creating any airflow at all, and this solved it. Absolutely amazing! I can control my fans live and script it now. Was about to call my rep to look into this. I'm still waiting for an answer by email, maybe he'll share more ways but this is very much sufficient.
Contact ASRock support. Fan control disappeared on BIOS update for me as well and they provided me a beta bios that brought them back.
 

tinfoil3d

QSFP28
May 11, 2020
285
109
43
Japan
Contact ASRock support. Fan control disappeared on BIOS update for me as well and they provided me a beta bios that brought them back.
I did. But BIOS requires me to reboot the machine to change anything, while ipmitool provides live tweaks, which is much better.
This forum is really a gold stash of knowledge.
 

bellss

New Member
Jun 23, 2021
2
1
1
Hi. Can anyone add to the stash of gold by updating on the ipmi raw magic to control fans on an AsrockRack X570D4U-2L2T?

It seems the raw commands may have changed from the X470D4U:

$ sudo ipmitool raw 0x3a 0x02
Unable to send RAW command (channel=0x0 netfn=0x3a lun=0x0 cmd=0x2 rsp=0xc1): Invalid command
Thank you.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,395
499
83
That's a bit odd; ASRR don't make any mention of changes on their FAQ page (stupid JS so you need to find the section "How to modify the mainboard/system fan control?"). But it's certainly not the first time documentation might not have been in step with code.

I assume you're using the 01.10.00 BMC and not any weird beta releases? Do any of the other commands work on your IPMI? These three should show you your NIC settings, your eth0 MAC address and your IPMI bonding status.
Code:
ipmitool lan print 1
ipmitool raw 0x3a 0xa1 0x00
ipmitool raw 0x32 0x72 0x01 0x00 0x00
FWIW when I was looking for the IPMI raws, last time I opened up a ticket from their support page and one of their chaps from the Netherlands furnished me with an answer within a few days.
 

bellss

New Member
Jun 23, 2021
2
1
1
Thank you EffrafaxOfWug. Yes, I'm running the 01.10.00 BMC. For the record, I have this for controlling the X570D4U-2L2T (courtesy of ASRock support and a post on unraid):


Code:
Set all fans to automatic mode
sudo ipmi-raw 00 3a d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Set all fans to manual mode
sudo ipmi-raw 00 3a d8 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
Set all fans to custom mode
sudo ipmi-raw 00 3a d8 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
Set all fans to 20%
sudo ipmi-raw 00 3a d6 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
Set all fans to full
sudo ipmi-raw 00 3a d6 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
read fan speeds:
sudo ipmi-sensors -t fan
get fan mode (0=auto, 1=manual, 2=custom curve)
sudo ipmitool raw 0x3a 0xd9
get fan duty for manual mode
sudo ipmitool raw 0x3a 0xd7
You can do this remotely too, of course:
Code:
ipmitool -H 192.168.1.2 -U admin -P 12345678 -I lanplus raw 0x3a 0xd8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01

I would love to see the full handbook of hex codes. However, this information does not appear to be easily accessible. I would welcome more information on this.
 
  • Like
Reactions: nukke