Dasharo Performance: Custom fan curve
Test cases common documentation
Test setup
- Proceed with the Generic test setup: firmware.
- Proceed with the Generic test setup: OS installer.
- Proceed with the Generic test setup: OS installation.
- Proceed with the Generic test setup: OS boot from disk.
CFC001.001 Custom fan curve measure (Ubuntu 20.04)
Test description
The fan has been configured to follow a custom curve. This test aims to verify that the fan curve is configured correctly and the fan spins up and down according to the defined values.
Test configuration data
FIRMWARE
= Dasharo
Test setup
- Proceed with the Test cases common documentation section.
- Install
lm-sensors
andstress-ng
on the DUT.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open the terminal window and run the following command:
stress-ng --cpu 16 --timeout 30m
-
Open the terminal window and run the following command to get the temperature:
sensors | grep 'Package id 0'
-
In the terminal window run the following command to get the PWM value of the CPU fan:
cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/17761776:00/hwmon/hwmon3/pwm1
-
Repeat steps 5-6 a couple of times.
- Note the results.
Expected result
Keep in mind that the EC firmware is smoothing, i.e. the fans will enter the target speed with a delay.
The algorithm by which the EC calculates the speed is as follows:
- If the temperature is below the first one defined in the curve, set the speed to 0.
- If the temperature is above the last defined curve, set the maximum speed.
- If the temperature is equal to one of the temperatures of the points on the curve, set the speed from that point on the curve
-
If the temperature is between points on the curve:
slope = (right_point_speed - left_point_speed)/right_point_temperature - left_point_temperature) speed = slope*(temperature - left_point_temperature) + left_point_speed
Divide the PWM value by 2.55 to get the percentage to compare.
Example check for 30°C and 70 PWM values:
```text
expected_speed = ((30-25)/(65-0))*(30-0)+25 ≈ 27
actual_speed = 70/2.55 ≈ 27
```
Values expected_speed
and actual_speed
are strongly similar. This means
that the fan control is set correctly.